tulipcc icon indicating copy to clipboard operation
tulipcc copied to clipboard

midi/synth: SingleOscSynth doesn't participate in voices osc management.

Open dpwe opened this issue 11 months ago • 0 comments

Oscs are the basic AMY building blocks. AMY has a voices mechanism which manages blocks of oscs, and things like the Juno and DX7 preset patches use it.

Tulip midi/Synth builds abstractions on top of AMY. The class Synth manages a pool of AMY voices to allow polyphonic synths with voice stealing etc.

However, we also have a cheap-and-cheerful class SingleOscSynth for playing notes when a single AMY osc will suffice. At present, it simply uses osc numbers starting from the top (currently 119) and working down, but without allocating AMY voices.

However, this use won't be visible to the voices system, so if you're unlucky, those oscs will get stomped on by a (Patch)Synth object.

You really can't mix direct use of oscs and voices. We should modify SingleOscSynth to use voices, and have a single mechanism for tracking voice use within the Synth world (currently, only (Patch)Synth keeps track of voices use).

dpwe avatar Feb 03 '25 01:02 dpwe