firmware mod- change channel out

how can i modify the firmware of my midibox64 and midibox64e to send midi over channel 4 but receive midi (and so control the leds) on another channel?

In midi_evnt.inc, replace:

;; sending three bytes:
MIDI_EVNT_Send_8x ; Note Off
MIDI_EVNT_Send_9x ; Note On
MIDI_EVNT_Send_Ax ; Aftertouch
MIDI_EVNT_Send_Bx ; Controller
movff MIDI_EVNT0, WREG
call MIOS_MIDI_TxBufferPut
movff MIDI_EVNT1, WREG
andlw 0x7f
call MIOS_MIDI_TxBufferPut
movff MIDI_EVNT_VALUE, WREG
andlw 0x7f
call MIOS_MIDI_TxBufferPut
rgoto MIDI_EVNT_Send_End

;; sending two bytes
MIDI_EVNT_Send_Cx ; Program Change
MIDI_EVNT_Send_Dx ; Channel Pressure
movff MIDI_EVNT0, WREG
call MIOS_MIDI_TxBufferPut
movff MIDI_EVNT_VALUE, WREG
andlw 0x7f
call MIOS_MIDI_TxBufferPut
rgoto MIDI_EVNT_Send_End

;; sending three bytes (7bit converted to 14bit)
MIDI_EVNT_Send_Ex ; Pitch Bend
movff MIDI_EVNT0, WREG
call MIOS_MIDI_TxBufferPut
[/code]




by:
[code]  
 ;; sending three bytes:   
MIDI\_EVNT\_Send\_8x ; Note Off  
MIDI\_EVNT\_Send\_9x ; Note On  
MIDI\_EVNT\_Send\_Ax ; Aftertouch  
MIDI\_EVNT\_Send\_Bx ; Controller  
 movff MIDI\_EVNT0, WREG  
 andlw 0xf0 ; force Channel #4  
 iorlw 0x03 ; counted from 0...  
 call MIOS\_MIDI\_TxBufferPut  
 movff MIDI\_EVNT1, WREG  
 andlw 0x7f  
 call MIOS\_MIDI\_TxBufferPut  
 movff MIDI\_EVNT\_VALUE, WREG  
 andlw 0x7f  
 call MIOS\_MIDI\_TxBufferPut  
 rgoto MIDI\_EVNT\_Send\_End  
  
 ;; sending two bytes  
MIDI\_EVNT\_Send\_Cx ; Program Change  
MIDI\_EVNT\_Send\_Dx ; Channel Pressure  
 movff MIDI\_EVNT0, WREG  
 andlw 0xf0 ; force Channel #4  
 iorlw 0x03 ; counted from 0...  
 call MIOS\_MIDI\_TxBufferPut  
 movff MIDI\_EVNT\_VALUE, WREG  
 andlw 0x7f  
 call MIOS\_MIDI\_TxBufferPut  
 rgoto MIDI\_EVNT\_Send\_End  
  
 ;; sending three bytes (7bit converted to 14bit)  
MIDI\_EVNT\_Send\_Ex ; Pitch Bend  
 movff MIDI\_EVNT0, WREG  
 andlw 0xf0 ; force Channel #4  
 iorlw 0x03 ; counted from 0...  
 call MIOS\_MIDI\_TxBufferPut  

Best Regards, Thorsten.

thank you very much TK!!!

:smiley:

i’m trying to understand but with no success…

could you explain exactly where do i decide the out channel?

where can i find a table with the values for each channel?

what i need now is the value to send all out to midi ch3…

ok ok :yes:

the job is done

Just believe me that this was the most pragmatic solution :wink:

Best Regards, Thorsten.