All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Jones <bob@the800group.com>
To: alsa-devel@lists.sourceforge.net
Subject: Back to basics
Date: Wed, 28 Sep 2005 23:44:44 +0100	[thread overview]
Message-ID: <433B1CDC.2090201@the800group.com> (raw)

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

                 reply	other threads:[~2005-09-28 22:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=433B1CDC.2090201@the800group.com \
    --to=bob@the800group.com \
    --cc=alsa-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.