Skip to contentSkip to conversation

alsa midi tutorial

DISCUSSION andy baxter 2 participants 3 messages Jun 12, 2008

lore
Share & tools
lore
#0 lore raw

hello,

Can anyone recommend a good, reasonably simple, tutorial on programming for the alsa midi system?

What I want to do is feed drum trigger signals from an arduino board (a usb development board that lets you interface electronics to the computer) to a midi sequencer.

I had a look at the following page from the alsa api reference:

http://www.alsa-project.org/alsa-doc/alsa-lib/seq.html

but I'm finding it a bit hard to follow - I'm looking for something a bit simpler with code examples to work through that will give me a way in to alsa midi programming.

Does anyone know of anything like this?

thanks,

andy baxter.

#1 lore raw

Andy,

Quoted 3 lines

What I want to do is feed drum trigger signals from an arduino board (a usb development board that lets you interface electronics to the computer) to a midi sequencer.

Why do you need to go through the computer for this? You can use the arduino's serial port to send and receive MIDI commands. It's really simple and there are tons of projects on the web that do exactly that.

Quoted 9 lines

I had a look at the following page from the alsa api reference:

http://www.alsa-project.org/alsa-doc/alsa-lib/seq.html

but I'm finding it a bit hard to follow - I'm looking for something a bit simpler with code examples to work through that will give me a way in to alsa midi programming.

Does anyone know of anything like this?

No, but that's the wrong page. For sending MIDI data you simply open the device (snd_rawmidi_open) and send your commands (snd_rawmidi_write).

Flo

Signature · 2 lines
Machines can do the work, so people have time to think.
public key 6C002249          x-hkp://wwwkeys.eu.pgp.net
#2 lore raw
Quoted 12 lines · Florian Faber

Andy,

Quoted 4 lines

What I want to do is feed drum trigger signals from an arduino board (a usb development board that lets you interface electronics to the computer) to a midi sequencer.

Why do you need to go through the computer for this? You can use the arduino's serial port to send and receive MIDI commands. It's really simple and there are tons of projects on the web that do exactly that.

OK, but I don't have a hardware sequencer, so I was thinking that it would be good to write a small program in C that would translate incoming usb serial data from the arduino into midi data, which I could then feed into any linux soft synth, sequencer, or whatever.

Quoted 9 lines
Quoted 9 lines

I had a look at the following page from the alsa api reference:

http://www.alsa-project.org/alsa-doc/alsa-lib/seq.html

but I'm finding it a bit hard to follow - I'm looking for something a bit simpler with code examples to work through that will give me a way in to alsa midi programming.

Quoted 7 lines
Quoted 2 lines

Does anyone know of anything like this?

No, but that's the wrong page. For sending MIDI data you simply open the device (snd_rawmidi_open) and send your commands (snd_rawmidi_write).

OK - I will have a look at the page on rawmidi. I thought at first this was a low level interface which you didn't need unless you were doing something quite involved which the sequencer interface didn't provide.

andy.

P.S. apologies for not sending my first reply to the list - I'm used to lists that set reply-to as the list address.