You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1659,6 +1659,37 @@ def arps (p):
1659
1659
1660
1660
CC values are scaled from 0–127 to the `min_val`/`max_val` range and written to `composition.data[key]` on every incoming message. Thread safety is provided by Python's GIL for single dict writes.
1661
1661
1662
+
### Real-time CC forwarding
1663
+
1664
+
`cc_map()` makes CC values available to patterns at rebuild time - useful for driving generative parameters. For cases where you need the signal to reach your synth immediately (pitch bend from a mod wheel, cutoff from a fader, expression from a pedal), use `cc_forward()` instead:
1665
+
1666
+
```python
1667
+
composition.midi_input("Arturia KeyStep")
1668
+
1669
+
# Forward CC 1 directly to pitch bend on channel 1 - instant, ~1–5 ms latency
# Forward AND map simultaneously - both are active
1682
+
composition.cc_map(1, "mod_depth") # value available in patterns via composition.data
1683
+
composition.cc_forward(1, "cc:74") # also forwarded in real-time
1684
+
```
1685
+
1686
+
Two dispatch modes:
1687
+
1688
+
-**`mode="instant"`***(default)* - sent immediately on the MIDI input callback thread. Latency is ~1–5 ms (driver round-trip only). Not recorded when recording is enabled.
1689
+
-**`mode="queued"`** - injected into the sequencer event queue and sent at the next pulse boundary (~0–20 ms at 120 BPM). Properly ordered with note events and **is** recorded when recording is enabled.
1690
+
1691
+
Built-in preset strings: `"cc"` (identity), `"cc:N"` (remap to CC N), `"pitchwheel"` (scale to ±8192). Pass a callable for full control over output message type and value scaling.
1692
+
1662
1693
### MIDI clock output
1663
1694
1664
1695
Make Subsequence the MIDI clock master so hardware can lock to its tempo:
0 commit comments