soul-lang / SOUL

The SOUL programming language and API
Other
1.71k stars 96 forks source link

Sustain pedal support in core library Voice Allocators? #52

Open alfonso73 opened 3 years ago

alfonso73 commented 3 years ago

Hi! Would be great if sustain pedal support is added to https://soul-lang.github.io/SOUL/docs/soul_library.html#mod_soul_voice_allocators As far as i see as for now there's non mechanism for sustain pedal handling in voice allocation. Am i right?

cesaref commented 3 years ago

That's a good point, and a good idea. Yes, i'll investigate what can be done to add support for sustain.

alfonso73 commented 3 years ago

Thanks. Another interesting point is how polyphonic and monophonic voice allocation/stealing are implemented. As for monophonic voice stealing would be great to have the following modes.

  1. Last note priority (if two or more notes are pressed the last pressed one is played)

  2. Hifghest note priority (if two or more notes are pressed the highest pressed one is played)

  3. Lowest note priority (if two or more notes are pressed the lowest pressed one is played) As for polyphonic voice stealing same things are valid. And on top of that for polyphonic allocation there are at least two modes.

  4. Piano-like mode so when a new notes arrives that has already been played the same voice is assigned.

  5. Voice allocation is done regardless same note retriggering. This mode is more typical in synthesizer.

Some discussion here...

https://www.kvraudio.com/forum/viewtopic.php?f=33&t=558446

cesaref commented 3 years ago

Yes, the current round robin allocator is about as simple as it gets, and we can certainly add a more sophisticated library implementation.