* ALSA MIDI interface - plugin
@ 2008-02-14 15:24 Pharaoh .
2008-02-15 16:53 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Pharaoh . @ 2008-02-14 15:24 UTC (permalink / raw)
To: alsa-devel
Hi
I am writing an user space ALSA i/o type PCM plugin for my board. I chose
this
rather unconventional approach for supporting ALSA apps since the the the
driver
which communicates with DSP using shared memory is in userspace and for some
constraints the driver communication driver will always be in userspace. My
audio
plugin uses calls of the coomunication driver and talks to DSP. I already
have
a working plugin in place. I use it like following,
#aplay -D my_plugin test.wav
and it works.
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?
-pharaoh.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ALSA MIDI interface - plugin
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-20 0:39 ` Pharaoh .
0 siblings, 2 replies; 6+ messages in thread
From: Takashi Iwai @ 2008-02-15 16:53 UTC (permalink / raw)
To: Pharaoh .; +Cc: alsa-devel
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?
It's possible, but so far, no external plugin framework is implemented
for rawmidi. The external plugins are available only for PCM and
control APIs. I guess it'd be relatively easy to add the external
rawmidi plugins, though.
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.
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ALSA MIDI interface - plugin
2008-02-15 16:53 ` Takashi Iwai
@ 2008-02-18 14:47 ` Pharaoh .
2008-02-18 17:58 ` Aldrin Martoq
2008-02-19 8:06 ` Clemens Ladisch
2008-02-20 0:39 ` Pharaoh .
1 sibling, 2 replies; 6+ messages in thread
From: Pharaoh . @ 2008-02-18 14:47 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
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?
>
> It's possible, but so far, no external plugin framework is implemented
> for rawmidi. The external plugins are available only for PCM and
> control APIs. I guess it'd be relatively easy to add the external
> rawmidi plugins, though.
>
> 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.
-Pharaoh.
> Takashi
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ALSA MIDI interface - plugin
2008-02-18 14:47 ` Pharaoh .
@ 2008-02-18 17:58 ` Aldrin Martoq
2008-02-19 8:06 ` Clemens Ladisch
1 sibling, 0 replies; 6+ messages in thread
From: Aldrin Martoq @ 2008-02-18 17:58 UTC (permalink / raw)
To: Pharaoh .; +Cc: Takashi Iwai, alsa-devel
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ALSA MIDI interface - plugin
2008-02-18 14:47 ` Pharaoh .
2008-02-18 17:58 ` Aldrin Martoq
@ 2008-02-19 8:06 ` Clemens Ladisch
1 sibling, 0 replies; 6+ messages in thread
From: Clemens Ladisch @ 2008-02-19 8:06 UTC (permalink / raw)
To: Pharaoh .; +Cc: Takashi Iwai, alsa-devel
Pharaoh . wrote:
> On Feb 15, 2008 10:23 PM, Takashi Iwai <tiwai@suse.de> wrote:
> > 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.
There is the old usbmidid daemon that creates sequencer ports for USB
MIDI devices: <http://www.alsa-project.org/~clemens/usbmidid/>.
(It won't install fully on any modern system because the hotplug scripts
have been replaced with udev.)
HTH
Clemens
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ALSA MIDI interface - plugin
2008-02-15 16:53 ` Takashi Iwai
2008-02-18 14:47 ` Pharaoh .
@ 2008-02-20 0:39 ` Pharaoh .
1 sibling, 0 replies; 6+ messages in thread
From: Pharaoh . @ 2008-02-20 0:39 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
>
> It's possible, but so far, no external plugin framework is implemented
> for rawmidi. The external plugins are available only for PCM and
> control APIs. I guess it'd be relatively easy to add the external
> rawmidi plugins, though.
>
How can I start adding an external rawmidi plugin? As you said, there is no
framework ready yet. So, first a framework has to be created so that
external plugins can be added the same way one would add PCM or control type
plugins. It might sound a little naive but I am not familiar with the
framework part of it, but it looks interesting.
1. I think for finding out what the plugin framework would consists of I
need to have a look at alsa-lib and modify it too, is it correct?. If such a
framework is created then
will the control flow look like this:
amidi/aplaymidi ->alsa-lib with midi plugin framework->my_midi_plugin
Can you point me to some code/doc etc which might serve as start point,
basically how do I go about adding such a framework and finally, how user is
going to use
it with newly added plugin? (i.e. for pcm io type plugin we use #aplay -D
my_plugin test.wav, will it be similar for midi plugin also?)
-Pharaoh.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-02-20 0:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-02-19 8:06 ` Clemens Ladisch
2008-02-20 0:39 ` Pharaoh .
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.