-
Notifications
You must be signed in to change notification settings - Fork 266
Problem with sendPitchBend #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you try replacing MIDI_CREATE_DEFAULT_INSTANCE(); by struct MySettings : public midi::DefaultSettings
{
static const bool UseRunningStatus = false;
}
// Replace Serial by the serial port you're using for MIDI if not the default one.
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial, MIDI, MySettings); I'd like to rule out a running status issue, but one other thing that could happen here is bouncing of the button (electrical interference that cause digitalRead to oscillate between high and low when pressing or releasing a button for a short time), even though you use a timer of 200ms to slow down readings. There are lots of good libraries that handle debouncing very well, have a look on the Arduino Playground. |
Thanks for your answer! However I solved the problem by replacing the function Now it seems to work fine! |
Looks like you're not the only one with this kind of issue, #41 looks similar. I'll try to replicate your case and see if I can solve this. Thanks for the report ! |
If you have a "flickering" button, that changes rapidly between high and low situations might occur that you miss one button - up or down. |
Just as a remark, what are you using between the Arduino MIDI output and MIDI-OX (hardware and software) ? |
Hello! I'm trying to use arduino midi library to send signals from arduino to some musical software on my computer. I'm a beginner about this, so my first attempt is to send some noteOn/noteOff and PitchBend messages. I'm using a button for noteOn/noteOff and a potentiometer for pitchbend. Also, I read signals on the computer through the software MIDI-OX.
This is the code i've written:
And here's what MIDI-OX receives:

What i don't understand is that after each pitchbend message there are lots of unwanted noteOn messages that, i think, are wrong. In fact, the status is 90 (as a noteOn), but data1 and data2 are the same as in the pitchbend (or similar because i was moving the potentiometer).
Am i making any mistake in the code, or have i change or add other commands?
Thanks in advance.
The text was updated successfully, but these errors were encountered: