midi: add option to disable outgoing note_on,vel=0 to note_off conversion
This commit is contained in:
parent
74faac7baf
commit
48402e277d
5 changed files with 14 additions and 6 deletions
|
|
@ -46,8 +46,10 @@ ignore_mtc = 'mtc' not in argv
|
|||
ignore_rpn = 'rpn' not in argv and 'nrpn' not in argv
|
||||
# option: parse active sensing
|
||||
ignore_active_sensing = 'active_sensing' not in argv
|
||||
# option: note off velocity
|
||||
# option: note off velocity (/note_on and /note_off instead of only /note and velocity 0 for note off)
|
||||
note_off_velocity = 'note_off_velocity' in argv
|
||||
# option: no auto note off (do not translate received note_on with velocity 0 to note off)
|
||||
no_auto_note_off = 'no_auto_note_off' in argv
|
||||
# option: list midi ports
|
||||
list_midi = 'list' in argv
|
||||
list_midi_exit = 'list-only' in argv
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ def send_midi(name, event, *args):
|
|||
m = [mtype, args[0]]
|
||||
|
||||
if mtype == NOTE_ON:
|
||||
if args[2] == 0:
|
||||
if args[2] == 0 and not no_auto_note_off:
|
||||
mtype = NOTE_OFF
|
||||
|
||||
elif mtype == PITCH_BEND:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue