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

Add MIDI on 32u4? #2

Closed
naught101 opened this issue Sep 15, 2014 · 16 comments
Closed

Add MIDI on 32u4? #2

naught101 opened this issue Sep 15, 2014 · 16 comments

Comments

@naught101
Copy link

I see that this is already on your todo list. How hard would this be? What would be required?

@NicoHood
Copy link
Owner

I am sorry that i somehow missed this issue.

You would have to add Midi descriptors and understand how the Arduino USB-Core works. And its not that easy. Also you have to be carefull with the DPRAM. The Arduino core simply uses 64 bytes for each endpoint and you might run out of DPRAM with this definition. Anything else would lead to a whole new structure.

With a Lufa environment it would work, there are also examples. But you have no Arduino environment with Lufa. But it would be the better choice for custom USB stuff anyways.

@NicoHood
Copy link
Owner

More information here:
https://github.com/NicoHood/HID/wiki/Midi-Support

@NicoHood
Copy link
Owner

NicoHood commented Apr 5, 2015

@NicoHood
Copy link
Owner

NicoHood commented Apr 6, 2015

Well,
now available for testing:
https://github.com/NicoHood/HID/tree/Midi-Test

Only works with 32u4 (leonardo/micro) and is activated by default. Select one of the USB-Cores, but no HID will work.
I really need feedback about this, I just made it recognize by the PC but had no chance to test it yet.

Example:
https://github.com/rkistner/arcore/blob/master/examples/MidiEcho/MidiEcho.ino

@maxabrahamsson
Copy link

I guess MIDI wont work with Arduino UNO yet?

@NicoHood
Copy link
Owner

NicoHood commented Apr 7, 2015

No it wont. Simply because the 16u2 only has 4 USB Endpoints. Serial uses 3, Midi 2 and HID1. The 32u4 has 6 Endpoints. (However Midi and HID dont play well together). And Right now I cannot deactivate the Serial device, due to bad USB-Core code organization.

You can try the midi firmwares from other people and upload them via avrdude. You can still switch forth and back to your Hoodloader bootloader to load new sketched to the 328. Links can be found in the wiki. Similar firmwares will be provided later.

@CaptainCredible
Copy link

Has this been tested yet ? I will try it as soon as I have a chance

@NicoHood
Copy link
Owner

No I paused working on this, because I need feedback.
Tell me if it works and I will make a proper IDE integration.

Also there is currently some work, also for MIDI, going on here:
arduino/Arduino#3304

@NicoHood
Copy link
Owner

@CaptainCredible
Copy link

Woooooooooot!
On 16 Jul 2015 20:45, "Nico" [email protected] wrote:

Midi USB is now in the current hourly IDE build:
https://github.com/arduino/Arduino/wiki/PluggableUSB-and-PluggableHID-howto
arduino/Arduino#3304 arduino/Arduino#3304


Reply to this email directly or view it on GitHub
#2 (comment).

@naught101
Copy link
Author

Thanks Nico. I guess this can be closed then?

@NicoHood
Copy link
Owner

NicoHood commented Aug 7, 2015

More or less. The HID Project Midi example is just a dev state. And I will give up the HID Project 2.2 and 2.3 dev anyways. Because the new solution is just better.

HID Project 2.4 will then become a library instead of a core (which is better anyways) and only include the Consumer, System and Gamepad files.

I will keep the issue still open for now as a reminder it is not fixed in the current version. If its not needed later, I'll close it then.

@NicoHood NicoHood reopened this Aug 7, 2015
@NicoHood
Copy link
Owner

@NicoHood
Copy link
Owner

Now closing since the dev branch is up to date with IDE 1.6.6 and Midi USB is now available as (half?) official library

@naught101
Copy link
Author

Finally built that Arduino Micro USB device that I was wanting to (actually, it's a completely different one, but more useful for me now):

midi controller

Works pretty nicely with really simple code. It's not quite finished yet ) want to add some buttons (in the mail, hopefully), and replace that dodgy fader knob ;), but it is already super useful.

Thanks heaps for your work on this, Nico, really appreciated!

@NicoHood
Copy link
Owner

Great! Thanks for sharing your feedback. Happy coding :)

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

No branches or pull requests

4 participants