Convert CC to Program Change? Increment?

dburns

2010-12-04 10:45:39

Hi. I've searched, but couldn't find any info on this. I thought it would be a pretty common task for Bome MT, so please point me to a solution if you can.

I'd like to use a Korg nanoKontrol to send Program Change and Up/Down messages to a Kontakt 4 Multi Bank. I'd like one button to send UP, or Previous, and another button to send DOWN, or Next, PC messages. This would let me scroll through my presets. I need a Translator to change an incoming CC into a Program UP/DOWN increment, and also to send a specific BANK/PRESET message.

Thanks for your help!

Attigo

2010-12-04 20:46:20

CC messages have the first byte of B0 - BF, you will need to convert this to a Program Change message by making this C0 - CF. Program Change messages only have 2 bytes, so it should be C(x) (0-127), just forget the Note assignment (second byte). Do you understand?

So to easily convert the CC message, for example B0 00 xx, then your rules should look something like this...

Code: Select all


Translator 0: Convert CC to PC
Incoming: MIDI oo 00 pp
Rules: oo=oo+16
Outgoing: MIDI oo pp

B0 is a hexadecimal value and as a decimal it is 176, whereas C0 is 192, this is why I am adding 16 to the first byte. The second byte is lost in the translator, but the incoming velocity message (third byte) is passed through under the (local) variable 'pp'.

I hope this helps...

Scott

dburns

2010-12-05 02:56:36

Thanks Scott.

It sort of makes sense. :)

It's been a long time since I worked with Hex or wrote any code. And, I'm very new at writing a Translator, though I've used Bome MT for some time for routing MIDI.

I'll get the manual out and study this a bit. It should make sense shortly.

:)

Geo50

2016-03-06 06:46:03

I think that this concept is very useful as well. I am trying to get a key press to send a CC up message in increments of 1. One keyboard press would translate to a CC with a data value. A second press would send the same CC with a data value that is one count higher. For example;
letter z keyboard press = send B0 00 00
letter z keyboard second press = send B0 00 01
etc.
Of coarse I would want to program a second translator for a key to de-increment the cc data.

I am not sure, but I think I may need to create a translator that will convert the key press into a cc message. Send that message to a virtual midi cable which sends it right back into MidiTranslator. Then I would need to receive this midi message and add rules that would create the increments. Florian hinted to me in an email that I might use the "ga" command.

I have successfully created </> type rules, but I need some help here.

Could someone give me a short bit of code or guide me to the forum where the answer may reside?

Thanks for any help,
G
My purchased MT is v1.72 because I am on Snow Leopard running a solid DAW. Heard that 1.8 does not work on OSX 10.6

DvlsAdvct

2016-03-07 15:36:18

Hi Geo50

You only need one translator, which receives the keystroke and sends out the CC message. Use the following rules:

Code: Select all

ga=ga+1
if ga>127 then ga=127
And your outgoing message would be, following your example, B0 00 ga

Does that make sense?
Jared

Geo50

2016-03-07 16:43:17

Thanks Jarad. I have found a degree of success already. The pathway worked well
Keyboard --> Translator 1( key press to CC message) -->Mac IAC Midi Port --> return to Translator 2 (receive message from translator 1+rule) -->Out to MidiTran virtual cable --> Ableton(Midi track&remote on + value scale selected).

The issue I am working with is the increment values now. A typical Ableton CC is measured 1-100. So sometimes a key press will reflect no change on the Ableton cc value bar. I will try some tests with my rules to see what I find.
I am learning, so I will try to understand both perspectives
Key press scaled to 1-100
Key press to all 127 presets

Please feel free to share any rule code. This opens up some great capabilities for live switching for me! :D

Geo

DvlsAdvct

2016-03-07 17:08:26

You have success, but it's a much more complicated code, with more variables and things that can go wrong. I'd recommend scaling it back to simpler process, if you can. The exception is if you are using multiple devices to control that parameter, and then what you have works well.

Geo50

2016-03-07 17:18:41

Yes, in using your rule when sending a CC, I get uneven increments in the Ableton slider 1-100
It moves with each press 0,1,2,2,3,4,5,6,6,7,8,9,9 etc

Also not quite sure why a midi message of C0 00 is showing as a PitchBend message in Ableton. Do you think I should try a MSB/LSB message to change programs instead. I am sending specifically to BS-16 Sf2 player, which says it receives PC messages.

Thanks again for the advice...and the GREAT software!

DvlsAdvct

2016-03-07 17:27:10

Oh, yeah, that could happen. We can also run some math to have the increments work out, but if what you have works just keep it. It is also more expandable because MT is listening for incoming signals and then increasing the increment.

C0 00 is not a pitch bend message, so I have no idea why Ableton is reading it that way. MSB/LSB shouldn't matter for program changes. Does BS-16 SF2 not respond correctly when used within Ableton?

Geo50

2016-03-07 17:37:02

Ok, I am happy to have some connectivity. I would like to figure my math increments....should I try to send
ga=ga+1.27 ?

Yes BS-16 behaves odd at times. I have been able to get it to read PC messages from my Behringer DJ keyboard using a knob. I will analyze the data transfer

I do run several devices to control. 2 DJ keyboards, a usb number pad, and a Bluetooth keyboard.

Cheers,
Geo

Geo50

2016-03-07 17:45:46

Interesting.
The midi rules would not accept a decimal value of 1.27

My Behringer Knob was sending a simple cc value on ch1 cc10. The Behringer display shows increments of 0-127 and if I am careful, I can stop on the exact value.

Goal for me is 1 button press = 1 increment to the next program

DvlsAdvct

2016-03-11 01:40:29

Yeah, 1.27 won't work because MIDI Translator only works with integers, but we can convert this using some simple rules.

Code: Select all

Translator 1: CC Conversion
Incoming Message: MIDI Message
Control Change
Channel 1
CC 10
Value: Any, set pp to value
Rules:
qq=pp*100
rr=qq/126
Outgoing Message: MIDI Message
Control Change
Channel 1
CC 10
Value: rr
Let me know if that does it for you.