I have a very quick question – on the WIKI there are instructions and code for adding additional DOUT triggers to the Midibox CV. Currently the code works with midi channel 1. Can anyone help me identify which parts of the code reference the midi channel? I’d like to change it to reference midi channel 16 instead.
Code reposted below for convenience:
USER_MPROC_NotifyReceivedEvent
;; BEGIN --- control DOUT pins via Note events at channel #1
movf MIOS_PARAMETER1, W ; Note Off -> Note On with velocity 0
andlw 0xf0
xorlw 0x80
bnz USER_MPROC_NRE_NoNoteOff
USER_MPROC_NRE_NoteOff
bsf MIOS_PARAMETER1, 4
clrf MIOS_PARAMETER3
USER_MPROC_NRE_NoNoteOff
movlw 0x90 ; check for Note On at channel #1
IFNEQ MIOS_PARAMETER1, ACCESS, rgoto USER_MPROC_NRE_NoNoteChn1
USER_MPROC_NRE_NoteChn1
;; MIOS_DOUT_PinSet expects pin number in WREG, value in MIOS_PARAMETER1
movf MIOS_PARAMETER3, W ; velocity == 0: off, velocity != 0: on
skpz
movlw 0x01
movwf MIOS_PARAMETER1
movf MIOS_PARAMETER2, W ; pin number: note number - 0x24, we start with C-2
addlw -0x24
andlw 0x7f
call MIOS_DOUT_PinSet
USER_MPROC_NRE_NoNoteChn1
;; END --- control DOUT pins via Note events at channel #1
;; process MIDI event
call CV_MIDI_NotifyReceivedEvent
;; for best latency: branch to USER_Tick so that the new CV values
;; will be mapped immediately
rgoto USER_Tick