All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aldrin Martoq <amartoq@dcc.uchile.cl>
To: "Pharaoh ." <pharaoh137@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: ALSA MIDI interface - plugin
Date: Mon, 18 Feb 2008 14:58:56 -0300	[thread overview]
Message-ID: <1203357536.6312.13.camel@localhost> (raw)
In-Reply-To: <61445c750802180647l3604fd9fk43426018d9a80e4b@mail.gmail.com>


On Mon, 2008-02-18 at 20:17 +0530, Pharaoh . wrote:
> On Feb 15, 2008 10:23 PM, Takashi Iwai <tiwai@suse.de> wrote:
> > At Thu, 14 Feb 2008 20:54:28 +0530,
> > Pharaoh . wrote:
> > > Now, I have to support rawmidi interface also. Is it possible to write a
> > > userspace
> > > plugin for making MIDI work? Where can I get sample code etc?
> > Another possibility is to write an ALSA sequencer client, and load
> > snd-virmidi driver.  Then you can connect to a rawmidi device as you
> > like.
> Thanks Takashi, I am not sure I understood this fully..Can you point me to
> some sample
> code or relevant documentation.

Look the code of aseqdump from alsa-utils project. You don't need
anything related to kernel, just a normal client that creates a port and
listens for events. Once you receive a MIDI event, process it and do the
magic in your card.

$ aseqdump 
Waiting for data at port 129:0. Press Ctrl+C to end.
Source_ Event_________________ Ch _Data__

$ aconnect -iol

$ aplaymidi -p 129:0 /usr/share/denemo/manual/4for2new.midi

Please note that with the alsaseq API you receive processed MIDI data...
This could be a plus for your development (you don't have to implement
the low-level midi parser). Timidity is a software synth that follow
this approach.


About snd-virmidi, is almost the same, but the port is a 'kernel port'
and it represents a virtual card. I'm not sure what advantages has it.


-- 
Aldrin Martoq <amartoq@dcc.uchile.cl>

  reply	other threads:[~2008-02-18 17:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-14 15:24 ALSA MIDI interface - plugin Pharaoh .
2008-02-15 16:53 ` Takashi Iwai
2008-02-18 14:47   ` Pharaoh .
2008-02-18 17:58     ` Aldrin Martoq [this message]
2008-02-19  8:06     ` Clemens Ladisch
2008-02-20  0:39   ` Pharaoh .

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=1203357536.6312.13.camel@localhost \
    --to=amartoq@dcc.uchile.cl \
    --cc=alsa-devel@alsa-project.org \
    --cc=pharaoh137@gmail.com \
    --cc=tiwai@suse.de \
    /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.