Skip to content
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

Arduino Nano 33 BLE Support? #985

Open
tilllt opened this issue Dec 31, 2023 · 3 comments
Open

Arduino Nano 33 BLE Support? #985

tilllt opened this issue Dec 31, 2023 · 3 comments

Comments

@tilllt
Copy link

tilllt commented Dec 31, 2023

I stumbled upon this:

https://github.com/lathoub/Arduino-BLE-MIDI?tab=readme-ov-file

It seems the work to implement BLE Midi on Nano 33 BLE is done for other midi libraries... will that make it more probable you could implement Midi over BLE for the Nano 33 as well? I would like to use your library for a project but the lack of BLE Midi for the Nano 33 is prohibiting this ATM.

@tttapa
Copy link
Owner

tttapa commented Dec 31, 2023

You can use transports for the MIDI library using Control Surface by using the included FortySevenEffectsMIDI_Interface adapter.

#include <BLEMIDI_Transport.h>
#include <hardware/BLEMIDI_ArduinoBLE.h>

#include <Control_Surface.h>
#include <MIDI_Interfaces/Wrappers/FortySevenEffects.hpp>

// Create an Arduino BLE MIDI instance
BLEMIDI_CREATE_DEFAULT_INSTANCE()
// Then wrap it in a Control Surface-compatible MIDI interface
FortySevenEffectsMIDI_Interface<decltype(MIDI) &> cs_midi = MIDI;

// Also route the incoming MIDI messages to the Serial Monitor for debugging
USBDebugMIDI_Interface debug_midi;
BidirectionalMIDI_Pipe mpipe;
 
void setup() {
  cs_midi.setAsDefault();
  Control_Surface.begin();
  debug_midi | mpipe | cs_midi;
}

void loop() {
  Control_Surface.loop();
  static AH::Timer<millis> timer{250};
  if (timer)
    Control_Surface.sendControlChange(7, (millis() / 250) % 128);
}

Unfortunately, you'll find that the library you linked to does not support the Arduino Nano 33 BLE either at this point: lathoub/Arduino-BLE-MIDI#55

None of the recent stable releases worked for me, but the Arduino-Nano-33-BLE branch does at least seem to compile.
However, the examples do not work, as I'm unable to connect to the device after uploading (Neither on Ubuntu 22.04 with BlueZ 5.64, nor on Android 14).

I have some other concerns about the way Arduino-BLE-MIDI is implemented, and the API exposed by the ArduinoBLE library is rather limited. I'll need to find some time to actually look at this topic in detail to see if these concerns are well-founded.

@tilllt
Copy link
Author

tilllt commented Dec 31, 2023

Thanks for looking into it and happy new year :)

@tttapa
Copy link
Owner

tttapa commented Jan 23, 2024

MIDI over BLE is now supported on the Arduino Nano 33 BLE, Raspberry Pi Pico, and other boards: #993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants