Skip to content

Conversation

@spridget
Copy link
Contributor

  • Only connect to MIDIService devices
  • Pair with the device once it's connected
  • Connect the paired device to the MIDI instance

* Only connect to MIDIService devices
* Pair with the device once it's connected
* Connect the paired device to the MIDI instance
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind making this a separate example since it adds central functionality? As-is it is a peripheral that gets connected to.

@spridget
Copy link
Contributor Author

As I understood it, ble_midi_simpletest.py and ble_midi_simplein.py are opposite ends of the same connection. The updated simpletest is a BLE advertiser that waits for a connection and pairing before starting to transmit MIDI commands. The updated simplein is a BLE scanner that looks for a BLE device advertising MIDI service, and upon seeing one connects to it and pairs, then prints the MIDI commands that come in with a timestamp.

Upon review of the original simplein I see I was wrong in my assumption. Before my changes it would wait for a connection without caring whether or not the requester was a MIDI device, then print any MIDI commands received.

It would indeed be appropriate to make this yet another example for the Adafruit BLE MIDI library. It should be noted in the new example and in simpletest that they are opposite ends of the same connection.

@spridget spridget closed this Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants