-
Notifications
You must be signed in to change notification settings - Fork 252
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
Integrate with PluggableUSB for native USB MIDI #52
Comments
Great news! |
Good news: it's fairly simple to integrate with the MidiUSB Arduino library, there's still a bit of work to be done in Example: Bad news: the latency is terrible, but I was kind of expecting it. The issue here is that the wrapping around MidiUSB makes it double the work needed to receive a message. |
Has there been any progress on this since last year? I've been doing a bit of work on a MIDI project and I'd like to eventually integrate both USB MIDI and serial MIDI on the same board. |
hey @franky47 , your library is great and beautiful, thanks very much for your work and attention, I really appreciate it
but this problem is huge, and in my opinion it's a design bad choice in the basis of the library (which is yours or MidiUSB's creator I don't know...) I'm new on MIDI and USB development, but I've been studying some things (I'm using pro micro at the moment, but I intend to be as generic as possible in my works, with some nice options already out-of-the-box) I almost used your library's interface to MIDIUSB in my project (and honestly... I don't know how to say this), but I can't figure out what do I have to do to write/send a single MIDI note on this. my pro micro can play/send notes MIDI over MIDIUSB used directly (as in example MIDIUSB_write), but it doesn't works using midi::UsbTransport. and instead of trying to figure out what happened here and try to fix it on the promise of a bad latency on final, I'd prefer to study [more than I initially expected in this phase of my project] more MIDI and USB and re-write everything (maybe even including MIDIUSB functionality). but, anyway, it seemed more reasonable to try to open this channel with you, so we can exchange important information and different points of view on the same problem. please feedback us about this issue. I hope with some collaboration, we can or chose one way to do this together, or at least greatly improve each approach we choose to solve this. best regards |
Hi @marcosassis, The A more realistic approach to interfacing MIDI through both USB and Serial transports would probably require splitting the interface from the parser, having separate parsers for various transport types. The issue is that it may become less straightforward for beginner users to handle. I'll have to check what options we have in the Arduino compilers to make this transparent to users. |
thanks for your reply, @franky47 ! =]
I agree
I don't think so. How are thinking this is going to be difficult? (specifically/examples, please) |
hello again @franky47 ! this is my attempt of 'proof of concept' for showing how i'd resolve this important issue: https://github.com/marcosassis/gamepaduino/blob/master/src/midi_proto/midi_interface.h (I'm only sending commands, as it's what I need for now.) I had no previous experience with any MIDI at all (I'm not a musician) before I buy my pro micro and start to write code for it, not long ago. Of course I'm studying your code, and I'd like to thank you very much again for making this accessible. So I'm here to humbly share these experiments, in the hope to learn more in this matter. this is https://github.com/marcosassis/gamepaduino/blob/master/src/midi_proto/midi_usb_interface.h I'm using pro micro 16MHz (5V) tested on (windows7 64) MIDI-OX and Ableton* with success (no latency perceptible) *(this a friend of mine, Monty Cantsin, tested for me) this was one of the most funny things I ever did with arduino =] and that's why: this is a N64 controller (original) playing MIDI notes AND pitch-bending then (analog x axis) (I'm also happy because I really like template programming, so please don't judge my tastes =S.)
bender is read on loop (and automatically play MIDI notes and commands when button pressed/released) and, after all buttons->notes where processed, only then, communication is flushed. so, loop is:
pitch bend is crazy!! =D and it's a nice way to flood this MIDI communication and feel(as we're not measuring yet) the real time behavior of this thing but if one doesn't have a N64 controller, but luckily have a SNES controller, they can test playing notes with |
There is now a working implementation on the Turns out it was not a latency problem, but a broken implementation (only some messages were able to pass through). I now have very low latency and complete interfacing between the MIDI Library and USB MIDI. Congrats on your game controller application, it sounds like a lot of fun ! |
Will this branch get integrated back in the trunk? |
It seems easier now to integrate with native USB for communications, so writing an interface for the library that uses native USB as transport protocol could be investigated.
Also, see #32.
The text was updated successfully, but these errors were encountered: