All of lore.kernel.org
 help / color / mirror / Atom feed
* Back to basics
@ 2005-09-28 22:44 Richard Jones
  0 siblings, 0 replies; only message in thread
From: Richard Jones @ 2005-09-28 22:44 UTC (permalink / raw)
  To: alsa-devel

Hi all

I have what I am hoping is a very basic question and the answer will 
help me better understand ALSA and how it works.

What I want to do is write a simple program that lists the available 
midi devices currently connected to my machine and I can then choose one 
and capture the input from that midi device.

I think it best to break it down into the components

1. I connect my Yamaha keyboard to my laptop and it is assigned to one 
of the midi devices in /dev/snd/midi????. Is there a way with ALSA to 
list the devices that are currently valid or a way of working it out in 
a program. I have seen "pmidi -l" but that gives me a list of ports that 
I don't know how to relate back to the device names in /dev/snd. 
Similarly, rawmidi requires me to know which device has been allocated 
to my keyboard. I have seen music applications using ALSA that produce a 
pull down list of valid devices to choose from. How do they work that out?

2. I want to read the midi stream coming in from the piano and just 
translate it into its relative note value - middle C. (using the ALSA API)

So, ignoring all error handling and other programming "stuff", could 
someone please write down the most basic piece of C code where the ALSA 
API is being used to achieve these two things?

Thanks
Bob



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-28 22:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-28 22:44 Back to basics Richard Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.