/* DelayEffectSpec.h */

#ifndef Included_DelayEffectSpec_h
#define Included_DelayEffectSpec_h

/* DelayEffectSpec module depends on */
/* MiscInfo.h */
/* Audit */
/* Debug */
/* Definitions */
/* Memory */
/* Array */
/* LFOListSpecifier */
/* Envelope */

struct DelayEffectRec;
typedef struct DelayEffectRec DelayEffectRec;

struct DelayTapRec;
typedef struct DelayTapRec DelayTapRec;

/* delay tap sources */
typedef enum
	{
		eTapLeftChannel EXECUTE(= 5121),
		eTapRightChannel,
		eTapMonoChannel
	} DelayChannelType;

/* forwards */
struct EnvelopeRec;
struct LFOListSpecRec;

/* create a new delay line specification */
DelayEffectRec*			NewDelayLineSpec(void);

/* dispose of a delay line specification */
void								DisposeDelayLineSpec(DelayEffectRec* DelaySpec);

/* set max delay time */
void								SetDelayMaxTime(DelayEffectRec* DelaySpec, float MaxTime);

/* get max delay time */
float								GetDelayMaxTime(DelayEffectRec* DelaySpec);

/* create a new tap record */
DelayTapRec*				NewDelayTap(void);

/* dispose delay tap */
void								DisposeDelayTap(DelayTapRec* Tap);

/* set tap attributes */
void								SetDelayTapSource(DelayTapRec* Tap, DelayChannelType Source);
void								SetDelayTapSourceTime(DelayTapRec* Tap, float Time);
void								SetDelayTapSourceTimeAccent1(DelayTapRec* Tap, float Accent1);
void								SetDelayTapSourceTimeAccent2(DelayTapRec* Tap, float Accent2);
void								SetDelayTapSourceTimeAccent3(DelayTapRec* Tap, float Accent3);
void								SetDelayTapSourceTimeAccent4(DelayTapRec* Tap, float Accent4);
void								SetDelayTapTarget(DelayTapRec* Tap, DelayChannelType Target);
void								SetDelayTapTargetTime(DelayTapRec* Tap, float Time);
void								SetDelayTapTargetTimeAccent1(DelayTapRec* Tap, float Accent1);
void								SetDelayTapTargetTimeAccent2(DelayTapRec* Tap, float Accent2);
void								SetDelayTapTargetTimeAccent3(DelayTapRec* Tap, float Accent3);
void								SetDelayTapTargetTimeAccent4(DelayTapRec* Tap, float Accent4);
void								SetDelayTapScale(DelayTapRec* Tap, float Scale);
void								SetDelayTapScaleAccent1(DelayTapRec* Tap, float Accent1);
void								SetDelayTapScaleAccent2(DelayTapRec* Tap, float Accent2);
void								SetDelayTapScaleAccent3(DelayTapRec* Tap, float Accent3);
void								SetDelayTapScaleAccent4(DelayTapRec* Tap, float Accent4);
void								SetDelayTapFilterEnable(DelayTapRec* Tap, MyBoolean EnableFilter);
void								SetDelayTapFilterCutoff(DelayTapRec* Tap, float Cutoff);
void								SetDelayTapFilterCutoffAccent1(DelayTapRec* Tap, float Accent1);
void								SetDelayTapFilterCutoffAccent2(DelayTapRec* Tap, float Accent2);
void								SetDelayTapFilterCutoffAccent3(DelayTapRec* Tap, float Accent3);
void								SetDelayTapFilterCutoffAccent4(DelayTapRec* Tap, float Accent4);

/* retrieve tap attributes */
DelayChannelType		GetDelayTapSource(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapSourceTime(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapSourceTimeAccent1(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapSourceTimeAccent2(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapSourceTimeAccent3(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapSourceTimeAccent4(DelayEffectRec* DelaySpec, long Index);
DelayChannelType		GetDelayTapTarget(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapTargetTime(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapTargetTimeAccent1(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapTargetTimeAccent2(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapTargetTimeAccent3(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapTargetTimeAccent4(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapScale(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapScaleAccent1(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapScaleAccent2(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapScaleAccent3(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapScaleAccent4(DelayEffectRec* DelaySpec, long Index);
MyBoolean						GetDelayTapFilterEnable(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapFilterCutoff(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapFilterCutoffAccent1(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapFilterCutoffAccent2(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapFilterCutoffAccent3(DelayEffectRec* DelaySpec, long Index);
float								GetDelayTapFilterCutoffAccent4(DelayEffectRec* DelaySpec, long Index);
struct EnvelopeRec*	GetDelayTapSourceEnvelope(DelayEffectRec* DelaySpec, long Index);
struct EnvelopeRec*	GetDelayTapTargetEnvelope(DelayEffectRec* DelaySpec, long Index);
struct EnvelopeRec*	GetDelayTapScaleEnvelope(DelayEffectRec* DelaySpec, long Index);
struct EnvelopeRec*	GetDelayTapCutoffEnvelope(DelayEffectRec* DelaySpec, long Index);
struct LFOListSpecRec*	GetDelayTapSourceLFO(DelayEffectRec* DelaySpec, long Index);
struct LFOListSpecRec*	GetDelayTapTargetLFO(DelayEffectRec* DelaySpec, long Index);
struct LFOListSpecRec*	GetDelayTapScaleLFO(DelayEffectRec* DelaySpec, long Index);
struct LFOListSpecRec*	GetDelayTapCutoffLFO(DelayEffectRec* DelaySpec, long Index);

/* append tap to list in delay line */
MyBoolean						AppendTapToDelayEffect(DelayEffectRec* DelaySpec, DelayTapRec* Tap);

/* get the number of taps in the delay line */
long								GetDelayEffectSpecNumTaps(DelayEffectRec* DelaySpec);

/* get a specified tap from the delay line */
DelayTapRec*				GetTapFromDelayEffectSpec(DelayEffectRec* DelaySpec, long Index);

#endif
