Program Changes using a Fader

Greetings,

I have an use case that I’d like to explore to create for a Preset and Translators.

Part of what I’m trying to get around is the midi specification which expects a Program Changes to be one shot value from a switch or button. Instead I'd like to leverage existing faders to initiate the Program changes.
It seems like a common ask.

Before the Program Change I will need to choose a destination Bank Select (MSB /LSB) like this:

|-MSB--||--LSB--||--PC--|

B0 00 22 B0 20 08 C0 {nn} ; Midi Ch. 1 Bank MSB set to 22h and LSB set to 08 followed by PC <fader>.

Instead of "nn" being a static value, I’d like to dynamically set the value of “nn” via a fader (0-127) from one or more faders as needed. At the moment the fader controller midi implementation only permits Patch Changes to be transmitted via a button. A button may only have one value per patch change.

The outcome I’m looking to do assign the fader to permit variable patch changes instead. That way the fader can “sweep or increment/decrement” through the selected Bank to audition each patch one by one.

In the event that the fader is to fine, using two faders is not out of the question. Splitting the first 0-64 program change values fader1 might provide a bit more granularity. Fader2 could be assigned to 65-127 if needed.

What I’ve read so far is that a Program Change messages must come “after” a valid Bank Select message is issued, then a patch change value will be honored or actually made. Does it matter if an intervening unrelated Channel Message appears after the Bank Select and before the Patch Change is issued?

I'm wondering if its safer to include the Bank Select Bytes every time a Program change is transmitted from the fader. If so, each patch change string will require “six+1” preceding bytes to first before the data value.

Ultimately, I’d like to commit one or more faders to an individual midi channel to effect bank/program changes per channel. If necessary, controller buttons could also be used set the Banks (CC0 and CC32) before an associated fader moves.

Would appreciate any guidance on structuring the preset, translators and any rule gymnastics to exercise the proof of concept.

There are other possibilities I can be imagine with MTP. Like assigning two buttons, one to increment the Program Change value while the other button decrements the program change value.

I'd like to explore both approaches for cases where a fader is not available on the control surface.

Gratefully, Dan

Hi Dan,

Most MIDI software will take a program change at any time and remember the last bank it is on. With that said, the attached will just send them together in one message anyway. (since a few require PC to be the next message after Bank Change).

I\'ve set up the project with the global variable ga as the MSB of the bank number you want and gb as the LSB.

The translator just looks at the incoming CC, then sends the bank change and PC in one MIDI stream, 8 Bytes (Bank MSB 3 bytes, Bank LSB bytes and PC 2 bytes).

If you want another knob or button to manage the next bank number just set up additional translators that do nothing but change the global variables ga and gb.

 

Actually the video you shared with me, Johans had a knob set up to do exactly what you were looking for. I\'m sure he set it up in MT Pro and uploaded it to BomeBox.

 

Have fun!

 

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


Attachments:
1580614115067_Fader-to-PC-2020-02-01.bmtp

Thank you Steven, I'll practice with the code snippet and provide some feedback on my findings.
Gratefully.

Sounds good, Dan!

And doing PC increment and decrement with incoming notes is easy with MT Pro. Similar to fader but you just increment or decrement a global variable in rules prior to sending out the MIDI message instead of using the fader velocity.

 

 

Hi Dan, did this work out for you OK?

Gave me some ideas on how to build a template and structure a few global variables. I’m reviewing the source code from the *.bmtp examples that are included after install. I’ll use them to build a cookbook and tool-kit when need. At the moment I"m working through the Gestures code with the three button pedal example to appreciate how to timers can be used to record up/down and frequency state of a control. You know, that’s not a bad idea. The BMPro Cookbook by Steve C. I’d buy it in a heart beat. :slight_smile:

Hmm maybe I should pursue a cookbook in between support and tutorial activities. Hope you are having fun with gestures. I’ve played with them for a while and am considering updating my methodology to make them even easier to set up. Maybe including in the global variable itself, the gesture type (note or CC or something else) and MIDI channel instead of setting that up within the gesture manager translators.

Right now, I just define the number but not type or channel. I use rules in the gesture manager translators to figure it out whether it is a note or cc and what channel from there.

So right now 95 (just means it could be note or CC 95 on any channel). But if I encoded it further to include the other info into a 32 bit global variable, I might get away with making the management rules more generic.