*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> midi/mdSend (3d)              


mdSend(3dm)							   mdSend(3dm)

NAME    [Toc]    [Back]

     mdSend - send out MIDI data

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/midi.h>

     int mdSend(MDport port, MDevent *buf, int count)

DESCRIPTION    [Toc]    [Back]

     mdSend writes MIDI	events to the interface	indicated by port.  buf	points
     to	a user-allocated array containing at least count MDevent structures.
     mdSend will always	transmit count events; it will block if	necessary
     waiting for the interface event queue to drain.

     The event structure contains the MIDI message to be transmitted in	the
     msg field (see mdIntro(3dm) for details on	the MDevent structure).	 If
     the application wishes to transmit	a system exclusive message, it should
     set msg[0]	to MD_SYSEX (0xF0), point sysexmsg to the block	of sysex data,
     and set msglen to the length of the sysex data.  It is possible for a
     system exclusive message to be transmitted	in multiple segments, but the
     first byte	in the first sysexmsg chunk must contain MD_SYSEX, and the
     last byte in the last sysexmsg chunk must be MD_EOX.

     The current implementation	of the library cannot properly merge multiple
     streams of	system exclusive data transmitted to the same interface. For
     best results no more than one port	should transmit	system exclusive data
     to	an interface at	any given time.

     The stamp field of	the event governs when that event will be transmitted.
     Event stamps must be greater than or equal	to 0. The interpretation of a
     stamp depends on the stamping mode	of the port (see mdSetStampMode(3dm)).
     If	the port's stamp mode is MD_NOSTAMP, the event will be transmitted
     immediately.  If the stamp	mode is	MD_RELATIVESTAMP or MD_DELTASTAMP, the
     stamp value is in milliseconds. In	MD_RELATIVETICKS or MD_DELTATICKS
     mode, the stamp value is in ticks.	 When in one of	the relative stamp
     modes, the	time stamps of the events must increase	monotonically.	In
     these modes (MD_RELATIVETICKS and MD_RELATIVESTAMP), if an	application
     sends an event whose timestamp is less than that of its predecessor, the
     event will	be transmitted immediately.

     If	the MIDI interface's event queue is full when mdSend is	called,	mdSend
     will block	until space if available.  To avoid blocking, and application
     can call select(3)	(see mdGetFd).

RETURN VALUE    [Toc]    [Back]

     mdSend returns the	number of messages actually sent on success or -1
     times the number of messages sent on error.  Note that a return value of
     0 indicates that an error occurred	and that no messages were sent.	 The
     following error codes are possible:

									Page 1

mdSend(3dm)							   mdSend(3dm)

     ENXIO    -	A bad MDport was passed	to mdSend

     EFAULT   -	An invalid address was passed to the MIDI driver

     EINVAL   -	An undefined operation was called.

SEE ALSO    [Toc]    [Back]

     mdIntro(3dm), mdSetStampMode(3dm),	mdGetFd, select(2)

									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
t_snd Tru64 Send normal data or expedited data over a connection
t_snd IRIX send data or expedited data over a connection
t_snd HP-UX send data or expedited data over a connection
t_sndudata IRIX send a data unit
t_sndudata Tru64 Send a data unit
t_sndudata HP-UX send a data unit
t_sndvudata Tru64 Send a data unit from one or more non-contiguous buffers
DtTermSubprocSend HP-UX send data to a DtTerm widget's subprocess
DtTermDisplaySend HP-UX send data to a DtTerm widget's display
tcsendbreak Tru64 Send a break on an asynchronous serial data line
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service