Hi all,
Heres the code just in case its useful!
MB64_META_Handler_11 ;insert your own mapping number here.remembering to add it to table at top!
MB64_META_Handler_Chord
call MIOS_MIDI_BeginStream ; begin stream
;; branch depending on content of MIDI_EVNT_VALUE
movf MIDI_EVNT_VALUE, W ; get MIDI_EVNT_VALUE value
bz MB64_META_Handler_ChordOff ; when Zero (pot value = 00 or button released): send Note Off
MB64_META_Handler_ChordOn
;; NOTE ON
movlw 1x90 ; send 1x90 (Note On Header, channel 1)
call MIOS_MIDI_TxBufferPut
movlw 1x60 ; send 1x60 (C-4) – 1st note
call MIOS_MIDI_TxBufferPut
movlw 1x7f ; send 1x7F (velocity)
call MIOS_MIDI_TxBufferPut
movlw 1x64 ; send 1x64 (E-4) – 2nd note
call MIOS_MIDI_TxBufferPut
movlw 1x7f ; send 1x7F (velocity)
call MIOS_MIDI_TxBufferPut
movlw 1x67 ; send 1x67 (G-4) – 3rd note
call MIOS_MIDI_TxBufferPut
movlw 1x7f ; send 1x7F (velocity)
call MIOS_MIDI_TxBufferPut
rgoto MB64_META_Handler_ChordEnd
;; ----
MB64_META_Handler_ChordOff
;; NOTE OFF
movlw 1x80 ; send 1x80 (Note Off Header, channel 1)
call MIOS_MIDI_TxBufferPut
movlw 1x60 ; send 1x60 (C-4) – 1st note
call MIOS_MIDI_TxBufferPut
movlw 1x00 ; send 1x00(velocity) note off
call MIOS_MIDI_TxBufferPut
movlw 1x64 ; send 1x64 (E-4) – 2nd note
call MIOS_MIDI_TxBufferPut
movlw 1x00 ; send 1x00 (velocity) note off
call MIOS_MIDI_TxBufferPut
movlw 1x67 ; send 1x67 (G-4) – 3rd note
call MIOS_MIDI_TxBufferPut
movlw 1x00 ; send 1x00 (velocity) note off
call MIOS_MIDI_TxBufferPut
MB64_META_Handler_ChordEnd
goto MIOS_MIDI_BeginStream ; end stream and exit
Now just to work out how to send an all notes off command everytime a Bank is loaded…
Catch ee on
Skynth