* Sequencer port type flags
@ 2003-05-07 23:42 Pedro Lopez-Cabanillas
2003-05-08 17:51 ` Frank van de Pol
0 siblings, 1 reply; 10+ messages in thread
From: Pedro Lopez-Cabanillas @ 2003-05-07 23:42 UTC (permalink / raw)
To: alsa-devel; +Cc: rosegarden-devel
Hi all,
There are some flags defined in alsa-kernel/include/asequencer.h to describe
sequencer ports.
/* port type */
#define SNDRV_SEQ_PORT_TYPE_SPECIFIC (1<<0) /* hardware specific */
#define SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC (1<<1) /* generic MIDI device */
#define SNDRV_SEQ_PORT_TYPE_MIDI_GM (1<<2) /* General MIDI compatible
device */
#define SNDRV_SEQ_PORT_TYPE_MIDI_GS (1<<3) /* GS compatible device */
#define SNDRV_SEQ_PORT_TYPE_MIDI_XG (1<<4) /* XG compatible device */
#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32 (1<<5) /* MT-32 compatible device */
/* other standards...*/
#define SNDRV_SEQ_PORT_TYPE_SYNTH (1<<10) /* Synth device */
#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11) /* Sampling device
(support sample download) */
#define SNDRV_SEQ_PORT_TYPE_SAMPLE (1<<12) /* Sampling device (sample can
be downloaded at any time) */
/*...*/
#define SNDRV_SEQ_PORT_TYPE_APPLICATION (1<<20) /* application
(sequencer/editor) */
I've checked recently some synth drivers included in ALSA: trident, gus and
opl3 are sequencer clients and they set the flag SNDRV_SEQ_PORT_TYPE_SYNTH
among others.
The emu synth driver sets several flags but not SNDRV_SEQ_PORT_TYPE_SYNTH.
Shouldn't it set also this flag?
See alsa-kernel/synth/emux/emux_seq.c:55
I don't understand why some synth drivers set the flags GM/GS/XG/MT32.
OTOH, the flags for userspace programs using ALSA library are explained here
(snd_seq_create_port)
http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_port.html#a27
I've checked some software synths that also are ALSA sequencer clients:
timidity -iA (2.12.0-pre1) reports SND_SEQ_PORT_TYPE_MIDI_GENERIC
RTSynth (1.9.1) reports SND_SEQ_PORT_TYPE_MIDI_GENERIC
LegaSynth (0.4.1) reports SND_SEQ_PORT_TYPE_MIDI_GENERIC
iiwusynth (0.2.5) reports SND_SEQ_PORT_TYPE_APPLICATION
FluidSynth (1.0.1) reports SND_SEQ_PORT_TYPE_APPLICATION
amSynth (1.0-rc2) reports SND_SEQ_PORT_TYPE_APPLICATION
AlsaModularSynth (1.4.12) reports SND_SEQ_PORT_TYPE_APPLICATION
miniFMSynth, from the ALSA 0.9.0 programming howto, reports
SND_SEQ_PORT_TYPE_APPLICATION
ZynAddSubFX (1.2) reports SND_SEQ_PORT_TYPE_SYNTH
My question is, shouldn't the soft-synth programs set the
SND_SEQ_PORT_TYPE_SYNTH flag?
What should be the right policy for userspace programs and kernel modules?
Which set of flags should each program type set?
Thanks in advance.
Regards,
Pedro
--
ALSA Library Bindings for Pascal
http://alsapas.alturl.com
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Sequencer port type flags
2003-05-07 23:42 Sequencer port type flags Pedro Lopez-Cabanillas
@ 2003-05-08 17:51 ` Frank van de Pol
2003-05-08 20:00 ` Jaroslav Kysela
0 siblings, 1 reply; 10+ messages in thread
From: Frank van de Pol @ 2003-05-08 17:51 UTC (permalink / raw)
To: Pedro Lopez-Cabanillas; +Cc: alsa-devel, rosegarden-devel
On Thu, May 08, 2003 at 01:42:10AM +0200, Pedro Lopez-Cabanillas wrote:
....
> #define SNDRV_SEQ_PORT_TYPE_SYNTH (1<<10) /* Synth device */
> #define SNDRV_SEQ_PORT_TYPE_APPLICATION (1<<20) /* application (sequencer/editor) */
.....
> I've checked some software synths that also are ALSA sequencer clients:
>
> timidity -iA (2.12.0-pre1) reports SND_SEQ_PORT_TYPE_MIDI_GENERIC
> RTSynth (1.9.1) reports SND_SEQ_PORT_TYPE_MIDI_GENERIC
> LegaSynth (0.4.1) reports SND_SEQ_PORT_TYPE_MIDI_GENERIC
> iiwusynth (0.2.5) reports SND_SEQ_PORT_TYPE_APPLICATION
> FluidSynth (1.0.1) reports SND_SEQ_PORT_TYPE_APPLICATION
> amSynth (1.0-rc2) reports SND_SEQ_PORT_TYPE_APPLICATION
> AlsaModularSynth (1.4.12) reports SND_SEQ_PORT_TYPE_APPLICATION
> miniFMSynth, from the ALSA 0.9.0 programming howto, reports
> SND_SEQ_PORT_TYPE_APPLICATION
> ZynAddSubFX (1.2) reports SND_SEQ_PORT_TYPE_SYNTH
>
> My question is, shouldn't the soft-synth programs set the
> SND_SEQ_PORT_TYPE_SYNTH flag?
> What should be the right policy for userspace programs and kernel modules?
> Which set of flags should each program type set?
>
Hi Pedro,
you are perfectly right, the soft-synth programs should indeed set the
SND_SEQ_PORT_TYPE_SYNTH flag, and possibly the others (GM/XG etc.) if they
support that standard.
The port type is supposed to help applications/users in setting up
connections (eg provide sensible defaults).
To the clients it does not matter if another clients resides in userland or
kernel space; in fact in the future a part or whole of the alsa sequencer
might transparantly move into userspace.
Regards,
Frank.
--
+---- --- -- - - - -
| Frank van de Pol -o) A-L-S-A
| FvdPol@home.nl /\\ Sounds good!
| http://www.alsa-project.org _\_v
| Linux - Why use Windows if we have doors available?
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Sequencer port type flags
2003-05-08 17:51 ` Frank van de Pol
@ 2003-05-08 20:00 ` Jaroslav Kysela
2003-05-09 9:54 ` [Rosegarden-devel] " Chris Cannam
0 siblings, 1 reply; 10+ messages in thread
From: Jaroslav Kysela @ 2003-05-08 20:00 UTC (permalink / raw)
To: Frank van de Pol; +Cc: Pedro Lopez-Cabanillas, alsa-devel, rosegarden-devel
On Thu, 8 May 2003, Frank van de Pol wrote:
>
> On Thu, May 08, 2003 at 01:42:10AM +0200, Pedro Lopez-Cabanillas wrote:
> ....
> > #define SNDRV_SEQ_PORT_TYPE_SYNTH (1<<10) /* Synth device */
> > #define SNDRV_SEQ_PORT_TYPE_APPLICATION (1<<20) /* application (sequencer/editor) */
> .....
> > I've checked some software synths that also are ALSA sequencer clients:
> >
> > timidity -iA (2.12.0-pre1) reports SND_SEQ_PORT_TYPE_MIDI_GENERIC
> > RTSynth (1.9.1) reports SND_SEQ_PORT_TYPE_MIDI_GENERIC
> > LegaSynth (0.4.1) reports SND_SEQ_PORT_TYPE_MIDI_GENERIC
> > iiwusynth (0.2.5) reports SND_SEQ_PORT_TYPE_APPLICATION
> > FluidSynth (1.0.1) reports SND_SEQ_PORT_TYPE_APPLICATION
> > amSynth (1.0-rc2) reports SND_SEQ_PORT_TYPE_APPLICATION
> > AlsaModularSynth (1.4.12) reports SND_SEQ_PORT_TYPE_APPLICATION
> > miniFMSynth, from the ALSA 0.9.0 programming howto, reports
> > SND_SEQ_PORT_TYPE_APPLICATION
> > ZynAddSubFX (1.2) reports SND_SEQ_PORT_TYPE_SYNTH
> >
> > My question is, shouldn't the soft-synth programs set the
> > SND_SEQ_PORT_TYPE_SYNTH flag?
> > What should be the right policy for userspace programs and kernel modules?
> > Which set of flags should each program type set?
> >
>
> Hi Pedro,
>
> you are perfectly right, the soft-synth programs should indeed set the
> SND_SEQ_PORT_TYPE_SYNTH flag, and possibly the others (GM/XG etc.) if they
> support that standard.
Note that the SYNTH ports should support SNDRV_SEQ_EVENT_SAMPLE* events.
It means direct wavetable synthesis not MIDI event communication.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Rosegarden-devel] Re: Sequencer port type flags
2003-05-08 20:00 ` Jaroslav Kysela
@ 2003-05-09 9:54 ` Chris Cannam
2003-05-09 10:11 ` Chris Cannam
2003-05-09 10:43 ` Jaroslav Kysela
0 siblings, 2 replies; 10+ messages in thread
From: Chris Cannam @ 2003-05-09 9:54 UTC (permalink / raw)
To: alsa-devel; +Cc: rosegarden-devel
Jaroslav Kysela wrote:
> Note that the SYNTH ports should support SNDRV_SEQ_EVENT_SAMPLE* events.
> It means direct wavetable synthesis not MIDI event communication.
OK, now I'm confused again. Are you saying that a soft synth that
can only be driven via MIDI should not describe itself as a SYNTH?
If so, how do I know it's a synth?
My interpretation so far has been that most soft synths should set
SYNTH, APPLICATION and possibly SAMPLE if they're sample-based,
whereas a sequencer like Rosegarden should set APPLICATION and
nothing else. Do I have that wrong?
(And I don't know of any soft synths that are always GM devices,
so I'm doubtful -- as I mentioned in another email -- whether they
should be setting GM or not.)
Chris
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Rosegarden-devel] Re: Sequencer port type flags
2003-05-09 9:54 ` [Rosegarden-devel] " Chris Cannam
@ 2003-05-09 10:11 ` Chris Cannam
2003-05-09 10:54 ` Jaroslav Kysela
2003-05-09 10:43 ` Jaroslav Kysela
1 sibling, 1 reply; 10+ messages in thread
From: Chris Cannam @ 2003-05-09 10:11 UTC (permalink / raw)
To: alsa-devel; +Cc: rosegarden-devel
Chris Cannam wrote:
> Are you saying that a soft synth that
> can only be driven via MIDI should not describe itself as a SYNTH?
> If so, how do I know it's a synth?
I suppose (replying to myself) that it's all about what these flags
are intended to be used for. I had assumed they were basically
informational flags for identifying classes of device, and as I've
only had to deal with MIDI clients (and then only very naively),
I've only really thought about clients that are already assumed to
understand MIDI.
I suppose the alternative is that these flags are necessary to
distinguish between different modes of communication -- different
sorts of events that a particular client understands. So once
I've found out that a device is a MIDI device, how I find out that
it's then a synth is entirely my problem -- the API doesn't care,
because MIDI is all the same to it anyway.
If that's so, then these flags are of no use to Rosegarden.
Chris
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Rosegarden-devel] Re: Sequencer port type flags
2003-05-09 10:11 ` Chris Cannam
@ 2003-05-09 10:54 ` Jaroslav Kysela
0 siblings, 0 replies; 10+ messages in thread
From: Jaroslav Kysela @ 2003-05-09 10:54 UTC (permalink / raw)
To: Chris Cannam; +Cc: alsa-devel, rosegarden-devel
On Fri, 9 May 2003, Chris Cannam wrote:
> Chris Cannam wrote:
> > Are you saying that a soft synth that
> > can only be driven via MIDI should not describe itself as a SYNTH?
> > If so, how do I know it's a synth?
>
> I suppose (replying to myself) that it's all about what these flags
> are intended to be used for. I had assumed they were basically
> informational flags for identifying classes of device, and as I've
> only had to deal with MIDI clients (and then only very naively),
> I've only really thought about clients that are already assumed to
> understand MIDI.
>
> I suppose the alternative is that these flags are necessary to
> distinguish between different modes of communication -- different
> sorts of events that a particular client understands. So once
> I've found out that a device is a MIDI device, how I find out that
> it's then a synth is entirely my problem -- the API doesn't care,
> because MIDI is all the same to it anyway.
>
> If that's so, then these flags are of no use to Rosegarden.
Resegarden will probably talk only with ports classified as
SNDRV_SEQ_PORT_TYPE_MIDI_*, won't? All other ports doesn't understand
the received events.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Rosegarden-devel] Re: Sequencer port type flags
2003-05-09 9:54 ` [Rosegarden-devel] " Chris Cannam
2003-05-09 10:11 ` Chris Cannam
@ 2003-05-09 10:43 ` Jaroslav Kysela
2003-05-09 12:00 ` Chris Cannam
2003-05-10 17:15 ` Pedro Lopez-Cabanillas
1 sibling, 2 replies; 10+ messages in thread
From: Jaroslav Kysela @ 2003-05-09 10:43 UTC (permalink / raw)
To: Chris Cannam; +Cc: alsa-devel, rosegarden-devel
On Fri, 9 May 2003, Chris Cannam wrote:
> Jaroslav Kysela wrote:
> > Note that the SYNTH ports should support SNDRV_SEQ_EVENT_SAMPLE* events.
> > It means direct wavetable synthesis not MIDI event communication.
>
> OK, now I'm confused again. Are you saying that a soft synth that
> can only be driven via MIDI should not describe itself as a SYNTH?
> If so, how do I know it's a synth?
>
> My interpretation so far has been that most soft synths should set
> SYNTH, APPLICATION and possibly SAMPLE if they're sample-based,
> whereas a sequencer like Rosegarden should set APPLICATION and
> nothing else. Do I have that wrong?
>
> (And I don't know of any soft synths that are always GM devices,
> so I'm doubtful -- as I mentioned in another email -- whether they
> should be setting GM or not.)
Note that we might change the define if it cause problems. But here is
interpretation of flags:
SNDRV_SEQ_PORT_TYPE_MIDI_* defines are for client which understands the
midi v1.0 commands and extensions
SNDRV_SEQ_PORT_TYPE_SYNTH define is for clients which can do direct
wavetable synthesis (used by modplayers etc.)
SNDRV_SEQ_PORT_TYPE_APPLICATION is for an application (sequencer or
editor) - it doesn't apply for software MIDI synthesizers nor for
wavetable direct synthesizers in the user space
I think that your confusion is that we separate MIDI synthesizers
(clients) and direct wavetable sythesizers (clients).
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Rosegarden-devel] Re: Sequencer port type flags
2003-05-09 10:43 ` Jaroslav Kysela
@ 2003-05-09 12:00 ` Chris Cannam
2003-05-10 17:15 ` Pedro Lopez-Cabanillas
1 sibling, 0 replies; 10+ messages in thread
From: Chris Cannam @ 2003-05-09 12:00 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel, rosegarden-devel
Jaroslav Kysela wrote:
> SNDRV_SEQ_PORT_TYPE_MIDI_* defines are for client which understands the
> midi v1.0 commands and extensions
Right, so these flags are all about the events that a client
understands, not about describing the client as I had first
imagined.
So there is no way for a MIDI-based soft synth (that does not
support GM etc and does not do direct wavetable synthesis) to
indicate that it is a synth, for the benefit of an application
such as Rosegarden that would like to be able to show the user
a distinction between a soft synth and e.g. a record port on
another sequencer?
Similarly, since the APPLICATION type is not a MIDI_* type,
does that mean that it indicates a port that only understands
application-specific non-MIDI events? So the numerous existing
soft synths that set APPLICATION on their MIDI input ports --
including the ALSA 0.9 programming howto example -- are actually
giving false (rather than merely incomplete) information?
And harking back to the other part of Pedro's initial question,
does this also mean that we shouldn't rely on the presence of
the SND_SEQ_PORT_TYPE_SYNTH flag to identify soundcard-hosted
MIDI synths that accept MIDI events (in order to distinguish
them from external MIDI devices), because that flag will not be
there if MIDI is all the synth's driver understands?
Chris
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Rosegarden-devel] Re: Sequencer port type flags
2003-05-09 10:43 ` Jaroslav Kysela
2003-05-09 12:00 ` Chris Cannam
@ 2003-05-10 17:15 ` Pedro Lopez-Cabanillas
2003-05-12 10:02 ` Takashi Iwai
1 sibling, 1 reply; 10+ messages in thread
From: Pedro Lopez-Cabanillas @ 2003-05-10 17:15 UTC (permalink / raw)
To: Jaroslav Kysela, Chris Cannam; +Cc: alsa-devel, rosegarden-devel
On Friday 09 May 2003 12:43, Jaroslav Kysela wrote:
> SNDRV_SEQ_PORT_TYPE_SYNTH define is for clients which can do direct
> wavetable synthesis (used by modplayers etc.)
Emu chip based soundcards, as SoundBlaster AWE XX, are able to do wavetable
synthesis. Aren't it? The ALSA emu driver for these cards does not set
SNDRV_SEQ_PORT_TYPE_SYNTH flag. See emux_seq.c:55
OTOH, opl3 ALSA driver is for a family of FM synths that doesn't do wavetable
synthesis. This driver *sets* SNDRV_SEQ_PORT_TYPE_SYNTH flag. See
opl3_seq.c:204
This seems contradictory with your explanation. Could you clarify if i missed
something or if those drivers are wrong and need to be updated ?
Regards,
Pedro
--
ALSA Library Bindings for Pascal
http://alsapas.alturl.com
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Rosegarden-devel] Re: Sequencer port type flags
2003-05-10 17:15 ` Pedro Lopez-Cabanillas
@ 2003-05-12 10:02 ` Takashi Iwai
0 siblings, 0 replies; 10+ messages in thread
From: Takashi Iwai @ 2003-05-12 10:02 UTC (permalink / raw)
To: Pedro Lopez-Cabanillas
Cc: Jaroslav Kysela, Chris Cannam, alsa-devel, rosegarden-devel
At Sat, 10 May 2003 19:15:39 +0200,
Pedro Lopez-Cabanillas wrote:
>
> On Friday 09 May 2003 12:43, Jaroslav Kysela wrote:
> > SNDRV_SEQ_PORT_TYPE_SYNTH define is for clients which can do direct
> > wavetable synthesis (used by modplayers etc.)
>
> Emu chip based soundcards, as SoundBlaster AWE XX, are able to do wavetable
> synthesis. Aren't it? The ALSA emu driver for these cards does not set
> SNDRV_SEQ_PORT_TYPE_SYNTH flag. See emux_seq.c:55
the mentioned above is that the functionality of sample-download and
playback over ALSA sequencer API. yes, Emu chip supports Wavetable,
but from outside it's nothing but a MIDI playback device.
> OTOH, opl3 ALSA driver is for a family of FM synths that doesn't do wavetable
> synthesis. This driver *sets* SNDRV_SEQ_PORT_TYPE_SYNTH flag. See
> opl3_seq.c:204
OPL3 supports the instrument layer on sequencer. You can (need to)
load the samples before using this device.
OTOH, AWE (and Emu10k1) don't support this function (yet), at least as
"native ALSA" mode. There is a compatible "synth" mode as an OSS
sequencer emulation device, but it's not controlled directly over ALSA
sequencer ports. that's why SYNTH flag is not set on AWE ports.
ciao,
Takashi
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-05-12 10:02 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-07 23:42 Sequencer port type flags Pedro Lopez-Cabanillas
2003-05-08 17:51 ` Frank van de Pol
2003-05-08 20:00 ` Jaroslav Kysela
2003-05-09 9:54 ` [Rosegarden-devel] " Chris Cannam
2003-05-09 10:11 ` Chris Cannam
2003-05-09 10:54 ` Jaroslav Kysela
2003-05-09 10:43 ` Jaroslav Kysela
2003-05-09 12:00 ` Chris Cannam
2003-05-10 17:15 ` Pedro Lopez-Cabanillas
2003-05-12 10:02 ` Takashi Iwai
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.