Convert midi note to specific cc controller with specific value

Hi

I want a to convert a specific midi note, with a specific value, on a specific channel To a specific cc controller with specific value

i.e. 90 35 7F ch1 TO CC 16 val 65

so I can clone modify and build a table like this

91 35 7F ch2 TO CC16 val66

92 35 7F ch3 TO CC16 val 67 etc

I want to build a truth table to convert abstract note to cc

Hi, so you want to do this all in rules with a single translator rather than a translator for each possible note?

I'm trying to figure out the logic behind your request.  I often use math calculations to convert tables if there are patterns however seldom try to us global variables as tables. If I do, it is usually a number of if statements

Say you want to convert incoming notes to a different note where incoming note is pp and outgoing in qq

qq=-1

if pp==1 then qq=2

if pp==2 then qq=23

If you walso want to include channels, you first evalueate the channels with one set of if statements and then the notes with another set of if statements.

At the beginning of the if statements I usually set the output to something non-sensical (like -1) so that if it doesn't pass any of the tests you can put something like this to abort

if qq==-1 then exit rules, skip outgoing action.

Is this the type of thing you are talking about?

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

Then I was thinking, since the note mostly stays the same and the channel changes, I could do it by setting ch# to variable "pp" like this but can't get it to work

INCOMING

CH "pp" NOTE "qq" Vel 127

--------------------------------------------------------

RULES

Here is where I need help...

if qq==35 then Goto ???? next?

if pp==0 then (output cc 16 with value of 14=variable of 00) how to do this

if pp==1 then (output cc 16 with value of 15=variable of 00) how to do this

if pp==2 then (output cc 16 with value of 16=variable of 00) etc...

--------------------------------------------

OUTPUT

Control Change

Channel 16

CC# 16

Value "00"

THEN exit rules and execute action

--------------------------------

OK something like this will work:

Incoming: Raw oo pp qq

Rules:
// This will look for either note on or note off
// it turns out if it is a note message
// and you compare with 0xe0 it will the value will
// be 0x80 whether note on or note off

rr=oo&0xe0
if rr!=0x80 then exit rules, skip outgoing action
// OK it is a note, lets convert it.
// determine incoming MIDI channel
oo=oo&0x0f
// look for CH2 only if you don't care which channel you can comment out this rule
if oo!=1 then exit rules, skip outgoing action

// Lookup table starts here
// Compare note number and set output and value

tt=-1
// CC

if pp==0 then tt=16
// Value
if pp==0 then qq=14
// CC
if pp==1 then tt=16
if pp==1 then qq=15
if pp==2 then tt=16
if pp==2 then qq=16
// No conditions applied abort
if tt==-1 then exit rules, skip outgoing action
// End of lookup

// Set as CC for output
// Or channel with 0xb0 which is a CC message
oo=tt|0xb0

Outgoing Raw: oo tt qq

Enjoy!

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

Thank you SO much I am working on this

I will get back to you

This is not working let me explain as clear as possible please forgive my ignorance.

I have been working on this This is what I am trying to do.

I use DMXIS vst in Ableton, DMXIS is controlled by channel 15 and 16: ch 15 note# with velocity of 127 changes banks, ch 16 note# with velocity of 127 changes presets. I have also figured out a way to control it by cc cc# = bank, value = preset

however, I think the better way is to use note data and a simple translator that i clone and modify for each button or better yet 1 preset or translator for each row cloned and modded for each row, since I hard code the same note# for a whole row.

So I am controlling DMXIS vst with APC40 mk1

Each button of the APC40 6 x 9 matrix should output both a note on ch15 to select bank and a note on ch16 to select preset.

Each row of buttons in the APC40 produces the same note number, and it is the channel that changes as you move from left to right in a row of buttons

Every row is a different note # so I will have to copy and make a new preset or translator for each rows different note#

Truth Table for 6 x 8 buttons to expected output

53 ch1 53 ch2 53 ch3 53 ch4 53 ch5 53 ch6 53 ch7 53 ch8 buttons ROW 1

0 0 0 0 0 0 0 0 output note# on ch 15 hardcoded 0 1 2 3 4 5 6 7 output note# on ch 16

-----------------------------------------------------------------------------------------------------------

54 ch1 54 ch2 54 ch3 54 ch4 54 ch5 54 ch6 54 ch7 54 ch8 buttons 8 ROW 2

1 1 1 1 1 1 1 1 output note# on ch 15 hardcoded

0 1 2 3 4 5 6 7 output note on ch 16 preset

---------------------------------------------------------------------------------------------------------------------------------

55 ch1 55 ch2 55 ch3 55 ch4 55 ch5 55 ch6 55 ch7 55 ch8 buttons ROW3

2 2 2 2 2 2 2 2 output note# on ch 15 hardcoded 0 1 2 3 4 5 6 7 output note# on ch 16

-----------------------------------------------------------------------------------------------------------

56 ch1 56 ch2 56 ch3 56 ch4 56 ch5 56 ch6 56 ch7 56 ch8 buttons ROW 4

3 3 3 3 3 3 3 3 output note# on ch 15 hardcoded 0 1 2 3 4 5 6 7 output note# on ch 16

--------------------------------------------------------------------------------------------------------

57 ch1 57 ch2 57 ch3 57 ch4 57 ch5 57 ch6 57 ch7 57 ch8 buttons ROW 5

4 4 4 4 4 4 4 4 output note# on ch 15 hardcoded 0 1 2 3 4 5 6 7 output note# on ch 16

--------------------------------------------------------------------------------------------------------

52 ch1 52 ch2 52 ch3 52 ch4 52 ch5 52 ch6 52 ch7 52 ch8 buttons ROW 6

5 5 5 5 5 5 5 5 output note# on ch 15 hardcoded 0 1 2 3 4 5 6 7 output note# on ch 16

ROW 7 track select NOT USED NOT PROCESSED

maybe all i need is single translator for a row then i can clone and modify for each different row, this may be best since row7 with note #51 is not included, and should not be processed, this row is the layer select row for another project or maybe a "if then" cloned for each button would be better

Thank you SO much for your help if I am still unclear please let me know

So you want the bank numbers as rows and output bank number as note on MIDI CH 15 and the columns as presets and output the column number as a note on MIDI CH 16?

So row 1 column 1 outputs note 0 ch 15 , note 0 ch 16

Row 2 column 1 outputs note 1 ch 15 and note 0 ch 16

Row 6 column 9 outputs note 5 on ch 15 and note 8 on ch 16?

Am I getting it?

If so this is fairly straight forward and I can help from there.

Hi, give this a try.

We capture the column number based on the incoming MIDI channel and put that out as a note.

We capture the row number by the note number but adjust them all down to start at 0.

I have separate calculations for the Scene Launch buttons that follow a different numbering convention.

I have it set up to send CC\'s on MIDI CH 16 iwht the CC as the Row numbr and the column as the value.

If yo look at rules you can change this to a different convention if you want Note on MIDI CH 15 for Row and Note on MIDI CH 16 for column.

Have fun!

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

Attachments:
1584136748500_APC-40-to-DMXis.bmtp

Hi, I think I accomplished my goal by giving you some examples so you could take things forward from there.

Steve

typo? you mean Row 6 column8, not 9, outputs note 5 on ch 15 and note 8 on ch 16, right?

Yes, this is correct, and I know you like math and rules but be please aware, row 7 note 51(select row) will be the layer select row for my next shift layer project and \"can not be processed\", it will create 9 shift layers and utilize the row notes 0 thru 47 and 65 thru 127 to max out the possible combinations of bank / presets for a 9 x 8or9 matrix having 9 layers of bank / presets.

Also, after I build the layers project, I may want a future page layer that has 2 or 3 or 6 rows with the same note# which would give me 16 or 24 or even 48 presets for a given bank. this can be seen at bottom of post

This is why I thought it best to \"hardcode\" the row bank note#, so I could build future banks easily,

1 bome preset with hardcoded row note# = bank with 8 presets, so no matter how many presets I want for a bank, I could do it in multiples of 8. I wasn\'t sure what method you had in mind, and did not want to reduce my possibilities with a rule that does not allow the layers.
Also, I am not sure what to do with column 9 (nothing I guess) it is an oddball, but does not matter.

Anyway, I think all I need is 1 preset then I can copy, modify and hardcode the common row note# for each row to allow for how many presets I want in a bank.

Then I could just hardcode the row note# to build out all layer pages after I make the layers preset. other wise, if it is a single button = single output translator, I will have to eventually copy the translator, mod and paste 648 times which may take me a while, but whatever it takes and is easiest for you. whatever you think

Truth Table for 6 x (9) buttons to expected output should not matter just listing to be sure it doesn\'t interfere

x = \"does not matter\" just wanted to get the most presets and did not really want to waste 6 buttons if i don\'t have to

I just realized the 9th column being oddball would not matter anyway, because being a different note number than the rest of the row, column9 would automatically become a bank with 1 preset and thats ok, just didn\'t want to waste the 6 column9 buttons if I don\'t have to, but I was more concerned of column9 interfering with your process if you were going to use a rule, what ever that may be.

column 9 does not follow suite see here; I have updated the truth table to reflect it .

6 x 9 Truth Table
actually apc40 is 9 x 9 including the 3 small button rows at bottom ( # 48, 49, 50) page select row note# 51 does not count

x = \"does not matter\" just wanted to get the most presets and did not really want to waste 6 buttons if i don\'t have to

. Column 9
53 ch1 53 ch2 53 ch3 53 ch4 53 ch5 53 ch6 53 ch7 53 ch8 82 ch1 buttons ROW 1
0 0 0 0 0 0 0 0 0 out note# on ch15
0 1 2 3 4 5 6 7 x out note# on ch 16

-----------------------------------------------------------------------------------------------------------

54 ch1 54 ch2 54 ch3 54 ch4 54 ch5 54 ch6 54 ch7 54 ch8 83 ch1 buttons ROW 2

1 1 1 1 1 1 1 1 1 out note# on ch15
0 1 2 3 4 5 6 7 x out note# on ch 16
---------------------------------------------------------------------------------------------------------------------------------

55 ch1 55 ch2 55 ch3 55 ch4 55 ch5 55 ch6 55 ch7 55 ch8 84 ch1 buttons ROW3

2 2 2 2 2 2 2 2 2 out note# on ch15
0 1 2 3 4 5 6 7 x out note# on ch 16

-----------------------------------------------------------------------------------------------------------

56 ch1 56 ch2 56 ch3 56 ch4 56 ch5 56 ch6 56 ch7 56 ch8 85 ch1 buttons ROW 4

3 3 3 3 3 3 3 3 3 out note# on ch15
0 1 2 3 4 5 6 7 x out note# on ch 16

--------------------------------------------------------------------------------------------------------

57 ch1 57 ch2 57 ch3 57 ch4 57 ch5 57 ch6 57 ch7 57 ch8 86 ch1 buttons ROW 5

4 4 4 4 4 4 4 4 4 out note# on ch15
0 1 2 3 4 5 6 7 x out note# on ch16
--------------------------------------------------------------------------------------------------------

52 ch1 52 ch2 52 ch3 52 ch4 52 ch5 52 ch6 52 ch7 52 ch8 81 ch1 buttons ROW 6

5 5 5 5 5 5 5 5 5 out note# on ch 15
0 1 2 3 4 5 6 7 x out note# on ch 16

ROW 7 note 51 track select NOT USED and NOT PROCESSED

small button rows are note# 48 49 50
---------------------------------------------------------------------------------------------------------------------------------------------

Example of a future possible 16 preset bank using the same hardcoded note# for both rows

-----------------------------------------------------------------------------------------------------

29 ch1 29 ch2 29 ch3 29 ch4 29 ch5 29 ch6 29 ch7 29 ch8 58 ch1 buttons ROW Y

13 13 13 13 13 13 13 13 13 out note# ch15 hardcoded
0 1 2 3 4 5 6 7 x out note# on ch16

--------------------------------------------------------------------------------------------------------------------

30 ch1 30 ch2 30 ch3 30 ch4 30 ch5 30 ch6 30 ch7 30 ch8 47 ch1 buttons ROW Z

13 13 13 13 13 13 13 13 13 out note# ch15 hardcoded
8 9 10 11 12 13 14 15 x out note# on ch16

is this more clear? any questions

Thank you so much you ROck!