#include <windows.h>
#include <conio.h>
#include <stdio.h>

struct SEvent
{
	SEvent(int _nOfs=0,	int _nPat=-1, float _fAmp=0.0f)
	{
		nOfs=_nOfs;
		nPat=_nPat;
		fAmp=_fAmp;
		nLen=0;
	}
	int nOfs;
	int nPat;
	float fAmp;
	int nLen;
};

struct SExpr
{
	SExpr(unsigned char _nExpr, int _nOfs, int _nAttack, int _nSustain, int _nRelease, float _fBlend)
	{
		nExpr=_nExpr;
		nOfs=_nOfs;
		nAttack=_nAttack;
		nSustain=_nSustain;
		nRelease=_nRelease;
		fBlend=_fBlend;
	}
	unsigned char nExpr;
	int nOfs;
	int nAttack;
	int nSustain;
	int nRelease;
	float fBlend;
};

struct SWaveHdr
{
	char RIFF[4];									// "RIFF" tag
	unsigned long dwSize;					// Size of data to follow
	char WAVE[4];									// "WAVE" tag
	char fmt_[4];									// "fmt " tag
	unsigned long dw16;						// 16
	unsigned short wOne_0;				// 1
	unsigned short wChnls;				// Number of Channels
	unsigned long dwSRate;				// Sample Rate
	unsigned long BytesPerSec;		// Bytes per second
	unsigned short wBlkAlign;			// Block align
	unsigned short BitsPerSample; // Sample size
	char DATA[4];									// "DATA"
	unsigned long dwDSize;				// Number of Samples
};

struct SCueData
{
	int nId;
	int nSmpPos;
	char data[4];
	int nUnknown1;
	int nUnknown2;
	int nSmpPosDuplicate;
};

struct SCueLabel
{
	int nId;
	char sName[256];
	char sNote[256];
};