Greetings! I have some weird MIDI issues I was wondering if anyone here have any idea about what migth be the cause of, and perhaps could offer some pointers towards a potential cure to!
I am working on a project that involves the need to get midi messages from arduino to my sound card. This project involves doing stuff in water, so we have allready gotten a wireless MIDI transmitter that works perfrectly. The trouble, however, seem to be in Pure Data for all I can understand. I am using an arduino decimilla, with a regular flex sensor as control. And the problem is:
When PD receives MIDI data from the arduino , it all seems good in the beginning, the response is quick, and all is well. However, after running only a short time, not more than a few minutes max, the MIDI messages seem to get delayed, so when i move the flex sensor, it takes a while before the changes registeres in PD. What is even weirder is that in addition to this, there seem to be like a double flow of delayed messages, where at first the "original" message comes along, and then short after, a duplicate message comes along too. So when say I bend my flex sensor, at first, the midi goes from 127 to 60, and then after a short while, jumps back to 127 and ramps back to 60 again. Sometimes they even seem to compete and garble eachother at the same time, with values jumping all over the place. I find the irregularity of the whole troublesome affair really frustrating. I am still a noob with arduinou so even though I do not believe the problem lies in the arduino, I cannot be sure. The reason I believe it is in PD is beacause all i have to do is shut down PD and start it up again, and it works nice.. a few minutes. And needless to say, in a live setting, you don't want to go up and restart PD all the time, especially since I will be submerged in a pool during the performance.. (have allways used Pduino before the few times I've used it with PD, but that is not an option this time)
I am working in Windows XP with a Edirol UA-25 sound card btw.
The arduino code i'm using to produce MIDI was borrowed from this program;
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1165833586/0#2
Anyone had similar problems with MIDI in PD? I know the warning says "MIDI is dangerous in PD" but... I have used CC messages before with no problem at all. This is so weird...
Any clever suggestions would be hugely appreciated.