|
Post by pianomandan on Sept 12, 2018 20:28:50 GMT
I’d like to create a note inverter around a specified pitch. I think I understand the overall idea of parsing incoming note data, doing some basic algebra to change the pitch, and then sending out new note on/offs, I’m just having some trouble getting up to speed with the syntax. Any help and hints is appreciated, thanks!
- Dan
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Sept 13, 2018 7:23:29 GMT
Hi pianomandan , OK, here is an example. Let's say you want to transpose all notes up by 12 semitones within the range C3 to B3. Use this table to get the hex codes for your range. For this example, C3 == hex 3C and B3 == hex 47. The hex for 12 is 0C (for transpose) # is it a note event? IF MT < A0 # is it within range? IF M1 >= 3C IF M1 <= 47 # transpose up by 12 semitones MAT M1 = M1 + 0C END END ENDRegards, Nic.
|
|
|
Post by pianomandan on Sept 13, 2018 8:10:19 GMT
That worked great, thanks so much!
If anyone is interested:
# is it a note on? IF MT < A0 MAT M1 = 81 - M1 END
|
|