piku

firmware mod- change channel out

6 posts in this topic

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

thank you very much TK!!!!!!!

:D

Share this post


Link to post
Share on other sites

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...

Edited by piku

Share this post


Link to post
Share on other sites

Just believe me that this was the most pragmatic solution ;)

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now