/* TempoController.h */

#ifndef Included_TempoController_h
#define Included_TempoController_h

/* TempoController module depends on */
/* MiscInfo.h */
/* Audit */
/* Debug */
/* Definitions */
/* Memory */
/* BinaryCodedDecimal */
/* LinearTransition */
/* PlayTrackInfoThang */

#include "BinaryCodedDecimal.h"

struct TempoControlRec;
typedef struct TempoControlRec TempoControlRec;

/* forwards */
struct LinearTransRec;

/* create a new tempo control record */
TempoControlRec*				NewTempoControl(LargeBCDType DefaultBeatsPerMinute);

/* dispose of a tempo control record */
void										DisposeTempoControl(TempoControlRec* Tempo);

/* update the tempo control & return the new value */
LargeBCDType						TempoControlUpdate(TempoControlRec* Tempo, long NumTicks);

/* reset tempo to default value */
void										TempoControlRestoreDefault(TempoControlRec* Tempo);

/* set the tempo to the specified number of beats per minute */
void										TempoControlSetBeatsPerMinute(TempoControlRec* Tempo,
													LargeBCDType NewBeatsPerMinute);

/* adjust the tempo by adding the specified value to it */
void										TempoControlAdjustBeatsPerMinute(TempoControlRec* Tempo,
													LargeBCDType IncrementBeatsPerMinute);

/* sweep the tempo to a new value */
void										TempoControlSweepToNewValue(TempoControlRec* Tempo,
													LargeBCDType NewBPM, SmallExtBCDType NumBeatsToReach);

/* sweep the tempo to a new value relative to the current value */
void										TempoControlSweepToAdjustedValue(TempoControlRec* Tempo,
													LargeBCDType AdjustBPM, SmallExtBCDType NumBeatsToReach);

#endif
