MIDI-OX User Forum (http://www.midiox.com/cgi-bin/yabb/YaBB.pl)
MIDI-OX >> Mapping Questions >> Filtering Out Low Velocity to send Nothing
(Message started by: playdoe9 on May 16th, 2014, 10:19pm)

Title: Filtering Out Low Velocity to send Nothing
Post by playdoe9 on May 16th, 2014, 10:19pm
I have a Steinbeg CMC-PD which I use to send midi notes to a lighting program. The problem is that the controller is a Velocity based pad. So the slightest touch to pads send the midi note.  There are Velocity curves for the pad but they all start "On at 1%", regardless of he curve, so the slight touch triggers the note.

I want to be able to filter out any velocity tap below a number...let's say 49. So any taps that have a velocity of under 49, won't trigger the note.

I tried playing with this. My midi map has

Input: Steinberg CMC-PD
Output: Steinberg CMC-PD   <-Is this right? I feel like it needs to get sent through MidiOx somehow

I tried setting up a Data Map:

#1
Input channel: 1
Type: Note On
Note Min: -1   <-Any Note
Note Max: -1  <-Any Note
Velocity Min:0
Velocity Max: 49  <-Anything under 49 velocity

Output channel: 1
Type: Note On
Note Min: -1       <-Any Note
Note Max: -1      <-Any Note
Velocity Min: 0    <-Play nothing!
Velocity Max: 0   <-Play nothing!

#2
Input channel: 1
Type: Note On
Note Min: -1 <-Any Note
Note Max: -1 <-Any Note
Velocity Min: 50      <-Any velocity above 50
Velocity Max: 127

Output channel: 1
Type: Note On
Note Min: -1
Note Max: -1
Velocity Min: 127      <-play it at full velocity
Velocity Max: 127     <-play it at full velocity


So this looks theoretically like it is working.  In my MidiOX output window is showing NoteOff for the button instead of note on unless it is a hard press.

In my lighting program, there is only one input available, the Steinberg CMC-PD. Shouldnt the input be MidiOx?

Also, my lighting program behaves as though the filter is not on.

Do I need a virtual port of some kind for the patch? That says the controller goes to MidiOx and then I select MidiOx from my lighting program?

Is there a way to say if the velocity is under 49 then do nothing? (instead of a sending a NoteOff.)

Title: Re: Filtering Out Low Velocity to send Nothing
Post by playdoe9 on May 16th, 2014, 10:42pm
So,I found I did need to send the signal through some kind of virtual patch. I couldnt get Midi Yoke to work so I installed LoopBe1

So In Midi Ox, my map settings are
Input: Steinberg CMC-PD
Output: LoopBe1

And in my lighting program, LoopBe1 showed up as a possible input. So that problem is solved.

The question that remains is this:
How do I make certain velocity values under 49 send NOTHING instead of sending a NOTEOFF.

Thanks

Title: Re: Filtering Out Low Velocity to send Nothing
Post by Breath on May 16th, 2014, 11:42pm
Go to Options/Data mapping and create a filter line
Any ...  Note On ... -1 ... -1 ... 0 .... 48
.......... Discard

Press OK
Perhaps save it.
Turn Map On (after OK)
Press OK

This filter will only apply if there is a link between a Midi In and Midi out so you have to have set up this in the Midi Port Routing window. It will be applied to all routings.

If you want it to apply to only one (or more) routings used the little square in the middle of the routing line and select the Data Map you just saved. In Options/Data Mapping you can turn off Turn Map On (after OK) and now you map will only be applied to that routing.

Note that using a range with the min = 0 is not recommended for anything else as many keyboards use NoteOn with velocity = 0 to be a Note Off message and this filter will result in hanging notes.

For your lighting console you should be OK.

Royce

Title: Re: Filtering Out Low Velocity to send Nothing
Post by playdoe9 on May 17th, 2014, 2:26am
Royce,

That was exactly what I was looking for. Discard.

The only problem now is that now the NoteOff function has a velocity of less than 49 so it is Discarded.

How do I keep the NoteOff function?

-Ben

Title: Re: Filtering Out Low Velocity to send Nothing
Post by Breath on May 18th, 2014, 2:14am
Hi Ben
When you say 'NoteOff' do you mean 'NoteOn' velocity 0?
In Hex
90 30 60  NoteOn
90 30 00 NoteOn but = NoteOff

80 30 55 NoteOff with release velocity of 0x50

If you are sending NoteOff (80) messages the data map should just pass them.

If you are sending 90 xx 00 Note on messages then just make your range 1 to 48

Royce

Title: Re: Filtering Out Low Velocity to send Nothing
Post by playdoe9 on May 18th, 2014, 4:58pm
Royce,

Ok That does work, but now it is also sends the NoteOff from the notes that are pressed with a velocity below 49 instead of discarding them.

I am not sure that is a problem necessarily that it is sending NoteOffs.

Title: Re: Filtering Out Low Velocity to send Nothing
Post by Breath on May 18th, 2014, 8:57pm
Hi Ben

Firstly, is it sending NoteOff (128 or 80 in hex for channel 1) or NoteOn  with velocity = 0?

What does sending extra NoteOff (or NoteOn with velocity = 0) do that is a problem?

There is no way to distinguish a NoteOff message that is paired with a NoteOn  message with a velocity that is less than 49 and one that is paired with a NoteOn that had a velocity greater than 49 without writing a special program that keeps tabs on what has already been sent.

Usually you would just let the extra NoteOff pass through and because the receiving instrument hasn't seen a note, it ignores it.

The only problem here is if a second NoteOn 'Note2' with that note number is received before the NoteOff  for Note1 is received.
As the NoteOff for Note1 would kill Note2 even if you were still pressing the key.

I can't see how this would occur in a normal circumstance with a single Midi controller as you have to release the key/switch before you can strike it again.

All the best
Royce



MIDI-OX User Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.