I've been working on something for awhile now, I figured I would throw a question out to the forum.
I have some serial data coming in from Arduino. For right now I'm working with two ultrasonic sensors. I'm trying to send a MIDI message to Ableton to trigger a sound, but only when the sensor sees movement (in other words, I'm trying to set it up so that if the current sensor value is different from the last sensor reading (I have it set to a difference of 5 right now), send a message to Ableton, otherwise do nothing. The sensor values appear to be coming into Max very quickly, when I compare outputs under "trigger" both numbers are instantaneously the same, when I believe one should be current value and the other previous value. Since this is true, further down the chain the value I send to midiformat is almost always 0. Ableton sees the MIDI messages, but won't launch anything. I'm wondering where the problem is:
1. Am I not comparing values correctly to get the difference?
2. Am I not sending the values to midiformat correctly?
3. Does everything appear to be fine, could the problem be on Ableton's end?
I would appreciate any and all suggestions. At this point I'm willing to try anything. I've been smacking my head against the keyboard for a long time over this.