Go Down

Topic: Basic Midi Control Change Question (Read 789 times) previous topic - next topic


Jan 31, 2014, 05:51 pm Last Edit: Jan 31, 2014, 05:53 pm by juli Reason: 1

I am using a deek-robot micro (arduino-micro clone). Outputting over TX through Midi interface (midimate).
I tried this Code i found on this forum, just for testing basic output of midi control change messages.
It should output CC23 on channel 4 with value 42 every second. I thought so at least.
Messages are arriving, but as you can see in the attached midi-monitoring-image many other messages, like aftertouch etc are beeing received.

Where are those messages coming from and how can i eliminate them?

Thanks for any help ...

Code: [Select]

void setup()
  Serial1.begin(31250);     // Speed of MIDI serial port    

void loop()
  controlSend(23,42);       // e.g. Controller Number 23, Value 42 output every 1000 miliseconds

void controlSend(byte CCnumber, byte CCdata) {
 byte CCchannel = 0xB3;     // 0xB3 stands for programchange on Midi channel 4


Could be a bad physical connection or a baud rate that is near the margin for successful communication.

The MIDI serial clock is quite fast and it doesn't have to be off by much before bits start getting lost.  One thing I might try is to adjust the baud rate up and down to see if a different rate works better with your hardware.  Try sending ten messages at each baud rate from 31225 to 31275.  Put the last two digits of the baud rate into the message.  If you receive all ten messages successfully then that baud rate is usable.  If you find a range of baud rates that work you should pick the one in the middle of the range.  If none work you probably have a bad connection.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e


Where are the midi messages come from? Try to disable midi thru in the setup!
* alright, what happened *

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131