Master Panel Guide¶
Learn to control global tempo and create shared parameters across all cards.
What is the Master Panel?¶
The master panel sits above the four cards and provides controls that affect everything at once:
- TEMPO: Controls the speed of all patterns
- Global Sliders: Variables that any card can reference
- Stop All: Stops all cards simultaneously
Think of the master panel as the conductor - it sets the tempo and overall tone, while each card (musician) plays their own part.
TEMPO Control¶
What TEMPO Does¶
TEMPO controls how fast patterns play across all cards. When you adjust TEMPO, every playing pattern speeds up or slows down together.
Default Setup¶
The master panel includes a TEMPO slider:
| Parameter | Value | Meaning |
|---|---|---|
| Default | 30 | Starting speed |
| Min | 15 | Slowest setting |
| Max | 45 | Fastest setting |
How Speed Works¶
r0astr uses CPS (Cycles Per Second) internally. You don't need to understand the math - just know that:
- Higher TEMPO = faster patterns
- Lower TEMPO = slower patterns
- All cards follow the same tempo
Practical Use¶
- Start with the default tempo
- Use the slider to find a comfortable speed
- All patterns automatically adjust
Performance Tip
Subtle tempo changes during a performance can add dynamics. Try slowly increasing tempo to build energy.
Global Effect Sliders¶
Create sliders in the master panel that control parameters across all cards.
Why Use Global Sliders?¶
Instead of adding separate filter sliders to each card, create one in the master panel:
- Single control affects everything
- Consistent effect across all instruments
- Great for sweeps and buildups
Creating a Global Slider¶
In the master panel code:
This creates:
- A slider named SLIDER_LPF
- Starting at 800 Hz
- Range from 100 Hz to 5000 Hz
Using in Cards¶
Reference the variable name in any card:
// Card 1
s("bd*4").lpf(SLIDER_LPF)
// Card 2
note("c2 ~ c2 e2").s("sawtooth").lpf(SLIDER_LPF)
// Card 3
n("0 2 4").scale("C4:minor").s("triangle").lpf(SLIDER_LPF)
Now one slider controls the filter on all three cards.
Multiple Global Sliders¶
Add as many as you need:
// Master Panel
let SLIDER_LPF = slider(800, 100, 5000);
let REVERB = slider(0.3, 0, 1);
let MASTER_GAIN = slider(0.8, 0, 1);
Use them in cards:
Variable Reference Workflow¶
Step 1: Define in Master Panel¶
Write your slider definitions in the master panel:
Step 2: Use in Card Patterns¶
Reference the variable names (exactly as written) in any card:
// This card uses both global sliders
note("c2 e2 g2")
.s("sawtooth")
.lpf(FILTER)
.room(SPACE)
.gain(0.6)
Step 3: Control in Real-Time¶
Adjust the sliders while patterns play. All cards using those variables update instantly.
Naming Conventions¶
Use clear, descriptive names:
| Good | Why |
|---|---|
SLIDER_LPF |
Clear it's a slider, controls low-pass |
MASTER_GAIN |
Indicates global volume |
REVERB |
Simple and obvious |
TEMPO |
Special - controls global speed |
Creating Custom Sliders¶
Basic Syntax¶
| Part | Description |
|---|---|
let NAME |
Variable name to use in cards |
slider() |
Creates a slider control |
default |
Starting value |
min |
Minimum value |
max |
Maximum value |
Examples¶
Filter Control (Hz):
Volume Control (0-1):
Reverb Amount (0-1):
Speed Modifier:
Complete Example¶
Master Panel:
let TEMPO = slider(30, 15, 45);
let LPF = slider(1200, 100, 4000);
let REVERB = slider(0.3, 0, 0.9);
let MASTER = slider(0.8, 0, 1);
Card using globals:
Stop All¶
What It Does¶
The Stop All button immediately stops every playing pattern across all cards.
When to Use¶
- End of performance: Clean stop
- Reset: Start fresh
- Emergency: Something sounds wrong
Behavior¶
When you click Stop All:
- All cards stop immediately
- Cards remain paused (not reset)
- Code in each card is preserved
- Click Play on individual cards to restart
Advanced: How Master Panel Works¶
For Advanced Users
This section explains the technical implementation. You don't need to understand this to use r0astr effectively.
Parsing Differences¶
The master panel works differently from cards:
| Feature | Cards | Master Panel |
|---|---|---|
| Code evaluation | Strudel transpiler | Regex parsing |
| Pattern execution | Yes | No |
| Slider detection | Automatic | Manual parsing |
Why Regex?¶
The Strudel transpiler can block when used in the master panel context. To avoid this, r0astr parses master panel code with regex to extract slider definitions.
TEMPO Special Handling¶
TEMPO isn't just a variable - it controls the scheduler:
- Master panel code defines:
let TEMPO = slider(...); - r0astr detects the TEMPO variable
- Changes are converted to CPS (cycles per second)
- The scheduler's speed is updated:
scheduler.setCps(value)
Slider Detection Pattern¶
Master panel sliders must follow this exact format:
The parser looks for:
- let keyword
- Variable name (letters, numbers, underscores)
- = slider(
- Three numeric values
For detailed technical information, see the Architecture documentation.
Quick Reference¶
Master Panel Syntax¶
// Required for tempo control
let TEMPO = slider(30, 15, 45);
// Optional global sliders
let SLIDER_LPF = slider(800, 100, 5000);
let REVERB = slider(0.3, 0, 1);
let GAIN = slider(0.7, 0, 1);
Card Usage¶
Next Steps¶
-
Pattern Library
Ready-to-use patterns that work with global sliders.
-
Architecture
Deep technical details for developers.