TheTechnobear / Orac

Orac : virtual modular synth
GNU General Public License v3.0
355 stars 27 forks source link

Change gate handling in monophonic modules and optimize arper/genny #6

Closed adbrant closed 5 years ago

adbrant commented 5 years ago

This request contains changes to monophonic module midi handling and optimizations in arper and genny.

1: Currently in some monophonic modules releasing any key will cause the current note to end, even if it isn’t the last note played. This change adds a poly object with 1 voice and note stealing to the top level of 6 monophonic modules to prevent this behaviour.

2: arper/genny do a full sort of all notes whenever a note is played or ends, so when more than one note event is emitted by another module in a single DSP block you can get multiple full sorts which can cause the DSP thread to miss a block. With this change Instead of sorting the array each time the currently current notes changes, a flag is set to sort them later. When arper/genny are about to compute a new note, the flag is checked and the sorting is done then if needed.

I've tested out all the modified modules on the organelle and they seem to be working as expected.

TheTechnobear commented 5 years ago

thanks all changed merged into dev.