Skip to content

Commit 14dbad3

Browse files
committed
tweaks
1 parent 6414553 commit 14dbad3

25 files changed

Lines changed: 508 additions & 69 deletions

‎TODO.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,13 @@ Remaining:
175175
ASan/UBSan: scales against the docs, walk statistics, order 2, learning, locate and block-size
176176
independence, Conductor, state format). Not yet auditioned in a host: try each style, Order 2 after
177177
learning a line, and Learned mix at 50%. Open: learning assumes one melodic line (chords blur the counts);
178-
the matrix editor is click-to-cycle only (no drag-painting or right-click to decrement); the plugin does
178+
the matrix editor has click-to-cycle, drag-to-paint and right-click-to-zero but no undo; the plugin does
179179
not pass incoming MIDI through; the editor does not move while a CC drives a control.
180180
* **Conductor awareness** was added to `lifeform`, `polymeter` and `xoxolo` (off by default; not yet auditioned
181-
in a host). Still without it among the generators: `arpgen`, `cadence`, `counterpointer`, `luma`,
182-
`mnemosyne`, `m-mix`, `sidecar`, `tuney-vst`. Worth adding where a density or energy knob exists.
181+
in a host). `counterpointer` and `cadence` followed (the CC mapping is a tested pure function,
182+
`applyConductorCc`, in their core-types headers; CC 24 relearns). Still without it among the generators:
183+
`arpgen`, `luma`, `mnemosyne`, `m-mix`, `sidecar` (its wrapper is tangled up with the server path),
184+
`tuney-vst`. Worth adding where a density or energy knob exists.
183185
* Later candidate: chord-graph walker. A shared voice-leading helper in
184186
generative-common is only worth it if a second plugin needs it (shared code, needs approval).
185187

‎docs/midi-mapping.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,32 @@ Xoxolo gains a MIDI input and three parameters: **Conductor Ch** (`conductor_ch`
171171

172172
CC 20 (Scene) is not mapped. The mutation shift is performance state and is not saved with the project.
173173

174+
## Counterpointer mapping
175+
176+
Counterpointer gains one parameter, **Conductor** (`conductor_ch`, 0-16, default 0 = off).
177+
178+
| CC | Conductor name | Counterpointer control | Notes |
179+
|----|---------------|------------------------|-------|
180+
| 21 | Density | `density` | How often the counter-line plays |
181+
| 22 | Energy | `embellish` | Ornamentation around the line |
182+
| 23 | Mutation | `short_random` | Short-range randomness |
183+
| 24 | Reset | relearn (trigger) | Fires when CC value = 127; learns the incoming line afresh |
184+
185+
CC 20 (Scene) is not mapped.
186+
187+
## Cadence mapping
188+
189+
Cadence gains one parameter, **Conductor Ch** (`conductor_ch`, 0-16, default 0 = off).
190+
191+
| CC | Conductor name | Cadence control | Notes |
192+
|----|---------------|-----------------|-------|
193+
| 21 | Density | `complexity` | Harmonic richness |
194+
| 22 | Energy | `movement` | How much the harmony moves |
195+
| 23 | Mutation | `vary` | Variation |
196+
| 24 | Reset | relearn (trigger) | Fires when CC value = 127; learns the incoming harmony afresh |
197+
198+
CC 20 (Scene) is not mapped.
199+
174200
## Markov mapping
175201

176202
Markov has one parameter for Conductor reception, **Conductor ch** (`conductor_ch`, 0-16, default 0 = off).

‎docs/pages/_products/cadence.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ dominants. The extended chord mode can voice 9ths, 11ths, and 13ths. Spread
2323
opens the voicing range, and Arpeggio moves playback from solid chords toward
2424
broken fragments or rotating single-note chord tones.
2525

26+
### Conductor integration
27+
28+
Set **Conductor Ch** (0 = off, 1-16) to the channel Conductor uses (default 16). CC 21 drives Complexity,
29+
CC 22 Movement, CC 23 Variation, and CC 24 (value 127) relearns, so each section can start from fresh
30+
harmony. CC 20 (Scene) is not used. See [MIDI Mapping](../../midi-mapping.md).
31+
2632
### Status
2733

2834
This basically works as intended though a little more work is needed in fine-tuning the user interface, it could be more intuitive.

‎docs/pages/_products/counterpointer.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ introduced.
2424
back after a leap of a fourth or more and to keep going after a step. It applies in
2525
Counterpoint mode, not Bass Descend. Idea from [Subsequence](https://subsystem.co/subsequence).
2626

27+
### Conductor integration
28+
29+
Set **Conductor** (0 = off, 1-16) to the channel Conductor uses (default 16). CC 21 drives Density, CC 22
30+
Embellish (how much ornament surrounds the line), CC 23 Short Rnd (how often it deviates), and CC 24 (value
31+
127) relearns, so each new section starts by listening afresh. CC 20 (Scene) is not used. Conductor CCs
32+
are not mistaken for notes to learn. See [MIDI Mapping](../../midi-mapping.md).
33+
2734
### Status
2835

2936
Functional, as far as it goes, but could maybe be improved with more deterministic patterns.

‎docs/pages/_products/markov.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The melody is a random walk over the twelve pitch classes, counted from the **Ro
2626
matrix on screen has a row for the note just played and a column for each note that may follow it;
2727
each cell's weight (0 to 8) says how likely that move is. Brightness shows the chance each move
2828
actually has once the scale, anything learned and **Chaos** are applied, and the digit shows the
29-
weight you set. Click a cell to cycle its weight. The outlined row is the one being used right now.
29+
weight you set. Click a cell to cycle its weight, drag on from a click to paint that weight into the cells you cross, and right-click a cell to zero it. The outlined row is the one being used right now.
3030

3131
**Style** replaces the matrix with a ready-made habit: Stepwise (seconds, with some thirds),
3232
Triadic (thirds and fifths), Fifths (fourths and fifths), Pentatonic, Blues (minor thirds and flat
@@ -74,6 +74,8 @@ line the phrase count starts again with a new random draw. CC 20 (Scene) is not
7474

7575
### Notes
7676

77+
- Every choice (Scale, Step grid, Order, Learn, Learn channel, Conductor ch and the MIDI output channel) is a drop-down list; the numeric controls are sliders.
78+
7779
- The editor does not move while a CC is driving a control (DPF has no DSP-to-panel path for that);
7880
the learned counts do update, a few times a second.
7981
- Only the matrix goes from the editor to the plugin when you edit it, so a melody being learned
7.25 KB
Loading
1.81 KB
Loading
1.81 KB
Loading

‎docs/pages/plugins-summary.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ prose and example chains see `docs/summary.md`; for scale tables see `docs/scale
3434
chipper, damiano, skream, spliff, helterskelter, treatment, magneto and ghost read those
3535
by default so Drift needs no configuration. Conductor emits CC 20-24 on channel 16
3636
(Scene, Density, Energy, Mutation, Reset); bassgen, drumgen, ground, melgen, worms, bubbles,
37-
floozy, harmonic-atlas, sprout, lifeform, polymeter and xoxolo listen through a **Conductor Ch**
37+
floozy, harmonic-atlas, sprout, lifeform, polymeter, xoxolo, markov, counterpointer
38+
and cadence listen through a **Conductor Ch**
3839
parameter (0 = off). Mixgen drives T-Mix with CC
3940
20-27 (strips 1-8), Loopdelay with CC 30/31, Lightverb with CC 32/33; CC 19 claims or
4041
releases the producer bus. Details: `docs/midi-mapping.md`,
@@ -289,11 +290,13 @@ orders. Latch and capture state are internal. Requires transport.
289290
Transport-aware harmoniser and comping generator that learns harmony from incoming MIDI
290291
(learned transition model) and emits chord/comping MIDI. No gravity control yet; a
291292
progression chosen by learned transitions, not a functional-harmony graph. Persistent state.
293+
**Conductor Ch** (0 = off): CC 21 Complexity, 22 Movement, 23 Variation, CC 24 = 127 relearns.
292294

293295
### counterpointer
294296
Learns incoming MIDI and emits a monophonic counter-melody. Counterpoint mode and Bass
295297
Descend mode; **Inertia** (default 0 = unchanged) is a scoring term in Counterpoint mode
296-
only. Routing column provides Freeze and channel selectors. Persistent state.
298+
only. Routing column provides Freeze and channel selectors. Persistent state. **Conductor** (0 = off):
299+
CC 21 Density, 22 Embellish, 23 Short Rnd, CC 24 = 127 relearns.
297300

298301
### mnemosyne
299302
Phrase memory. Stores eight bounded phrases, accompanies incoming MIDI, or generates from

‎plugins/cadence/include/cadence_core_types.hpp‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,23 @@ using ScheduledMidiEvent = MidiMessage;
208208
return controls;
209209
}
210210

211+
// Conductor CC set (docs/midi-mapping.md): CC 21 Density -> complexity, 22 Energy -> movement, 23 Mutation -> vary, and
212+
// CC 24 = 127 (Reset) relearns from the input. CC 20 (Scene) is not used. Returns true when `cc` is one of these.
213+
[[nodiscard]] inline bool applyConductorCc(Controls& controls, const int cc, const int value) noexcept
214+
{
215+
const int clamped = value < 0 ? 0 : (value > 127 ? 127 : value);
216+
const float unit = static_cast<float>(clamped) / 127.0f;
217+
switch (cc) {
218+
case 21: controls.complexity = unit; return true;
219+
case 22: controls.movement = unit; return true;
220+
case 23: controls.vary = unit; return true;
221+
case 24:
222+
if (clamped == 127) ++controls.action_learn;
223+
return true;
224+
default: return false;
225+
}
226+
}
227+
211228
[[nodiscard]] inline bool harmonyControlsMatch(const Controls& a, const Controls& b) noexcept
212229
{
213230
return a.key == b.key &&

0 commit comments

Comments
 (0)