Skip to content

added MIDI #219

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

Closed
wants to merge 3 commits into from
Closed

added MIDI #219

wants to merge 3 commits into from

Conversation

auxren
Copy link
Contributor

@auxren auxren commented Jun 20, 2016

Added example for MIDI over BLE and modified the current Arduino example for hardwire MIDI to work with the 101.

I also have an example of an instrument you can make with just an Arduino 101 that turns it into an air harp type of thing utilizing the IMU: https://github.com/auxren/MIDIBLE101/tree/master/Airpeggiator

Added MIDI examples
@eriknyquist
Copy link
Contributor

eriknyquist commented Jun 21, 2016

hi @auxren, I'm wondering why you are adding the HardwiredMIDI example to the Wire library? It does not use the Wire library.

@auxren
Copy link
Contributor Author

auxren commented Jun 21, 2016

Heya @eriknyquist. You can test it out with an iOS device or a mac using Garageband. On a mac you need to go to your Audio/MIDI devices and connect via bluetooth; doing so should create the MIDI device and it should play through garageband. In iOS you can go to advanced settings in Garageband and choose MIDI Bluetooth and connect and it should play.
Choose an instrument like a piano and the 101 will just send random MIDI notes for the example.

@auxren
Copy link
Contributor Author

auxren commented Jun 21, 2016

@eriknyquist as far as the wire library, not sure where to put the example. Standard arduinos have a hardwired MIDI example. That example doesn't work on the Curie based arduino as is so I modified Not sure where to put that example if you want to keep it.

@eriknyquist
Copy link
Contributor

eriknyquist commented Jun 21, 2016

@auxren our recommendation is to modify the standard HardwiredMIDI example so that it works on Arduino 101. Can you make a pull request on https://github.com/arduino/Arduino, and modify the file Examples->04.Communication->Midi so it will work on both platforms? (i.e. use #if defined (__arc__) to check if running on a 101 board, and use SoftwareSerial in that case) Provide a link to this pull request in case somebody from Arduino wants to come back and get the context for your change. They may reject it, since they try to keep those examples as simple as possible and preprocessor macros can be daunting to new users. But they also might have other good suggestions, so try that first, and we can re-visit that sketch later on if we need to.

Since the MIDI over BLE sketch is a new sketch specifically for the 101, however, we'll take that one. Thank you for the contribution!

In the meantime, could you please remove the HardwiredMIDI sketch from this pull request, so it's ready to merge after we try it out?

Removed HardwiredMIDI example from wire
@auxren
Copy link
Contributor Author

auxren commented Jun 21, 2016

@eriknyquist I think I pushed the commit without the hardwiredMIDI. As far as ordering the shield, you don't need it. With just an Arduino 101 and an iOS device or Mac with garageband, you can test it out. I can make a demo video if you need one.

@eriknyquist
Copy link
Contributor

@auxren yes my mistake, I realised the shield was only needed for the hardwired sketch as soon as I posted it, and changed it. Thanks!

@calvinatintel
Copy link
Contributor

@auxren Garageband isn't free to my surprise. Can you recommend a different app? Windows, macOS, iOS, Android welcome. Thanks.

@auxren
Copy link
Contributor Author

auxren commented Jun 23, 2016

@calvinatintel MIDI BLE doesn't work with Android yet and there are no music making apps for android that are worth a damn. Never tried it with windows. This implementation of this technology is pretty cutting edge and Apple is leading the way with it. I don't really know any free apps off hand. Are you using a Mac? If so, you can connect the BLE and monitor the incoming MIDI data from free apps like MIDIMonitor by Snoize

@calvinatintel
Copy link
Contributor

@auxren I've got the MIDI Monitor and sketch running, but I'm not sure how to get them to talk to each other. Can you please walk me through?

@auxren
Copy link
Contributor Author

auxren commented Jun 23, 2016

@calvinatintel follow the 'Connect to mac' instructions here: https://drumpants.uservoice.com/knowledgebase/articles/566124-midi-over-bluetooth-le-for-mac-laptops

Instead of Drumpants, my sketch should advertise as Auxren. Once connected, you should have a dropdown in Midimonitor that will allow you to select the MIDI BLE device and data should start to show up in the window.
I am not in front of a mac so I can't help you out at the moment.

@calvinatintel
Copy link
Contributor

@auxren Does this look right?
screen shot 2016-06-23 at 1 07 48 pm

@auxren
Copy link
Contributor Author

auxren commented Jun 23, 2016

Yup! You are receiving random note-on then note-off events as it should be doing.

@eriknyquist
Copy link
Contributor

@auxren great! @calvinatintel ready to be merged then.

@calvinatintel
Copy link
Contributor

@auxren Would you please

  1. Add a basic how-to on the comment?
  2. Change the first two lines of the comment? It'd be weird for Intel to host something that isn't favorable to Intel :)

Added more comments and instructions on how to use the sketch.
@auxren
Copy link
Contributor Author

auxren commented Jun 24, 2016

@calvinatintel added it all in. Also wrote more about the code and added a link to a more in-depth example that uses the Curie's IMU too. Not sure if you guys want me to commit that example too or just leave it where it is and just commit this minimal example.

@calvinatintel
Copy link
Contributor

@auxren Looks good. As a final clean up, would you please squash the three commits into one? Thank you.

@eriknyquist @bigdinotech @SidLeung Can you please review https://github.com/auxren/MIDIBLE101/blob/master/Airpeggiator/Airpeggiator.ino and see if that should also be included in this commit?

@auxren
Copy link
Contributor Author

auxren commented Jun 24, 2016

@calvinatintel what do you mean by squashing the 3 into one?

@eriknyquist
Copy link
Contributor

@auxren you can use git rebase to "squash" your 3 commits into 1, and rewrite the message to something like "Add example for MIDI over BLE".
https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History

@auxren
Copy link
Contributor Author

auxren commented Jun 24, 2016

@eriknyquist I've been hobbling around with git through all this but the squashing isn't working out. Any way I can do it through the git gui or website?

@calvinatintel
Copy link
Contributor

Squashed and merged

@auxren
Copy link
Contributor Author

auxren commented Jun 24, 2016

Ohhh, thank you!

@auxren
Copy link
Contributor Author

auxren commented Aug 16, 2016

Hey all. Is this implemented and available as an example when people download the Arduino IDE?

@eriknyquist
Copy link
Contributor

No, it will be in the next corelibs release (called "Castor" if you want to track progress...)

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

Successfully merging this pull request may close these issues.

4 participants