Skip to content

dsp: a bend knob on guitar and analog - #335

Merged
mishan merged 1 commit into
masterfrom
bend
Oct 4, 2026
Merged

mishan merged 1 commit into
masterfrom
bend

Conversation

@mishan

@mishan mishan commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Pitch bends for leads. Stacked on #333 because it touches analog.dsp.

A slewed @bend knob, in semitones, on guitar.dsp (±2) and analog.dsp (±12). It is channel-wide, like a pitch wheel, which is how a monophonic lead is bent on real instruments too. A piece rides it with a chanarg sink:

chain bends {
    stage s gen::steps { values = "0 0 1 1"; period = 1 beats; min = 0; max = 2; };
    sink { instrument = lead; chanarg = "bend"; };
};

On the guitar the bend moves the comb's length but not its decay.

A per-note bend (MPE-style) would need a new event kind through the scheduler, the worklet protocol and MIDI out. This PR doesn't attempt that.

Testing

  • ctest -R "dsp|fx|catalog|gencheck" passes.
  • At bend = 0 the pitch is multiplied by exactly 1: gen/mirrorball.gen (guitar) renders byte-identical to before.
  • A held A4 with the row above measures 440.1 Hz, then 493.9 Hz (B4, +2 semitones) after the step.

Semitones, slewed over 40 ms, channel-wide like a pitch wheel, so a
piece rides it with a chanarg sink from gen::steps. On the guitar it
moves the loop's length and not its decay; at 0 it multiplies by
exactly 1, and mirrorball.gen renders byte for byte as before.
Base automatically changed from warmth to master October 4, 2026 19:25
@mishan
mishan merged commit ba5843e into master Oct 4, 2026
16 checks passed
@mishan
mishan deleted the bend branch October 4, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant