-
Notifications
You must be signed in to change notification settings - Fork 70
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
FeatureReq - Send SysEx message on button press #51
Comments
I had a go at implementing: it compiles, but I don't have an Arduino to test it on (they're on order). |
I plan on restructuring the Digital and Analog classes to make them less dependent on the send implementation. Once that's done, adding SysEx support should be easy. |
After circling around for quite a while with a very puzzled look, I finally realized that the board (Arduino UNO) I am using is actually using the serial port (rather than USB) and got something coming out of the port. Then the 2nd realization struck - arduino_midi doesn't support SysEx: Well some progress was made.... and a few bugs were squashed. Might work for other boards. |
I should add the Uno is borrowed, whilst I wait for my Pro Micros to arrive. The Micros appear to have inbuilt USB, so I'm still hopeful it will work. |
I see that you use separate bytes to pass to the constructor. You could pass the SysEx as an array: either as a pointer to the first element of the array (C-style): void sendSysEx(uint8_t *data, size_t length) {
for (size_t i = 0; i < length; i++) {
Serial.println(data[i]);
}
} Alternatively, you can use a reference to an array (C++-style): template <size_t N>
void sendSysEx(uint8_t (&data)[N]) {
for (const uint8_t &data_byte : data) {
Serial.println(data_byte);
}
} I use this approach at multiple points in the library already, for example here: https://github.com/tttapa/Control-Surface/blob/1293f468d0cbacf1039d41bf5584ca8b17bc8f76/src/ExtendedInputOutput/AnalogMultiplex.h#L12 |
Found this other implementation of the UNO MIDI firmware: It's passing the SysEx stream, but for some reason I am having missing bytes.... |
Still having difficulties with that alternative, seems that sending 5 bytes is broken but 6 bytes work... Found another alternative (via pedalino which uses your code): On the topic of creating instance with bytes or array, I figured that bytes might be easier for a not-to technical person. Happy either way.... when creating banks of buttons does it matter? |
A little request; to be able to send a SysEx command when a button is pressed.
I imagine that this would be a new definition (say 'DigitalSysEx()') and take a string of hex digits which would be sent each time the button was pressed.
This is respect to creating a start/stop device for the Akai MPC, as seen here:
https://www.youtube.com/watch?v=2PngH1TE_dA
Required SysEx are described here:
https://www.dropbox.com/s/71crq2qvd378zbg/MPC%20and%20MC6%20Editor%20Notes.pdf?dl=0
Thanks,
Simon.
The text was updated successfully, but these errors were encountered: