Soundplane and BMT

kev

2020-05-21 14:48:18

Hi! I've been an avid user of BMT for a number of years now, but mainly for lower level translations. I recently acquired a Madrona Labs Soundplane which is an expressive controller that sends out OSC messages in 3 dimensions. The client app for the Soundplane has a built in osc to midi translator and outputs midi, both in MPE mode and single channel mode.

I generally use the OSC output when possible but I'd like to explore using the Soundplane as a flexible midi controller in Ableton, which only has single channel midi support at the moment. Here are a couple of issues that I'd like to overcome using BMT but I could use some guidance.

1. Convert the pressure output to a CC with highest value priority

The Soundplane client only outputs polyphonic key pressure which ableton doesn't recognize. It's simple enough to convert poly key pressure to channel pressure using a translator but for some vst's like my orchestral libraries, I can only map cc's to sliders (i.e. dynamics slider). I am able to translate this poly key pressure to a single channel cc message but it always jumps in value to the next key press, which is generally lower value, as pressure always starts from 0, even when the earlier key press is still outputting a high pressure value - which results in the cc being held high and then jumping down to a low value when I bring in another note. What I'd love is for there to be some way to compare the incoming pressure value with the existing one being output and ignore it if it's lower, but take over when it's higher. Sort of a universal Highest Value priority on simultaneous key presses.

2. Have some sort of release time, or smoothing to the CC value

Assuming #1 can be done (of course it can, it's BMT!) when I release a key that had the pressure at a high value, the cc value jumps down to 0. I'd love to be able to have a release value that slows ramp down to 0. Ideally this ramping down cc value would still be used in the Highest Value priority from #1. I think I've seen some other examples of CC smoothing via delays in the forum so I will keep poking around.

3. Translator to help ensure note off data

One of the downsides of the soundplane's midi output is that I find that I have occasional stuck notes, from a lack of a registered note off message. It generally happens with some quick on-off messages. I would like to perhaps leverage the pressure data so that when it falls below a certain value, that BMT would transmit a note off message for that key press. Perhaps the best way to do this is to have the soundplane in midi MPE mode and when the pressure value for that particular channel falls below a certain threshold, a note off message is sent for all notes on that channel? Otherwise, I'm not sure how it would be note value aware. In fact, I'm not sure how to do this at all but if there's a way to ensure a note off, that would be huuuuuge for me because it's not a reliable midi controller right now and I have to edit out stuck notes.

All of these midi messages would have to be output from BMT as single channel midi messages as Ableton doesn't have any sort of MPE support yet. Any guidance on how to best tackle these issues would be greatly appreciated!! Thank you so much for an amazing product!

Kevin

Steve-Bome Forum Moderator

2020-05-21 15:18:52

Hi, this looks like quite a project.

For number 1, you monitor the highest polyphonic pressure and store it in a global variable (to be used later as channel pressure)  in rules, if the next note is lower pressure, you use ignore the next polyphonic pressure and use the stored value instead (as channel pressure). I think you get this part.

The harder part is when do you \"reset\" th channel pressure?  I assume you want to do this if no notes are playing. So what you would need to do is create a bitmap of all notes in the down position. Since global variables are 32 bit length you would need 2 global variables for a 61 key, keyboard and 3 global variables for an 88 key keyboard.  The way it would work is when you push a key (note-on) you set a bit, when you release a key (note-off) you clear it.   On the key pressure evaluation translator, you look at the global variables and if they are 0 (meaning no notes are pressed), you use the new polyphonic pressure as your new \"highest\" channel pressure and reset the highest channel pressure variable again.

 

For number 2

You can use a repeating timer to decrease the CC value over time on note release. You manipulate the decrement value and timer duration to change the smoothness.

 

For number 3

Yes, you can monitor current channel pressure (from #1) and when it falls below a certain threshold, send note-off message. Keep in mind that the key pressed bitmap discussed also in #1 will have to also be updated for a note-off message. Also the highest channel pressure variable will need to be reset to 0 (if all notes are off).

 

I hope this helps!

 

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

 

kev

2020-05-21 15:38:03

Thank you for your quick response Steve! This is definitely getting me on the right track (or at least not down a fruitless path haha).

I just had a couple follow up questions before I try to tackle this with your advice. One, is there somewhere in the documentation or a similar project file where I can follow this instruction:

"you monitor the highest polyphonic pressure and store it in a global variable (to be used later as channel pressure)  in rules, if the next note is lower pressure, you use ignore the next polyphonic pressure and use the stored value instead (as channel pressure). I think you get this part."

Ironically I think this is the part I don't get haha. I mean I get what I need to do (that is very clear, thank you!), but how to actually accomplish this is where I tripped up so far. I think I just need to read up more on global variables and rules.

For this answer:

"Yes, you can monitor current channel pressure (from #1) and when it falls below a certain threshold, send note-off message. Keep in mind that the key pressed bitmap discussed also in #1 will have to also be updated for a note-off message. Also the highest channel pressure variable will need to be reset to 0 (if all notes are off)."

If I'm monitoring the channel pressure for the note off message, wouldn't that hold a stuck note until all current notes are released? I would have thought that the pressure would have to be monitored for each individual press, in which case it probably needs to be on a channel per note basis which probably means I have to at least send midi to BMT in MPE mode even if I output to ableton on a single channel? Unless this is exactly what you are telling me or that I'm grabbing that pressure information on a per channel basis before the aggregate highest value channel pressure? I have a feeling I'm not fully understanding and what you advised me to do is correct but I just wanted to make sure :)

Thanks so much for your help. I'm not going to tackle the "resetting" of the channel pressure or the repeating timer until I can figure out the first part haha

Kevin

Steve-Bome Forum Moderator

2020-05-21 16:08:15

For monitoring key pressure:

Notice on incoming we are looking at any channel, any note and storing the largest of any of these

Incoming : Polyphonic Key Pressure on any channel any note set to qq

// This will look at incoming polyphonic key pressure and if greater than the max, send the max

// If less than max then last max is sent.

if qq>ga then ga=qq

// End of Rules
-------
Outgoing: Channel Pressure on MIDI CH 1  value ga
Options: Swallow
------

If I'm monitoring the channel pressure for the note off message, wouldn't that hold a stuck note until all current notes are released? I would have thought that the pressure would have to be monitored for each individual press, in which case it probably needs to be on a channel per note basis which probably means I have to at least send midi to BMT in MPE mode even if I output to ableton on a single channel? Unless this is exactly what you are telling me or that I'm grabbing that pressure information on a per channel basis before the aggregate highest value channel pressure? I have a feeling I'm not fully understanding and what you advised me to do is correct but I just wanted to make sure :)

Channel pressure messages are independent of note-on note-off messages. You might be thinking of velocity. Note-off messages should still turn off notes.

 

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

 

kev

2020-05-21 16:35:00

Thanks Steve! I\'m going to tackle the high pressure value output first as I take this step by step. Then I\'ll look into the \"resetting\" via global variables.

For the pressure/note-off connection, I was hoping to do this because sometimes the note off message from the soundplane is not registered by BMT. I wanted to use per note pressure to send a note off message below a certain value to ensure there was a note off message for each individual note, even if BMT registered the actual note off message from the soundplane.

In practical terms, I was hoping that I could press an initial note, have it setting the high pressure value, press another note that would be ignored as far as pressure goes because it was lower than the existing high pressure value, but that when the second note\'s pressure fell below a certain value, that it would be sent a note off message for just the second note, while the first was still being held down and note on. I hope this makes sense.

In any case, I\'ll do some more work and report back. Perhaps this will become irrelevant once OSC support comes to BMT :)

Thank you so much for your guidance!

 

Kevin

Steve-Bome Forum Moderator

2020-05-21 16:47:54

Hi Kevin,

In order to send note off messages when going below a certain threshold, you should be able to track the last note played in a global variable to determine which note to send the note-off.  I'm not sure why note-off messages are not getting through. MT Pro catches all MIDI messages but is is up to the user to determine what to do with them.

Is your Soundplane not sending note-off sometimes?

 

 

kev

2020-05-21 16:53:42

Yes, I think that's precisely it. I feel like the osc to midi translator in the Soundplane Client doesn't send note-off sometimes, which is why I'd like to "help" it with BMT. The only thing I could think to use was the pressure value of each individual key press and leveraging off of that to send targeted note off messages.

This is definitely not an issue with BMT, but more of an issue with the Soundplane midi output that I'd like to try and remedy by using BMT. Thanks Steve!

Steve-Bome Forum Moderator

2020-05-21 18:01:36

comment

Yes, it is often difficult to "make up" outgoing messages in absense of an incoming message. Looking at channel pressure threshold might be a good idea, however if you are ramping it down with a timer, this could be problematic if there are note that you still need played while it is under the pressure threshold.

kev

2020-05-21 18:31:07

comment

Understood! If I need to sacrifice the ramp down to eliminate stuck midi notes, then that's a trade off I can live with. But I'll tackle this one issue at a time. Thank you so much! Hopefully OSC support in BMT or MPE support in Ableton comes out before I can even finish this haha.

Steve-Bome Forum Moderator

2020-05-21 20:17:14

comment

OK, if you don't like programming, I'm available for hire. Reach out to me via email.

kev

2020-06-03 20:29:49

nothing was quite satisfactory, so I got rid of the soundplane :)

Not a shortcoming or failing of Bome Midi Translator by any means.