alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* How to send non-SysEx system messages via ALSA?
@ 2013-03-05 10:56 Joerg-Cyril.Hoehle
  2013-03-05 11:51 ` Clemens Ladisch
  2013-03-09 19:42 ` Gabriel M. Beddingfield
  0 siblings, 2 replies; 9+ messages in thread
From: Joerg-Cyril.Hoehle @ 2013-03-05 10:56 UTC (permalink / raw)
  To: alsa-devel

Hi,

seqmid.h contains function that declare the major event types like
snd_seq_ev_set_noteon and snd_seq_ev_set_sysex.  However, seq_event.h
knows many more types, e.g. SND_SEQ_EVENT_START and
SND_SEQ_EVENT_CLOCK/TICK.

Now, consider an app playing a MIDI file or a debug tool that allows
to send arbitrary messages.  How should such an app send e.g. the
2-byte MTC Quarter Frame sequence via ALSA?

A. Use a 2 byte buffer F1 xx and snd_seq_ev_set_sysex(&event, 2, buf);

B. Use SND_SEQ_EVENT_TICK and figure out some copy&paste code from seqmidi.h, perhaps
   snd_seq_ev_set_queue_control(ev,SND_SEQ_EVENT_TICK,SND_SEQ_QUEUE_DIRECT,xx)
   But why does that alter my destination port via
    snd_seq_ev_set_dest(ev, SND_SEQ_CLIENT_SYSTEM, SND_SEQ_PORT_SYSTEM_TIMER)?

C. It's SND_SEQ_EVENT_CLOCK actually, TICK being the one byte F8 real-time message?

Background: Wine on Linux needs to generate such messages on behalf of
applications and users with real MIDI HW.
So far Wine assumes that it can encapsulate all system messages in a SysEx,
IOW Wine does A.  Is that usage of the set_sysex API correct?
More generally, can Wine transparently stuff system messages into a byte buffer
and send them off via snd_seq_ev_set_sysex?

Thank you,
 Jörg Höhle

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-03-13 14:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-05 10:56 How to send non-SysEx system messages via ALSA? Joerg-Cyril.Hoehle
2013-03-05 11:51 ` Clemens Ladisch
2013-03-06  5:09   ` Devin Anderson
2013-03-06  8:22     ` Clemens Ladisch
2013-03-09 19:42 ` Gabriel M. Beddingfield
2013-03-09 21:01   ` Clemens Ladisch
2013-03-09 21:21     ` Gabriel Beddingfield
2013-03-13 13:36       ` Joerg-Cyril.Hoehle
2013-03-13 14:57         ` Clemens Ladisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).