Hi Takashi, Thanks for the info... I'm a bit confused still, though. I think my biggest question is this: I have an array of structures, where each element is a MIDI message (contained in a 4-byte integer) and a timestamp. We believe that ALSA's sequencer is the highest performing way to make this stream output to a MIDI device, but it seems silly to take each raw MIDI message, encode it as a high-level event structure, and let ALSA decode it back to generic MIDI data before sending it to the device. Is there any way in ALSA 0.5 (which we're kind of stuck with now -- we'll move to 0.9 eventually, but we can't yet) to create an event that simply contains maybe just the midi message and its length, and let ALSA just send it, without having to do encoding or decoding?
If not, then I assume our best bet is to manually encode it... I saw the code in seq_midi_event.c for snd_seq_event_encode... is that what I should be trying to use? Or can I dump things into the event via the raw8/raw32 things? How do we use raw8/32? What does ALSA do with this data, and how does ALSA know that raw8/32 is the part of the union in the event structure that is used? Thanks a lot for your time --- we really appreciate it. Ricardo On Wed, 12 Dec 2001, Takashi Iwai wrote: > Hi, > > At Wed, 12 Dec 2001 03:08:07 -0500 (EST), > Ricardo Colon wrote: > > > > Sorry if you've already receive this message, but I seem to be having some > > email problems. > > > > How to I send raw midi messages to the ALSA sequencer?I have a buffer of > > timestamped midi messages that I'd like to output to the ALSA sequencer. > > > > >From the code in seq-sender.c, in the send_event() function, the event > > type is set explicity(in particular sends a Program Change Event,Echo, > > and Note events). I just want to send a raw midi message to an output > > device at a specified time. In this case, setting the event type > > explicitly would be unnecessary, since the output would interpret the midi > > message. > > > > How do I do this using the ALSA sequencer? Am I supposed to use the raw8 > > or raw32 event data types? > > It depends on the output (receiver). > If you want to feed the timestamped midi stream to a midi device > directly, then the best way is to encode the midi stream via event > encoder (available in alsa-lib 0.9.0 but not in 0.5.x). > > MIDI -> encode to an event packet -> any sequencer port > > If you have your own receiver (sequencer) port to decode the received > events, then you can use raw32 (or what else any) event types. > > MIDI -> packed raw32 -> your receiver port > -> send raw32 to a midi device > > > Takashi > _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel