Can we combine NoteOn and NoteOff translators?

pedro.estrela

2020-03-11 10:55:19

Hi

All Pionner devices send NoteOff commands as regular NoteOn with velocity=0.

I appreciate that this is invalid MIDI, but it is quite simpler as then there is only "Note" messages.
https://github.com/pestrela/music_scripts/blob/master/ddj/1%20MIDI%20codes/DDJ-1000RB%20-%20MIDI%20Messages.pdf

----
On Bome, the NoteOFF trigger already makes the exception to trigger on these NoteOn+vel=0 messages.

However the NoteOn trigger ignores them.

Could we further relax this to the NoteOn+vel=0 trigger as well?

thanks

PS1: On the output side this is not a problem. I always send NoteOn+vel=0 messages using a variable.
PS2: This would prevent massive duplication of my code since I cannot use "timer-zeros" as well:
https://www.bomeloft.com/support/kb/can-timer-zero-events-be-injected-before-any-already-buffered-messages

 

Steve-Bome Forum Moderator

2020-03-11 15:45:55

Hi,

There are a few ways to handle this:

Method 1) Use raw MIDI looking for either note on or note off.

Incoming oo pp qq
// There may be otther rules for MIDI channel, note number etc that you want to put here
// IE Look for incoming channel 1
// mask upper nibble

rr=oo&0x0f
if rr!=0 then exit rules, skip outgoing action
// Look for note 25
if pp!=25 then exit rules, skip outgoing action

// look at status byte (Note on or Note off)
// mask lower nibble
rr=oo&0xf0

if rr!=0x90 then goto skip next rule

if qq==0 then goto \"note off\"

if rr==0x90 then goto \"note on\"

if rr==0x80 then goto \"note off\"

// otherwise note note message so abort

exit rules, skip outgoing action

label \"note on\"

// do note on stuff here

goto \"done\"

label \"note off\"

// do note off stuff here

label \"done\"

// Do post processing stuff here

Method 2 use a variable for velocity with note-on to indicate note off

In this method we trick MT Pro that doesn\'t normally allow an incoming velocity of 0.
I have not tested this method.

Incoming note on MIDI CH1 with any note set to pp and any velocity set to qq

Rules:
// go to note on stuff
if qq==0 then goto \"note off\"
// otherwise \"note on\"

// Do note on stuff

goto \"done\"

label \"note off\"
// Do note off stuff

label \"done\"

====
I hope this helps!

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

Steve-Bome Forum Moderator

2020-03-11 16:32:08

comment

Hi, use method 1. Method 2 sees anything with 0 velocity as a note-off message.

pedro.estrela

2020-03-13 17:11:44

comment

Thanks for the quick reply. I've been doing method1 sucessfully. Biggest annoyance is that it pollutes the log a lot.

Florian Bome

2020-05-07 15:31:30

Hi Pedro, again, thanks for your great suggestions. This one is already on our feature request list, and I've just bumped up its prio.