* Which API for MIDI?
@ 2003-12-10 9:29 Denis de Leeuw Duarte
2003-12-10 10:35 ` Clemens Ladisch
0 siblings, 1 reply; 8+ messages in thread
From: Denis de Leeuw Duarte @ 2003-12-10 9:29 UTC (permalink / raw)
To: alsa-devel
Hello folks,
I'm starting work on a new midi sequencing app, but I'm a bit confused by
the different API options ALSA offers. I've been reading whatever snippets
I can find on the web, mostly mailing list archives, and if I understand
correctly my options are basically the rawmidi API and the alsa sequencer
API. With the former I must handle all timing myself in user space and
with the latter this is all done by ALSA, is that a correct description or
am I mistaken?
My question is: if my first priority is to have stable, reliable timing
and performance, which API should I choose, taking the current state of
the alsa sequencer code into consideration?
Many thanks in advance to anyone who can shed some light on this.
Regards,
Denis
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Which API for MIDI?
2003-12-10 9:29 Which API for MIDI? Denis de Leeuw Duarte
@ 2003-12-10 10:35 ` Clemens Ladisch
2003-12-10 11:06 ` Tim Goetze
0 siblings, 1 reply; 8+ messages in thread
From: Clemens Ladisch @ 2003-12-10 10:35 UTC (permalink / raw)
To: Denis de Leeuw Duarte; +Cc: alsa-devel
Denis de Leeuw Duarte wrote:
> I'm starting work on a new midi sequencing app, but I'm a bit confused by
> the different API options ALSA offers. I've been reading whatever snippets
> I can find on the web, mostly mailing list archives, and if I understand
> correctly my options are basically the rawmidi API and the alsa sequencer
> API. With the former I must handle all timing myself in user space and
> with the latter this is all done by ALSA, is that a correct description?
Yes. And the sequencer can connect/route between ports, and supports
ports handled by userspace apps. The user of your sequencer won't be
happy if it's restricted to rawmidi ports.
> My question is: if my first priority is to have stable, reliable timing
> and performance, which API should I choose, taking the current state of
> the alsa sequencer code into consideration?
The current state of the sequencer _code_ is just fine. It's the
documentation you'll have problems with (but the rawmidi docs aren't
better).
HTH
Clemens
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Which API for MIDI?
2003-12-10 10:35 ` Clemens Ladisch
@ 2003-12-10 11:06 ` Tim Goetze
2003-12-10 11:42 ` Patrick Shirkey
2003-12-10 14:26 ` Clemens Ladisch
0 siblings, 2 replies; 8+ messages in thread
From: Tim Goetze @ 2003-12-10 11:06 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: Denis de Leeuw Duarte, alsa-devel
Clemens Ladisch wrote:
>Denis de Leeuw Duarte wrote:
>> I'm starting work on a new midi sequencing app, but I'm a bit confused by
>> the different API options ALSA offers. I've been reading whatever snippets
>> I can find on the web, mostly mailing list archives, and if I understand
>> correctly my options are basically the rawmidi API and the alsa sequencer
>> API. With the former I must handle all timing myself in user space and
>> with the latter this is all done by ALSA, is that a correct description?
>
>Yes. And the sequencer can connect/route between ports, and supports
>ports handled by userspace apps. The user of your sequencer won't be
>happy if it's restricted to rawmidi ports.
more things to consider:
* what kind(s) of sync-to-external will you need?
* do you want to receive/send MIDI sysex data?
last time i checked, the latter was impossible to do via the sequencer
API (please correct if things have changed). afaik, the former isn't
always easy to do with the sequencer either.
i've ended up supporting both raw and sequencer access to MIDI ports,
dropping the sequencer timing and queue mechanisms in order to gain
flexibility in sync and tempo matters. of course that requires
realtime threading for MIDI i/o to achieve stable timing.
>> My question is: if my first priority is to have stable, reliable timing
>> and performance, which API should I choose, taking the current state of
>> the alsa sequencer code into consideration?
>
>The current state of the sequencer _code_ is just fine. It's the
>documentation you'll have problems with (but the rawmidi docs aren't
>better).
i found the sequencer API to be well-documented. it's somewhat lacking
in code examples, but there are quite a few applications out there
that use it (pmidi for a start maybe, and then we have rosegarden,
muse etc).
tim
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Which API for MIDI?
2003-12-10 11:06 ` Tim Goetze
@ 2003-12-10 11:42 ` Patrick Shirkey
2003-12-10 14:26 ` Clemens Ladisch
1 sibling, 0 replies; 8+ messages in thread
From: Patrick Shirkey @ 2003-12-10 11:42 UTC (permalink / raw)
To: Tim Goetze; +Cc: Clemens Ladisch, Denis de Leeuw Duarte, alsa-devel
Tim Goetze wrote:
>
>
> i found the sequencer API to be well-documented.
Internally right?
> it's somewhat lacking
> in code examples, but there are quite a few applications out there
> that use it (pmidi for a start maybe, and then we have rosegarden,
> muse etc).
>
I just spotted this older doc
http://www.alsa-project.org/~frank/alsa-sequencer/
Never seen or heard of it before.
Unsurprisingly it is quite comprehensive. How much has the api changed
in the past 4 years? If someone who is well versed in the current
implementation wants to vett this doc and provide an update I'll happily
add it to the site docs.
You'll get your name in the big bright lights and everyone will
associate you with Guru status.
This has to be one of the last core programming docs needed.
--
Patrick Shirkey - Boost Hardware Ltd.
Http://www.boosthardware.com
Http://www.djcj.org - The Linux Audio Users guide
========================================
Apparently upon the beginning of the barrage, the donkey broke
discipline and panicked, toppling the cart. At that point, the rockets
disconnected from the timer, leaving them strewn around the street.
Tethered to the now toppled cart, the donkey was unable to escape before
the arrival of U.S. troops.
United Press International
Rockets on donkeys hit major Baghdad sites
By P. MITCHELL PROTHERO
Published 11/21/2003 11:13 AM
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Which API for MIDI?
2003-12-10 11:06 ` Tim Goetze
2003-12-10 11:42 ` Patrick Shirkey
@ 2003-12-10 14:26 ` Clemens Ladisch
2003-12-10 14:50 ` Paul Davis
2003-12-10 19:50 ` Tim Goetze
1 sibling, 2 replies; 8+ messages in thread
From: Clemens Ladisch @ 2003-12-10 14:26 UTC (permalink / raw)
To: Tim Goetze; +Cc: alsa-devel
Tim Goetze wrote:
> * what kind(s) of sync-to-external will you need?
> * do you want to receive/send MIDI sysex data?
>
> last time i checked, the latter was impossible to do via the sequencer
> API (please correct if things have changed).
Sending/receiving sysex has always been possible AFAIK. It's
certainly possible now.
Regards,
Clemens
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Which API for MIDI?
2003-12-10 14:26 ` Clemens Ladisch
@ 2003-12-10 14:50 ` Paul Davis
2003-12-11 11:14 ` Clemens Ladisch
2003-12-10 19:50 ` Tim Goetze
1 sibling, 1 reply; 8+ messages in thread
From: Paul Davis @ 2003-12-10 14:50 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: Tim Goetze, alsa-devel
>Tim Goetze wrote:
>> * what kind(s) of sync-to-external will you need?
>> * do you want to receive/send MIDI sysex data?
>>
>> last time i checked, the latter was impossible to do via the sequencer
>> API (please correct if things have changed).
>
>Sending/receiving sysex has always been possible AFAIK. It's
>certainly possible now.
its bounded by size limits that have to (re)set in advance. when i
tried to download new firmware (1MB+) via SYSEX to an Alesis ADAT, it
was very difficult to discover this limitation.
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Which API for MIDI?
2003-12-10 14:50 ` Paul Davis
@ 2003-12-11 11:14 ` Clemens Ladisch
0 siblings, 0 replies; 8+ messages in thread
From: Clemens Ladisch @ 2003-12-11 11:14 UTC (permalink / raw)
To: Paul Davis; +Cc: alsa-devel
Paul Davis wrote:
> >Sending/receiving sysex has always been possible AFAIK. It's
> >certainly possible now.
>
> its bounded by size limits that have to (re)set in advance. when i
> tried to download new firmware (1MB+) via SYSEX to an Alesis ADAT, it
> was very difficult to discover this limitation.
Yes; it's a problem that ALSA wants to handle each sysex as one large
chunk.
This problem occurs in another situation, too: in Standard MIDI files,
a sysex command can be split into multiple parts to be sent at
specific times, but it's impossible to do this with the ALSA
sequencer. (Well, it's possible, but the documentation says that each
SYSEX event must contain a complete sysex command.)
I think the sequencer should be changed to allow splitting of sysex
commands.
Regards,
Clemens
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Which API for MIDI?
2003-12-10 14:26 ` Clemens Ladisch
2003-12-10 14:50 ` Paul Davis
@ 2003-12-10 19:50 ` Tim Goetze
1 sibling, 0 replies; 8+ messages in thread
From: Tim Goetze @ 2003-12-10 19:50 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel
Clemens Ladisch wrote:
>Tim Goetze wrote:
>> * what kind(s) of sync-to-external will you need?
>> * do you want to receive/send MIDI sysex data?
>>
>> last time i checked, the latter was impossible to do via the sequencer
>> API (please correct if things have changed).
>
>Sending/receiving sysex has always been possible AFAIK. It's
>certainly possible now.
indeed, it works both ways in 1.0.0rc. thanks.
tim
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-12-11 11:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-10 9:29 Which API for MIDI? Denis de Leeuw Duarte
2003-12-10 10:35 ` Clemens Ladisch
2003-12-10 11:06 ` Tim Goetze
2003-12-10 11:42 ` Patrick Shirkey
2003-12-10 14:26 ` Clemens Ladisch
2003-12-10 14:50 ` Paul Davis
2003-12-11 11:14 ` Clemens Ladisch
2003-12-10 19:50 ` Tim Goetze
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.