How to map incoming MIDI notes to layou buttons

0 votes
asked Aug 8, 2019 in Advanced by espiegel123 (470 points)
Dan? Can you answer this? Is there a way to map a particular program change or note value or control value to a particular layout button?

1 Answer

+1 vote

Use Stream Byter to transpose incoming note/octave messages to unused CCs


I've had help from Nic of Audeonic (thanks, Nic!) to do this with an Stream Byter program. The trick is to transpose incoming Note On/Off messages to unused Control Changes, and map these to 12 buttons for Notes plus nine buttons for Octaves 0-8, which is the usual range. I used CC40-60 for the twenty buttons required.

Here's Nic's program:

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

9X XX 00 = 8X

IF M0 < A0

MAT I0 = M1 % 0C # calc current note (0-11)

MAT I0 = 28 + I0 # CC40 + current note into I0 (that's a lower-case L)

MAT I1 = M1 / 0C # calc current octave (0-10)

MAT I1 = 34 + I1 # CC52 + octave into I1

# CC on/off into I2

ASS I2 = 7F

IF MT == 80

ASS I2 = 0

END

# send the two CCs on channel 1

SND B0 I0 I2 # note CC

SND B0 I1 I2 # octave CC

# block the incoming note (if required)

# XX = XX +B

END

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

Works well, still testing it.

Stuart
answered Sep 24, 2019 by stuzog (240 points)
...