Step Selector
UtilitystepselectorLight CPU
Wrapping index driven by a trigger or a position source — one-hot gate per step, plus the index.
What it does
A wrapping page counter: one-hot gate per step plus a numeric index.
Holds a static int index. Trig advances it by one on each rising edge (level > 0.5), wrapping back to step 1 after the last. Position instead sets the index absolutely, wrapped with ((x % n) + n) % n so an Encoder's unbounded signed value stays in range in both directions. No DaisySP class — inline arithmetic and latched state. Gate outputs emit C++ only for ports that are actually wired.
Parameters
-
Steps
stepsHow many steps the index cycles through before wrapping back to the first, 2 to 8. This also decides how many gate outputs the tile has, so changing it adds or removes ports and can leave a wire dangling. ⚠ At 2 this is the latching toggle a momentary button cannot otherwise give you: press once for step 1, again for step 2.
Wire a Button into Trig to advance one step per press (the rising edge is detected internally, so holding the button does not run away). Or wire an Encoder's Value into Position to select a step absolutely — Position wins when both are wired. Each step has its own gate output that is 1.0 only while that step is live, so the gates drive Pickup Active inputs and RGB LED channels with no decoding. At 2 steps this is the latching toggle a momentary button otherwise cannot give you.
Ports
In
-
Trig
trig -
Position
position
Out
-
Step 1
gate1 -
Step 2
gate2 -
Step 3
gate3 -
Step 4
gate4 -
Index
index
Audio Control Port count varies with this module’s parameters — shown for the defaults.
Inputs
- Trig
- Advance one step per rising edge. A sustained Button gate is fine — the edge is detected internally.
- Position
- Absolute step select, wrapped into range. Built for an Encoder's Value out (an accumulated signed int). When wired, Trig is ignored.
Outputs
- Step 1…N
- One-hot gate — 1.0 while that step is live, 0.0 otherwise. Exactly one is high at a time.
- Index
- The live step as a number, 0-based (0 … Steps-1).
Rules and gotchas
- Steps is 2–8, baked at build time.
- Position takes precedence over Trig when both are wired.
- Position truncates toward zero, so feed it an integer-valued source (an Encoder), not a 0–1 pot.
- Index is 0-based even though the handles read Step 1…N — chain a Scale / Offset tile if you need it 1-based.
Patches using it
- Pod Shift Pages
pod
Bundled with the app — open one from the example browser.