/* song.h */

/* internal data structures for the soundtracker player routine....
 * will have little in common with the binary format
 */

/* $Author: Espie $
 * $Date: 91/05/12 19:55:19 $
 * $Revision: 1.12 $
 * $Log:	song.h,v $
 * Revision 1.12  91/05/12  19:55:19  Espie
 * Shortened events.
 * 
 * Revision 1.11  91/05/06  23:35:29  Espie
 * Changed finetune from UBYTE to BYTE.
 * 
 * Revision 1.10  91/05/05  04:00:56  Espie
 * Changed the definition of the number of samples.
 * 
 * Revision 1.9  91/05/02  01:31:31  Espie
 * A new sample.
 * 
 * Revision 1.8  91/04/30  00:35:59  Espie
 * Stable version III.
 * 
 * Revision 1.7  91/04/28  22:54:07  Espie
 * Changed the misleading command to parameters.
 * 
 * Revision 1.6  91/04/23  21:30:12  Espie
 * New cleanup field (see load.c).
 * 
 * Revision 1.5  91/04/21  20:05:58  Espie
 * Notes added.
 * 
 * Revision 1.4  91/04/21  12:11:57  Espie
 * Stable version, known as bunch II.
 * Also features ``right'' log description.
 * 
 * Revision 1.3  91/04/19  13:22:27  Espie
 *
 * Revision 1.2  91/04/18  02:25:13  Espie
 * bunch I.
 * 
 * Revision 1.1  91/04/17  18:52:32  Espie
 * Initial revision
 *
 */
 
#define NUMBER_SAMPLES 32
#define BLOCK_LENGTH 64
#define NUMBER_TRACKS 4

struct sample_info
	{
		char *name;
		UWORD length, rp_offset, rp_length;
		UBYTE volume;
		BYTE finetune;
		UWORD *start, *rp_start;
	};

struct event
	{
		UBYTE sample_number;
		UBYTE note;
		UBYTE effect;
		UBYTE parameters;
	};

struct block
	{
		struct event e[NUMBER_TRACKS][BLOCK_LENGTH];
	};
	
		
struct song_info
	{
		UBYTE length;
		struct block * *pblocks;
		
		UBYTE total;
		struct block *physical;
		UBYTE thing;
	};

struct song
	{
		char *title;
		CLEAN clear;
			/* sample 0 is always a dummy sample */
		struct sample_info *samples[NUMBER_SAMPLES];
		struct song_info *info;
	};

