StreamByter: Set Channel by Note
Here’s a StreamByter script for changing channels from a keyboard that doesn’t have onboard channel change, such as the NanoKEY Studio. Play a note from A7 to C8 to change the channel.
# Script to change midi channel from keyboards that
# don’t have the ability to change it on-board
# A7 = ch1, A#7 = ch2 ... C8 = ch16
IF LOAD
ASS L0 = 0 #Start with no channel offset
SET LB0 S—
SET LB1 S—
END
# Detect note A7 or higher
IF M0 >= 80
IF M0 <= 9F
IF M1 >= 69
# Set channel to offset above A7
MAT L0 = M1 - 69 #L0 = offset from A7
MAT L1 = L0 + 1 #to display channel starting at 1
SET LB0 SCH.
SET LB1 L1 +D
XX = XX +B #block A7 or above from sounding
END
#Display the note and channel if below A
IF M1 < 69
SET LB0 M1 +N
SET LB1 L1 +D
END
END
END
# Add the channel offset
MAT M0 = M0 + L0
# Display cc and value if cc message
IF MT == B0
SET LB0 M1 +D
SET LB1 M2 +D
END