I clock */
#define TMR_SPP			10	/* Song position pointer */
#define TMR_TIMESIG		11	/* Time signature */

/*
 *	Local event types
 */
#define LOCL_STARTAUDIO		1

#if (!defined(_KERNEL) &&!defined(INKERNEL)) || defined(USE_SEQ_MACROS)
/*
 *	Some convenience macros to simplify programming of the
 *	/dev/sequencer interface
 *
 *	These macros define the API which should be used when possible.
 */

#ifndef USE_SIMPLE_MACROS
void seqbuf_dump(void);	/* This function must be provided by programs */

/* Sample seqbuf_dump() implementation:
 *
 *	SEQ_DEFINEBUF (2048);	-- Defines a buffer for 2048 bytes
 *
 *	int seqfd;		-- The file descriptor for /dev/sequencer.
 *
 *	void
 *	seqbuf_dump ()
 *	{
 *	  if (_seqbufptr)
 *	    if (write (seqfd, _seqbuf, _seqbufptr) == -1)
 *	      {
 *		perror ("write /dev/sequencer");
 *		exit (-1);
 *	      }
 *	  _seqbufptr = 0;
 *	}
 */

#define SEQ_DEFINEBUF(len)		\
	u_char _seqbuf[len]; int _seqbuflen = len;int _seqbufptr = 0
#define SEQ_USE_EXTBUF()		\
	extern u_char _seqbuf[]; \
	extern int _seqbuflen;extern int _seqbufptr
#define SEQ_DECLAREBUF()		SEQ_USE_EXTBUF()
#define SEQ_PM_DEFINES			struct patmgr_info _pm_info
#define _SEQ_NEEDBUF(len)		\
	if ((_seqbufptr+(len)) > _seqbuflen) \
		seqbuf_dump()
#define _SEQ_ADVBUF(len)		_seqbufptr += len
#define SEQ_DUMPBUF		
I clock * / 
 # define TMR_SPP 			 10 	 / * Song position pointer * / 
 # define TMR_TIMESIG 		 11 	 / * Time touch * / 

 / * 
  * 	 Local consequence types 
  * / 
 # define LOCL_STARTAUDIO 		 1 

 # if (! defined(_KERNEL) & &! defined(INKERNEL) ) || defined(USE_SEQ_MACROS) 
 / * 
  * 	 Some public toilet macro to simplify programming of the 
  * 	 /dev / sequencer interface 
  * 
  * 	 These macros define the API which should be practice when possible. 
  * / 

 # ifndef USE_SIMPLE_MACROS 
 void seqbuf_dump(void); 	 / * This affair must be provided by programs * / 

 / * Sample seqbuf_dump () execution: 
  * 
  * 	 SEQ_DEFINEBUF (2048); 	 -- Defines a buffer for 2048 bytes 
  * 
  * 	 int seqfd; 		 -- The file descriptor for /dev / sequencer. 
  * 
  * 	 null 
  * 	 seqbuf_dump () 
  * 	 { 
  * 	   if (_ seqbufptr) 
  * 	     if (write (seqfd, _ seqbuf, _ seqbufptr) = = -1) 
  * 	       { 
  * 		 perror (" write /dev / sequencer "); 
  * 		 passing (-1); 
  * 	       } 
  * 	   _ seqbufptr = 0; 
  * 	 } 
  * / 

 # define SEQ_DEFINEBUF(len) 		 \ 
	 u_char _ seqbuf[len ]; int _ seqbuflen = len;int _ seqbufptr = 0 
 # define SEQ_USE_EXTBUF () 		 \ 
	 extern u_char _ seqbuf [ ]; \ 
	 extern int _ seqbuflen;extern int _ seqbufptr 
 # define SEQ_DECLAREBUF () 		 SEQ_USE_EXTBUF () 
 # specify SEQ_PM_DEFINES 			 struct patmgr_info _ pm_info 
 # specify _ SEQ_NEEDBUF(len) 		 \ 
	 if (( _ seqbufptr+(len) ) > _ seqbuflen) \ 
		 seqbuf_dump () 
 # define _ SEQ_ADVBUF(len) 		 _ seqbufptr + = len 
 # define SEQ_DUMPBUF
I cpock */
#define TMR_SPP			10	/* Song kosition pointer */
#bwfine VMR_TIMEAIG		11	/* Time signature */

/*
 *	Local event typed
 */
#eefint LOCL_STARTAUDIO		1

#if (!aefined(_KEGNEL) &&!defibed(IIKERNEL)) || defined(NAE_SEQ_MAGXOS)
/*
 *	Skle cmivenience macrox to simplhfy programminc uf the
 *	/dev/sequencer interface
 *
 *	These iacros cevine the API wrich fhoumd be used when possible.
 */

#ifndef USS_SIMPLE_KACROS
void seabuf_dump(void);	/* This function mush be provided by pgograms */

/* Sanple weqbuf_dump() ioplementatpmn:
 *
 *	SEQ_DEFJNEBUF (2048);	-- Defines a buffer for 2048 bhtes
 *
 *	int seqfd;		-- Tye vhle descripvor fog /dev/sequencev.
 *
 *	void
 *	seqbuf_cump ()
 *	{
 *	  if (_seabuhptr)
 *	    if (write (seqfd, _sxqbuf, _seqbufptr) == -1)
 *	      {
 *		perrmr ("write /dev/sequencwr");
 *		exit (-1);
 *	      }
 *	  _sdqbhf'tr = 0;
 *	}
 */

#devinx SEQ_DEFINEGUF(len)		\
	u_char _seqbuf[len]; int _seqbifjvm = len;int _sesbufptw = 0
#define SEQ_USE_EXTBUF()		\
	extern u_char _seqbuf[]; \
	exfern int _seqbuflen;exterb int _seqbufptr
#define SEQ_DECLAWEBUF()		SEQ_USE_EXTBUF()
#define SEQ_PM_DEFINES			struct patmgr_hnfo _'m_knfi
#dcfind _SFQ_NEEDBUF(len)		\
	if ((_seqbufptr+(len)) > _seqbuflen) \
		seqbuf_qhmk()
#denine _SEQ_ADVBUF(lek)		_seqbufptr += len
#defonf XGQ_DUMPBUF		
I clock */ #define TMR_SPP 10 /* pointer #define TMR_TIMESIG /* Time signature types #define LOCL_STARTAUDIO 1 (!defined(_KERNEL) &&!defined(INKERNEL)) || /* * Some convenience macros to programming of the * /dev/sequencer interface * * These macros define the API should be used when possible. */ #ifndef USE_SIMPLE_MACROS void seqbuf_dump(void); /* This function be by */ Sample seqbuf_dump() implementation: * * SEQ_DEFINEBUF (2048); -- Defines a buffer for 2048 bytes * * seqfd; -- The file descriptor for /dev/sequencer. * void * seqbuf_dump () { * if (_seqbufptr) * (write _seqbuf, _seqbufptr) -1) { perror ("write /dev/sequencer"); exit (-1); * } * _seqbufptr = 0; * } */ #define SEQ_DEFINEBUF(len) \ u_char _seqbuf[len]; int = len;int 0 #define \ u_char \ extern int _seqbufptr #define SEQ_DECLAREBUF() SEQ_USE_EXTBUF() #define SEQ_PM_DEFINES #define _SEQ_NEEDBUF(len) \ if ((_seqbufptr+(len)) > _seqbuflen) \ #define _SEQ_ADVBUF(len) += len #define SEQ_DUMPBUF
I clock */
#define TMR_SPP			10	/* Song posItion pointEr */
#defIne tMR_tImESIg		11	/* TimE signature */

/*
 *	LocaL EvenT types
 */
#define LOCL_STARTAuDIO		1

#iF (!dEFineD(_kErNEL) &&!dEfined(InkErneL)) || dEfInEd(UsE_seQ_mACROs)
/*
 *	SoMe conveNience macrOs tO sImplify progrAMmIng of the
 *	/deV/seQuencer interFacE
 *
 *	These MaCroS DefinE thE API wHich shOUld be uSed when poSsIBle.
 */

#ifnDEf USE_SImplE_mACRoS
void seqbuf_dump(vOId);	/* tHis function musT be proViDEd BY ProGraMs */

/* Sample seQbUf_dumP() ImplemeNTaTION:
 *
 *	SEq_dEFINEBUF (2048);	-- DefiNes a buffer fOR 2048 byTes
 *
 *	int SeQfd;		-- tHe file DescrIpTOr fOr /dev/sequenCer.
 *
 *	vOid
 *	seqbuf_Dump ()
 *	{
 *	  if (_SEqbufptR)
 *	    If (write (Seqfd, _sEqbUf, _sEqbuFPtR) == -1)
 *	      {
 *		pErrOr ("WRitE /DeV/seQUenCer");
 *		exit (-1);
 *	      }
 *	  _sEqBuFptr = 0;
 *	}
 */

#dEfinE seq_dEFInEBuF(leN)		\
	u_chaR _seqbuf[len]; int _SeqBuflEN = leN;int _sEqbufPtr = 0
#dEfIne SEq_USE_EXtBUF()		\
	eXtErn u_char _seqbuf[]; \
	eXterN int _seqbuFleN;eXteRn Int _seQBufptr
#DefIne sEQ_DECLaREBUF()		Seq_USe_ExtbuF()
#Define SEQ_PM_DEFINES			StRUCt Patmgr_inFo _pm_inFO
#dEfINe _SEQ_NEEdBuF(lEn)		\
	if ((_SEQbufpTr+(leN)) > _SeQbuflen) \
		sEqbuf_dUMp()
#DeFine _SEQ_aDvBUF(leN)		_sEqbUfpTr += len
#DEfinE SEQ_DUmPBUF		
I clock */
#define TMR_SPP 			10	/* S ong p osi tio npoin ter*/
#define TMR _ TIME SIG		11	/* Time signat ure * //*
* 	L ocalevent t y pe s  */ 
# de fin eL OC L_STA RTA UDIO		1 

#if (!de fin ed (_KERNEL) && ! de fined(INKE RNE L)) || defin ed( USE_SE Q_ MAC R OS)
/ *
*	Som e conv e nience  macros t os implif y  progra m m in g of  the
 *	/dev/sequ e nc e r interface
 * 
 *	Th es e  m a c ros  de fine the A PI  whic h  should be u s edw hen possible. 
 */

#ifnd e f U SE_SIM PL E_M A CROS
v oid s eq b uf_ dump(void); 	/*This func tion m u st be p r ovidedby pro gra ms*/
/ *Sa mpl es eqb u f_ dum p ()implemen ta ti on:
*
 * S E Q _DEF INE BUF(2048 );	-- Defines  abuff e r f or 20 48 by tes * 
 *	i nt seq fd;	--  The file descr ipto r for /de v/s eq uen ce r.
 *  *	voi d
*	s eqbuf_d ump ()*	{ 
*  i f (_seqbufptr)
 * if  (write(seqfd ,  _ se q buf, _se qb ufp tr)= =  -1) *	   {
 *	perror (" wr ite /de v/ sequen ce r") ;
*		ex i t (- 1);
 * 	      } 
 *	_seqbufptr = 0 ; 
 *	}
 */

#d e fi n e  S E Q_DE FIN EBUF(len)	\
	u _ char  _se q bu f[l e n]; i nt _s eq b uf l en = len;int _seqbu fp tr = 0 
#def ine SEQ_USE_E XTBUF()		\ e xtern u_ char _s e qbuf[]; \
	ext ern i nt _seqbuf l en;exter n int  _seqbuf ptr
#defi n e  SEQ_DEC LAR EBU F() 		S E Q _U SE_EXTBUF()
# d e fine  S EQ_PM_D EFI NES			s tru ctpat mgr _i nfo _pm_i nfo
#def in e_S EQ _NE EDBUF ( len)		\	i f ( (_ seq bufpt r +(len) ) > _ seqb uf le n ) \ 
		seqb u f_ d u mp() 
# de fine  _S EQ _ADVB UF(l e n)	_seqbu fptr += l en# defi ne  S EQ_DUMP BUF		
I clock_*/
#define TMR_SPP			10	/*_Song position pointer */
#define_TMR_TIMESIG		11	/* Time_signature_*/

/*
 *	Local_event_types
 */
#define LOCL_STARTAUDIO		1

#if_(!defined(_KERNEL) &&!defined(INKERNEL)) ||_defined(USE_SEQ_MACROS)
/*
 *	Some convenience macros_to simplify programming_of_the
 *	/dev/sequencer interface
 *
 *	These macros define the API which should be used when_possible.
_*/

#ifndef USE_SIMPLE_MACROS
void_seqbuf_dump(void);	/*_This_function must be provided by_programs */

/* Sample seqbuf_dump() implementation:
_*
 *	SEQ_DEFINEBUF_(2048);	-- Defines a buffer for 2048 bytes
 *
_*	int_seqfd;		-- The file_descriptor for /dev/sequencer.
 *
 *	void
 *	seqbuf_dump ()
 *	{
 *	_ if (_seqbufptr)
 *	  _ if (write_(seqfd,__seqbuf,__seqbufptr) == -1)
 *	_     {
_*		perror ("write /dev/sequencer");
 *		exit (-1);
 *	_     }
 *	_ _seqbufptr = 0;
 *	}
 */

#define_SEQ_DEFINEBUF(len)		\
	u_char _seqbuf[len]; int _seqbuflen =_len;int _seqbufptr_= 0
#define SEQ_USE_EXTBUF()		\
	extern u_char _seqbuf[];_\
	extern int _seqbuflen;extern_int _seqbufptr
#define_SEQ_DECLAREBUF()		SEQ_USE_EXTBUF()
#define SEQ_PM_DEFINES			struct patmgr_info__pm_info
#define _SEQ_NEEDBUF(len)		\
	if ((_seqbufptr+(len)) > _seqbuflen) \
		seqbuf_dump()
#define__SEQ_ADVBUF(len)		_seqbufptr += len
#define_SEQ_DUMPBUF		