Skip to contentSkip to conversation

ALSA sequencer event types?

DISCUSSION Chris Cannam 2 participants 4 messages Dec 9, 2003 – Dec 10, 2003

lore
Share & tools
lore
#0 lore raw

Is there any documentation for the squillions of interesting-looking event types defined in snd_seq_event_type? I'm only familiar at all with the MIDI-based types, and I've failed to find anything referring to most of the others except for the trivial generated documentation.

I'm particularly intrigued by the SND_SEQ_EVENT_INSTR_* types which look suspiciously like they might be intended for something useful such as enabling soft-synths or samplers to report on their available program or patch sets. Are they? Do any applications use them?

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/

#1 lore raw
Quoted 2 lines · Chris Cannam

Is there any documentation for the squillions of interesting-looking event types defined in snd_seq_event_type?

The source.

Quoted 4 lines

I'm particularly intrigued by the SND_SEQ_EVENT_INSTR_* types which look suspiciously like they might be intended for something useful such as enabling soft-synths or samplers to report on their available program or patch sets. Are they?

Yes, they are exactly that, i.e., _intended_ for something useful.

Quoted 3 lines

I'm only familiar at all with the MIDI-based types, and I've failed to find anything referring to most of the others except for the trivial generated documentation.

Things like client/port/subscription notifications should be obvious. After grepping for the others, it turns out those are rather easy to describe:

SYSTEM: "system status" -- Not used.

SYNC_POS: "sync position changed" -- Not used.

BOUNCE: Not used.

SAMPLE_xxx: Used by gus and trident drivers to directly access
hardware voices.

INSTR_BEGIN, INSTR_END, INSTR_PUT, INSTR_FREE:
Used by opl3, gus, trident drivers to load instrument data. (Neither gus nor trident drivers implement a MIDI synthesizer.) (The emu8/10k drivers use an hardware-specific mechanism which is available via the OSS sequencer emulation only.)

RESULT: Sent to signal the result of an INSTR_BEGIN/END/PUT/FREE
event.

INSTR_INFO, INSTR_FINFO, INSTR_RESET, INSTR_STATUS, INSTR_GET, INSTR_LIST, INSTR_CLUSTER, INSTR_CLUSTER_GET:
Not implemented.

INSTR_INFO_RESULT, INSTR_FINFO_RESULT, INSTR_STATUS_RESULT, INSTR_GET_RESULT, INSTR_LIST_RESULT, INSTR_CLUSTER_RESULT:
Pffft.

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/

#2 lore raw
Quoted 5 lines · Clemens Ladisch
Quoted 2 lines · Chris Cannam

Is there any documentation for the squillions of interesting-looking event types defined in snd_seq_event_type?

The source.

Ah.

Quoted 6 lines
Quoted 4 lines

I'm particularly intrigued by the SND_SEQ_EVENT_INSTR_* types which look suspiciously like they might be intended for something useful such as enabling soft-synths or samplers to report on their available program or patch sets. Are they?

Yes, they are exactly that, i.e., _intended_ for something useful.

Ah.

So in the hypothetical situation where a soft synth application really wanted to be able to tell the world of ALSA sequencer clients about what instruments, controllers etc it had available, it would have to use some other communication layer than the ALSA sequencer?

I had always assumed that was the case, but then I just thought I might not have been paying enough attention to all those other wacky event types. I guess the fact that they're not used within ALSA doesn't mean they wouldn't be delivered to any client that decided to use them for its own nefarious purposes? I suppose one could define a simple protocol for something like the above based on the existing unused instrument event types, or the existing user-defined event types... but how would you then discover whether or not a client supported that protocol?

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/

#3 lore raw
Quoted 7 lines · Chris Cannam
Quoted 6 lines · Clemens Ladisch
Quoted 4 lines · Chris Cannam

I'm particularly intrigued by the SND_SEQ_EVENT_INSTR_* types which look suspiciously like they might be intended for something useful such as enabling soft-synths or samplers to report on their available program or patch sets. Are they?

Quoted 6 lines
Quoted 1 line

Yes, they are exactly that, i.e., _intended_ for something useful.

So in the hypothetical situation where a soft synth application really wanted to be able to tell the world of ALSA sequencer clients about what instruments, controllers etc it had available, it would have to use some other communication layer than the ALSA sequencer?

It could use some user-defined event (but as you wrote, it's hard to detect support for this). Or somebody could define the format and the semantics of the _INSTR_INFO/FINFO/LIST events, and use those.

Quoted 4 lines

I suppose one could define a simple protocol for something like the above based on the existing unused instrument event types [...] but how would you then discover whether or not a client supported that protocol?

This protocol would be part of the official ALSA API (just like INSTR_PUT already is), so ALSA could define a new port type flag.

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/