-
Dear @lathoub, after I solved the basic MIDI connection problems to the Vox Adio Amp with your help my next challenge will be to build a hybrid client for my "Nux Mighty Plug" and "Vox Adio Air GT" MIDI devices. I guess that there are two possible approaches to implement this functionality:
Is there a way to figure out the MIDI-name of the connected device in the client code ... or even a way to work with two MIDI channels in parallel? I hope that I don't bother you not to much with my questions - I started with the Arduino-Platform a month ago and I'm still a novice with all that technology and Arduino-coding. Thanks again for your help and greetings from Germany Bernd |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hi @MicroMidi You might have answered the question yourself :-)
The logs contain device names of the device you are connecting to.
|
Beta Was this translation helpful? Give feedback.
-
You can expose the Arduino-BLE-MIDI/src/BLEMIDI_Transport.h Line 187 in 5c42e14 Forwarding the advertisedDevice as-is might not be a good idea, but take element(s) from the objects (eg device names) and pass that onwards. Feel free to suggest, so we have something to start from |
Beta Was this translation helpful? Give feedback.
-
... "learn something new every day" - this is what I've been told by @lathoub some weeks ago - and actually I spent hours for a task that could be implemented within a minute. But finally I made it as I understood, that "BLEMIDI_Transport.h" just implements the callback declaration without code and "BLEMIDI_Client_ESP32.h" the callback implementation.
I assume that it is better to define the "connectedDeviceName"-variable as a private member in the "BLEMIDI_Client_ESP32"-class as memory is only allocated once ... Maybe this little enhancement could be a candidate to be incorporated in the BLE-MIDI library as it is an added functionality and doesn't collide with any exisiting code leveraging this library, though. This provides an easy approach to decide how to deal with the connected BLE-MIDI-server based on the name of the MIDI device. My MIDI footswith now supports two different MIDI-effect devices in a common code base - and this is what I tried to achieve ... |
Beta Was this translation helpful? Give feedback.
... "learn something new every day" - this is what I've been told by @lathoub some weeks ago - and actually I spent hours for a task that could be implemented within a minute. But finally I made it as I understood, that "BLEMIDI_Transport.h" just implements the callback declaration without code and "BLEMIDI_Client_ESP32.h" the callback implementation.
So in the end this turned out as a very trivial change: