All of lore.kernel.org
 help / color / mirror / Atom feed
* Alsa sequencer port type flags
@ 2003-12-10 10:20 David Garcia Garzon
  2003-12-10 11:44 ` Patrick Shirkey
  0 siblings, 1 reply; 5+ messages in thread
From: David Garcia Garzon @ 2003-12-10 10:20 UTC (permalink / raw)
  To: alsa-devel

What is the use, in a programmer view, of alsa sequencer port type flags? How 
this transcends to the 'user experience'?



(Context: Keep doing with the sequencer chapter of the Alsa user conceptual 
model, an spanish documentation to be translated soon, at:
http://www.salleurl.edu/~is04069/Modders/Docs/alsadoc-sequencer.html)


-- 
David García Garzón <david.garcia@removespam.iua.upf.es>
Phone: 034 93 542 21 99
Music Technology Group, Institut Universitari de l'Audiovisual
Universitat Pompeu Fabra



-------------------------------------------------------
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] 5+ messages in thread

* Re: Alsa sequencer port type flags
  2003-12-10 10:20 Alsa sequencer port type flags David Garcia Garzon
@ 2003-12-10 11:44 ` Patrick Shirkey
  2003-12-10 12:35   ` David Garcia Garzon
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Shirkey @ 2003-12-10 11:44 UTC (permalink / raw)
  To: David Garcia Garzon; +Cc: alsa-devel

David Garcia Garzon wrote:
> 
> (Context: Keep doing with the sequencer chapter of the Alsa user conceptual 
> model, an spanish documentation to be translated soon, at:
> http://www.salleurl.edu/~is04069/Modders/Docs/alsadoc-sequencer.html)
> 
> 

Nice work. I have added a link to the docs page. Let us know if you need 
it hosted permanently.


-- 
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] 5+ messages in thread

* Re: Alsa sequencer port type flags
  2003-12-10 11:44 ` Patrick Shirkey
@ 2003-12-10 12:35   ` David Garcia Garzon
  2003-12-10 13:11     ` Chris Cannam
  2003-12-11 10:18     ` Clemens Ladisch
  0 siblings, 2 replies; 5+ messages in thread
From: David Garcia Garzon @ 2003-12-10 12:35 UTC (permalink / raw)
  To: Patrick Shirkey; +Cc: alsa-devel

A Dimecres 10 Desembre 2003 12:44, Patrick Shirkey va escriure:
> David Garcia Garzon wrote:
> > (Context: Keep doing with the sequencer chapter of the Alsa user
> > conceptual model, an spanish documentation to be translated soon, at:
> > http://www.salleurl.edu/~is04069/Modders/Docs/alsadoc-sequencer.html)
>
> Nice work. I have added a link to the docs page. Let us know if you need
> it hosted permanently.

Thanks a lot. :-) Notice that the link i wrote was only the sequencer chapter, 
the full document to link at is:
http://www.salleurl.edu/~is04069/Modders/Docs/alsadoc.html
But, most chapters are not as complete as sequencer chapter :-( i'll keep 
working on them.

Back to the question. Anybody knows about the usefulness of sequencer port 
types?
The API docs specifies that values:
<quote>
Each port has also the type bitmasks defined as follows:
SND_SEQ_PORT_TYPE_SPECIFIC Hardware specific port
SND_SEQ_PORT_TYPE_MIDI_GENERIC Generic MIDI device
SND_SEQ_PORT_TYPE_MIDI_GM General MIDI compatible device
SND_SEQ_PORT_TYPE_MIDI_GS GS compatible device
SND_SEQ_PORT_TYPE_MIDI_XG XG compatible device
SND_SEQ_PORT_TYPE_MIDI_MT32 MT-32 compatible device
SND_SEQ_PORT_TYPE_SYNTH Synth device
SND_SEQ_PORT_TYPE_DIRECT_SAMPLE Sampling device (supporting download)
SND_SEQ_PORT_TYPE_SAMPLE Sampling device (sample can be downloaded at any 
time)
SND_SEQ_PORT_TYPE_APPLICATION Application (sequencer/editor)
A port may contain specific midi channels, midi voices and synth voices. These 
values could be zero as default.
</quote>

But which are the implications of setting up a port with such flags?
- Are they merely informative?
- Will Alsa coerce or enhance the port usage depending on that type?
- Can the user see that information in any way?


-- 
David García Garzón <david.garcia@removespam.iua.upf.es>
Phone: 034 93 542 21 99
Music Technology Group, Institut Universitari de l'Audiovisual
Universitat Pompeu Fabra



-------------------------------------------------------
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] 5+ messages in thread

* Re: Alsa sequencer port type flags
  2003-12-10 12:35   ` David Garcia Garzon
@ 2003-12-10 13:11     ` Chris Cannam
  2003-12-11 10:18     ` Clemens Ladisch
  1 sibling, 0 replies; 5+ messages in thread
From: Chris Cannam @ 2003-12-10 13:11 UTC (permalink / raw)
  To: David Garcia Garzon; +Cc: alsa-devel

On Wednesday 10 Dec 2003 12:35 pm, David Garcia Garzon wrote:
> [...]
> Each port has also the type bitmasks defined as follows:
> SND_SEQ_PORT_TYPE_SPECIFIC Hardware specific port
> SND_SEQ_PORT_TYPE_MIDI_GENERIC Generic MIDI device
> SND_SEQ_PORT_TYPE_MIDI_GM General MIDI compatible device
> [etc]

I am absolutely not an expert on this, but it's very similar to a 
question I've asked before on this list so I'll summarise my 
understanding of it and hope for corrections.

These flags indicate what sorts of sequencer events the port expects 
to be able to handle.  The fact that they refer to types of event 
rather than what the port does with those events seems to be quite an 
important distinction: for example, a port setting TYPE_SYNTH is 
saying nothing about whether it handles MIDI events or implements a 
MIDI synth, it's only saying that it can handle the direct synthesis 
class of event.  Equally it appears that an application should not 
necessarily set TYPE_APPLICATION unless it expects 
application-specific events, and so on.

For my purposes, the upshot was that I could not rely on these flags 
to find out what sort of application was implementing the port; I had 
hoped to test for soft synths with TYPE_SYNTH and TYPE_APPLICATION, 
for example, and that proved not to be possible.

> - Are they merely informative?

I think so.  I'm just not sure who the information is for.

> - Will Alsa coerce or enhance the port usage depending on that
> type?

I don't think so.

> - Can the user see that information in any way?

I don't know.  I don't think it would be terribly useful though.


Chris



-------------------------------------------------------
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] 5+ messages in thread

* Re: Alsa sequencer port type flags
  2003-12-10 12:35   ` David Garcia Garzon
  2003-12-10 13:11     ` Chris Cannam
@ 2003-12-11 10:18     ` Clemens Ladisch
  1 sibling, 0 replies; 5+ messages in thread
From: Clemens Ladisch @ 2003-12-11 10:18 UTC (permalink / raw)
  To: David Garcia Garzon; +Cc: alsa-devel

David Garcia Garzon wrote:
> SND_SEQ_PORT_TYPE_SPECIFIC Hardware specific port

something hardware-specific (obviously :-)

> SND_SEQ_PORT_TYPE_MIDI_GENERIC Generic MIDI device

Understands MIDI events/commands.

> SND_SEQ_PORT_TYPE_MIDI_GM General MIDI compatible device
> SND_SEQ_PORT_TYPE_MIDI_GS GS compatible device
> SND_SEQ_PORT_TYPE_MIDI_XG XG compatible device
> SND_SEQ_PORT_TYPE_MIDI_MT32 MT-32 compatible device

Support for these standards.  Not necessarily full support, and the
availability of instruments may depend on loaded soundfonts, but basic
things like bank selection and drum channel selection should work.

This is not set for external ports like MPU-401 which may have a
compatible device connected to them.

> SND_SEQ_PORT_TYPE_SYNTH Synth device

Device can playback sound via the SAMPLE_* events.  (The OPL3 driver
sets this flag too, so either this driver or my description is wrong.)

> SND_SEQ_PORT_TYPE_DIRECT_SAMPLE Sampling device (supporting download)

Can download instrument samples (SND_SEQ_EVENT_INSTR_PUT etc.)

> SND_SEQ_PORT_TYPE_SAMPLE Sampling device (sample can be downloaded at any time)

No ALSA driver sets this.  I don't know what "at any time" means; the
INSTR_* events _can_ be sent at any time.

> SND_SEQ_PORT_TYPE_APPLICATION Application (sequencer/editor)

This port is (usually) controlled by the user, and not by events sent
to it.

> But which are the implications of setting up a port with such flags?
> - Are they merely informative?

Yes.

> - Will Alsa coerce or enhance the port usage depending on that type?

No.  ALSA never looks at these flags, except when someone wants to
read port information.

> - Can the user see that information in any way?

It isn't even shown in the proc files AFAIK.


> What is the use, in a programmer view, of alsa sequencer port type
> flags?

Not much.  They're more or less useless for automatic selection/
filtering of ports.  It may be possible to show them to the user, but
they won't be accurate in every case.


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] 5+ messages in thread

end of thread, other threads:[~2003-12-11 10:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-10 10:20 Alsa sequencer port type flags David Garcia Garzon
2003-12-10 11:44 ` Patrick Shirkey
2003-12-10 12:35   ` David Garcia Garzon
2003-12-10 13:11     ` Chris Cannam
2003-12-11 10:18     ` Clemens Ladisch

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.