I’m having a hard time figureing out how to make metaevents work how I need them to. I would like to know how to send two cc’s at once from an encoder or a button, and also how to send an nrpn stream. I have looked at all the examples I can find, but I just dont understand assembler. If someone could help me out with some code I would really appriciate it.
Well i dont want to do anything too fancy, and I thought this is why TK has built in the meta events section. I just want all the normal functions of the mb64e with a couple of custom things.
I always liked teachers that made me figure stuff out on my own. I finally got it. Im sure its not the most elegant technique, but it works for what I need.
Thanks.
;;MidiChannel 9 & 10
MB64E_META_Handler_00
;;Send first midi CC with fixed value
movlw 0xB8 ; send 0xb0 (Controller Header, channel 9)
call MIOS_MIDI_TxBufferPut
movf MIDI_EVNT1, W
call MIOS_MIDI_TxBufferPut
movlw 0x7F ; send 127
call MIOS_MIDI_TxBufferPut
;;Send second midi CC with incremental value
movlw 0xB9 ; send 0xb0 (Controller Header, channel 10)
call MIOS_MIDI_TxBufferPut
movf MIDI_EVNT1, W
call MIOS_MIDI_TxBufferPut
movf MIDI_EVNT_VALUE, W ; send enc/button value, stored in MIDI_EVNT_VALUE
call MIOS_MIDI_TxBufferPut
goto MIOS_MIDI_BeginStream ; end stream and exit