How to disable outputting of Active Sensing ?

Hi Everyone,

I've make a midi controller using a arduino mini and wrote a sketch which use the MIDI library. I have built a 5-pin DIN MIDI out into the controller. Then I interface the arduino TX pin with a USB MIDI cable.

From my PC,I can receive both the MIDI messages from the USB MIDI cable driver, and also from the 5-pin MIDI out(which connected to another MIDI interface) , and then monitoring the MIDI message using MIDI OX.

Although I didn't send out any active sensing in my sketch, I found that the arduino is continously sending out activing sensing messages (oxfe) itself.

Most of the time the USB MIDI works right, except when the Note On/Off message is send to MIDI channels other than channel 1 !!!

For example, when my controller generate a Note on/Off message at channel 2 (or any channel other than channel 1), which can be seen at the 5-pin DIN MIDI interface, the USB MIDI cable will only send it at channel 1 !!!

After some experiments, it seems that the bug is at the USB MIDI cable and the bug is caused by the active sensing messages.

Does anyone knows how to stop the self-outputting of the active sensing messages ? Thanks !

Sorry, I've fixed the active sensing problem, but the wrong channel problem is still there for my arduino controller !!!

This problem is very strange, because when I use the same USB MIDI cable to connect the TX of another MIDI controller (which use a 89C51 clone), there is no wrong channel problem !!!

This doesn't sound logical ! Does anyone has ideas ?

KK959:
Sorry, I've fixed the active sensing problem,

To help other people who come across this thread, you fixed the active sensing problem how?

For the channel issue, does your sketch read the incoming channel and use that for the outgoing one, or does it hardcode chanel 1 perhaps? Also, since MIDI-over-DIN allows running status while MIDI-over-USB does not, is your sketch keeping track of the last status message and outputting it to remove running status?

Sorry for my late reply.

The annoying active sensing message is done by me !!!

I have write a statement for debugging purpose in my sketch :

MIDI.sendRealTime(ActiveSensing) ;

So my sketch continously sending out ActiveSensing messages. I removed this statement and the sketch works fine.

For the strange re-channel problem I still don't know why. The output channel is fixed in my sketch, so there is no reason why it will change when the message is send through the USB. I think the most probable cause is the USB MIDI Cable, maybe there are software bugs in the USB MIDI Cable.