Reading the AVRFreaks.net forums too often can have an unintended side effect - more work. No, I’m not talking about the work of helping others, but rather the work induced by the thoughts implanted by others. A thread about MIDI had me thinking for a little too long, and so I decided to investigate the USB-MIDI class specification.
A little reading later and I’ve found that it should be relatively simple, due to the fact that the USB-MIDI class is built on top of the existing Audio class, which I’ve already experimented with. The only tasks that need to be done it seems is to add in the MIDI IN and OUT terminals to the descriptors, and then the actual MIDI note writing to the appropriate endpoint.
I think it’ll be my next addition to the library - a simple MIDI device which playes notes depending on the joystick position. My only problem is the host-side application; can anyone recommend a freeware application which can play notes sent to the host via MIDI?
I’ll be at the The IET Networking Dinner event tomorrow night, so if any of you are also attending, I’ll see you there!
April 17th, 2008 at 4:00 pm
I think FluidSynth is well regarded.
There’s the Processing.org proMIDI library, if you want to roll your own.
April 18th, 2008 at 6:43 am
My first two responses were Processing (http://www.processing.org) and Pure Data (aka PD http://puredata.info/). I asked the dorkbotpdx channel.
[10:49am] feurig: If you were adding midi to your usb device what software would you hook it up to?
[10:50am] feurig: (this question from Dean Camera who is working on a decent usb library for the AT90USB family)
[10:51am] feurig: Processing? PD? a decent free midi audio?
[10:51am] breedx: well you know I’m pd happy
[10:51am] breedx: pd has [hid] which is pretty much the way to go.
[10:53am] breedx: although, I’m *really* interested in what it takes to get a usb device to show up automagically as a sound card….
[10:53am] breedx: cuz there are usb sound devices, including usb midi controllers that work out of the box when you plug them in….
[10:53am] breedx: so I’d ultimately like to dive down that path too.
[10:54am] feurig: I think we should eithere look at the USBKEY or make a GP usb 162 board.
[10:54am] feurig: Do you still have the olimex board without the processor ?
[10:55am] feurig: I will swap you for one with the processor on it.
[10:55am] breedx: I think I do, remind me when I’m at home.
[10:55am] breedx: I gotta get back to work.
[10:55am] breedx: see ya in a few.
[10:55am] feurig: I am pretty sure you can use that for the at90usb1287/647
[10:55am] feurig: cool.
[11:03am] ax: feurig: i just ordered a USBKEY a day or two ago
[11:03am] ax: feurig: i would test with pd, or just amidi
[11:09am] ax: [hid] isn’t neccesarily the way to go, currently the [hid] object is input only
[11:09am] breedx: oooh, that’s a good point.
[11:09am] ax: also, i seem to remember that hid messages are delivered only every 10ms, and you send your whole state
[11:10am] breedx: 10ms is fine for most control applications
[11:10am] ax: could serial communication be faster for units that generally only have 1 thing changing at a tome?
[11:10am] ax: time..
[11:11am] breedx: ax: yeah, that’s why I’m a fan of the libusb -> OSC approach I used with the p5 glove….but there’s room for improvement there.
[11:11am] ax: well. consider that we notice 15ms time delay, so from the time you push a button on your device until the time a sound happens, well.. 10ms + audio software latency + audio hardware latency
[11:13am] ax: though, in my experience 10ms is still alright
[11:14am] ax: breedx: i’ve never done libusb programming, though.. i might be checking it out soon
[11:15am] ax: a while ago i tried to access a pic based usb project [CUI] with the libhid library, i think i figured out how to do 1 direction but not the other..
[11:16am] feurig: sounds like a few of us could use to look at the at90usb family
[11:16am] feurig: and this….
[11:17am] feurig: http://fourwalledcubicle.com/blog/archives/category/projects/myusb
[11:18am] ax: yeah, i’m going to be looking at the at90usb stuff soon, and i appreciate the links you’ve sent
[11:31am]