belangeo / pyo

Python DSP module
GNU Lesser General Public License v3.0
1.28k stars 130 forks source link

added to MidiNote holdmode, first/last velocity support and sendAllNotesOff method #239

Closed Bibiko closed 1 year ago

Bibiko commented 2 years ago

Hi Olivier,

first of all, pyo is an outstanding package!

I've added the option to set a specific hold mode for incoming MIDI note events used in a Notein object.

Possible hold modes: 0 := no hold (default) 1 := hold mode, new noteon event will be activate until the next noteon event with the same pitch, velocity sensitive 2 := onoff mode, new noteon event will be activate until the next noteon event with the same pitch, noteon velocity is set to 127 3 := single key hold mode, new noteon event will be activate until any next noteon event, if next noteon event has the same pitch a noteoff event will be sent, velocity sensitive 4 := single key onoff mode, new noteon event will be activate until any next noteon event, if next noteon event has the same pitch a noteoff event will be sent, noteon velocity is set to 127

In addition I've added the possibility to call from Python sendAllNotesOff and to set first/last velocity.

Comment?

All the best and cheers

Hans

belangeo commented 1 year ago

Hi Hans,

I finally took the time to cherry-pick your commits to master (all but the dark mode ones as I have already worked it out).

Thank you, it's really appreciated!

Olivier