/*
 * Structures for DX7
 */
struct dx7operator {
	char	o_rate[4],			/* EG Rate */
		o_level[4],				/* EG Level */
		o_breakP,				/* Keyboard Breakpoint */
		o_lDepth,				/* Keyboard Depth Left */
		o_rDepth,				/* Keyboard Depth Right */
		o_lCurve,				/* Keyboard Curve Left */
		o_rCurve,				/* Keyboard Curve Right */
		o_rates,				/* Keyboard Rate Scale */
		o_sens,					/* Modulation Sensitivity */
		o_velocity,				/* Velocity Sensitivity */
		o_output,				/* Output Level */
		o_oscMode,				/* Oscillator Mode */
		o_Cfreq,				/* Coarse Frequency */
		o_Ffreq,				/* Fine Frequency */
		o_detune;				/* Oscillator Detune */
};

struct dx7voice {
	char
	v_operator[6][21],			/* cast each to (struct dx7operator)*/
	v_pRate[4],					/* Pitch EG Rate */
	v_pLevel[4],				/* Pitch EG Level */
	v_algorithm,				/* Algorithm */
	v_feedback,					/* Feedback */
	v_sync,						/* Oscillator Sync */
	v_lfoSpeed,					/* LFO Speed */
	v_lfoDelay,					/* LFO Delay */
	v_lfoPmd,					/* LFO PMD */
	v_lfoAmd,					/* LFO AMD */
	v_lfoSync,					/* LFO SYNC */
	v_lfoWave,					/* LFO Waveform */
	v_pSens,					/* Pitch Mod Sensitivity */
	v_transpose,				/* Voice Transpose */
	v_name[10],					/* Voice Name */
	v_checksum;					/* Voice MIDI Checksum */
};

/*
 * Compressed DX7 bank dump
 */
struct Cdx7operator {			/* Compressed dx7 operator dump */
	char
	co_rate[4],					/* EG Rate */
	co_level[4],				/* EG Level */
	co_breakP,					/* Keyboard Breakpoint */
	co_lDepth,					/* Keyboard Depth Left */
	co_rDepth,					/* Keyboard Depth Right */
	co_rlCurves,				/* Keyboard Right and Left Curves */
	co_dtr,						/* Detune and Rate Scale */
	co_velsams,					/* Velocity and AM Sensitivity */
	co_output,					/* Output Level */
	co_mc,						/* Mode and Coarse Frequency */
	co_fine;					/* Fine Frequency */
};

struct Cdx7voice {
	char
	cv_operator[6][17],			/* cast each to (struct Cdx7operator) */
	cv_pRate[4],
	cv_pLevel[4],
	cv_algorithm,
	cv_opSyncFeedback,
	cv_lfoSpeed,
	cv_lfoDelay,
	cv_lfoPmd,
	cv_lfoAmd,
	cv_PLL,						/* PM sens/LFO wave/LFO sync */
	cv_transpose,
	cv_name[10];
};

struct dx7bank {
	char b_voice[32][128];		/* cast each to (struct Cdx7voice) */
	char checksum;
};

#define	MACH_DX7	0x43
