From alsa-devel-owner@alsa.jcu.cz  Thu Apr 30 19:58:45 1998
Received: from altrade.nijmegen.inter.nl.net (altrade.nijmegen.inter.nl.net [193.67.237.6])
	by marvin.jcu.cz (8.8.8/8.8.8) with ESMTP id TAA17398
	for <alsa-devel@jcu.cz>; Thu, 30 Apr 1998 19:58:34 +0200
Received: from obelix.fvdpol.inter.nl.net by altrade.nijmegen.inter.nl.net
	via bd99-15.Breda.NL.net [193.79.246.240] with ESMTP
	id TAA23072 (8.8.8/3.27); Thu, 30 Apr 1998 19:45:11 +0200 (MET DST)
Received: (from frank@localhost) by obelix.fvdpol.inter.nl.net (8.8.7/8.7.3) id SAA14963; Thu, 30 Apr 1998 18:59:11 +0200
From: Frank van de Pol <F.K.W.van.de.Pol@inter.nl.net>
Message-Id: <199804301659.SAA14963@obelix.fvdpol.inter.nl.net>
Subject: Re: New Sequencer core
To: F.K.W.van.de.Pol@inter.nl.net
Date: Thu, 30 Apr 1998 18:59:11 +0200 (MET DST)
Cc: alsa-devel@jcu.cz (alsa), P.J.Leonard@bath.ac.uk (Paul Leonard)
In-Reply-To: <no.id> from "frank" at Apr 30, 98 06:05:23 pm
Content-Type: text
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

I just wrote:
> 
> > 
> > > Events a modeled after MIDI, but are not restricted to be MIDI events. Any
> > > event that one can think of can be fed into the sequencer and dispatched at
> > > the specified time to the specified device(s).
> > 
> >  MIDI events suck. MIDI should be a wrapper layer for those who have
> > existing applications.
> 
> ???? I'm not sure we are talking about the same MIDI. If 'your' MIDI is the
> low-level MIDI protocol, with all those byte sequences, and only limited to
> a few standard events I totally agree with you. But (perhaps I was not clear
> enough) the type of events I was thinking of are modeled after MIDI in the
> spirit of "Make sound with volume aaa, pitch bbb, on channel ccc of
> intrument (port) ddd", and "Change parameter aaa to value bbb on channel ccc
> of instrument dddd". MIDI is limited in may ways because it consists of
> short packets of 7 bit values. We do not have that limit for specifying an
> event. 
> 

To illustrate what kind of events can be thought of, I'll include a portion
from the MidiShare header file. Note that these are just to give you an idea
how things CAN look like.

Cheers,
Frank.




/*****************************************************************************
 *                                MIDI SHARE									
 *----------------------------------------------------------------------------
 * MidiShare is a multi-tasking, real-time software environment, specially 
 * devised for the developing of MIDI applications with a triple target :
 * 
 * 	To propose solutions to currently met problems when developing 
 * 	 a real-time MIDI application : memory management, communication management, 
 *	 time management, task management. 
 * 
 * 	To enable the real-time and multi-tasking functioning of these applications, 
 * 	 i.e. to enable the sharing of all the necessary resources and their 
 * 	 simultaneous access.
 *
 * 	To make easier cooperation between independent MIDI applications by  proposing 
 * 	 a real-time mechanism of inter-application communications.
 * 
 * This file contains a complete description of all the MidiShare functions and 
 * procedures, as well as all the data structures in use.
 *----------------------------------------------------------------------------
 * 		            c GRAME 1989, 1990, 1991, 1992 
 *	          [Yann Orlarey, Herv Lequay, Dominique fober]						
 *----------------------------------------------------------------------------
******************************************************************************/



And...

/*******************************************************************************
 * MIDISHARE EVENTS
 *------------------------------------------------------------------------------
 * 	The listing below presents the different types of MidiShare handled events. 
 * 	This typology contains the whole of the standard Midi messages, plus specific 
 * 	messages such as typeNote corresponding to a note with its duration;  
 * 	or typeStream corresponding to a series of arbitrary bytes, possibly including 
 * 	data and status codes, sent directly without any processing; or typePrivate 
 * 	that are application private messages.
 * 	
 * 	All these codes may be used in the MidiNewEv function to allocate an event
 * 	of the desirable type and are accessible in an event evType field.
 *******************************************************************************/
			
#define typeNote		0 	/* note with pitch, velocity and duration		*/	
		
#define typeKeyOn		1 	/* Note On with pitch, velocity 				*/
#define typeKeyOff		2 	/* Note Off with pitch, velocity 				*/
#define typeKeyPress 		3 	/* Poly Key Pressure with pitch and pressure	*/
#define typeCtrlChange		4 	/* Control Change with controller ID and value	*/
#define typeProgChange		5 	/* Program Change with program ID number		*/
#define typeChanPress		6 	/* Channel Pressure with pressure value			*/
#define typePitchWheel		7 	/* Pitch Bend Change with LSB and MSB values	*/
		
#define typeSongPos		8 	/* Song Position Pointer with LSB and MSB values*/
#define typeSongSel		9 	/* Song Select with song ID number				*/
#define typeClock		10 	/* Timing Clock									*/
#define typeStart		11 	/* Start										*/
#define typeContinue		12 	/* Continue										*/
#define typeStop		13	/* Stop											*/
		
#define typeTune		14 	/* Tune Request									*/
#define typeActiveSens		15	/* Active Sensing								*/
#define typeReset		16	/* System Reset									*/
	
#define typeSysEx		17 	/* System Exclusive (only data bytes)			*/
#define typeStream		18 	/* arbitrary midi bytes (data and status codes)	*/
		
#define typePrivate		19	/*19..127 Private events for applications internal use*/
#define typeProcess		128	/* used by MidiShare for MidiCall and MidiTask	*/
#define typeDProcess		129	/* used by MidiShare for MidiDTask				*/
#define typeQuarterFrame	130	/* Midi time code quarter frame				*/

#define typeCtrl14b		131	
#define typeNonRegParam		132
#define typeRegParam		133

#define typeSeqNum		134	/* numro de squence					*/
#define typeTextual		135	/* vnement texte						*/
#define typeCopyright		136	/* message copyright					*/
#define typeSeqName		137	/* nom de squence ou de piste			*/
#define typeInstrName		138	/* nom d'instrument						*/
#define typeLyric		139	/* paroles dstines  etre chantes	*/
#define typeMarker		140	/* marqueur								*/
#define typeCuePoint		141	/* cue point							*/
#define typeChanPrefix		142	/* Midi Channel Prefix					*/
#define typeEndTrack		143	/* fin de piste							*/
#define typeTempo		144	/* changement de tempo					*/
#define typeSMPTEOffset		145	/* offset smpte							*/

#define typeTimeSign		146	/* indication de mesure					*/
#define typeKeySign		147	/* signature tonale						*/
#define typeSpecific		148	/* mta evt spcifique  un squenceur	*/

#define typeReserved		149	/*149..254	reserved for future extensions		*/
		
#define typeDead		255	/* dead Task or DTask							*/
		






/******************************************************************************
* CHANGE CODES							
*------------------------------------------------------------------------------
When an application need to know about context modifications like opening and
closing of applications, opening and closing of midi ports, changes in 
connections between applications, it can install an ApplAlarm (with 
MidiSetApplAlarm). This ApplAlarm is then called by MidiShare every time a 
context modification happens with a 32-bits code describing the modification. 
The hi 16-bits part of this code is the refNum of the application involved in 
the context modification, the low 16-bits part describe the type of change as
listed here.
*******************************************************************************/
		
enum{	MIDIOpenAppl=1,
        MIDICloseAppl,
	MIDIChgName,
	MIDIChgConnect,
	MIDISyncStart,
	MIDISyncStop,
	MIDIChangeSync,
	MIDIOpenModem=100,
	MIDICloseModem,
	MIDIOpenPrinter,
	MIDIClosePrinter
};




========================---------------->
#define NAME    "Frank van de Pol"     
#define ADDRESS "mgr. Nelislaan 10"  
#define CITY    "4741 AB Hoeven"    
#define COUNTRY "The Netherlands"  
#define EMAIL   "F.K.W.van.de.Pol@inter.NL.net     -o)
                                                   /\\
Linux - Why use Windows, since there is a door?   _\_v

