git-svn-id: http://moon:8086/svn/software/trunk/projects/JaySynth@37 b431acfa-c32f-4a4a-93f1-934dc6c82436
44 lines
1.3 KiB
C
44 lines
1.3 KiB
C
// --------------------------------------------------------------
|
|
// --------------------------------------------------------------
|
|
#ifndef _SINE_H_
|
|
#define _SINE_H_
|
|
|
|
#include "synth_defs.h"
|
|
|
|
#define SINE_OVERSAMPLING 3
|
|
|
|
// --------------------------------------------------------------
|
|
// Types
|
|
// --------------------------------------------------------------
|
|
typedef struct _ssine_gen_t
|
|
{
|
|
synth_float_t fs, fscale, pitch, CV_fm;
|
|
synth_float_t b, y[2];
|
|
|
|
} sine_gen_t;
|
|
|
|
// --------------------------------------------------------------
|
|
#if defined(__cplusplus)
|
|
extern "C" {
|
|
#endif
|
|
|
|
// --------------------------------------------------------------
|
|
// Exported functions
|
|
// --------------------------------------------------------------
|
|
void Sine_Init(sine_gen_t *pObj, synth_float_t fs);
|
|
void Sine_Free(sine_gen_t *pObj);
|
|
void Sine_SetFS(sine_gen_t *pObj, synth_float_t fs);
|
|
void Sine_Reset(sine_gen_t *pObj, synth_float_t phi);
|
|
void Sine_Prepare(sine_gen_t *pObj);
|
|
void Sine_Start(sine_gen_t *pObj);
|
|
void Sine_Update(sine_gen_t *pObj);
|
|
synth_float_t Sine_Process_Scalar(sine_gen_t *pObj, synth_float_t pitch, synth_float_t CV_fm);
|
|
|
|
#if defined(__cplusplus)
|
|
}
|
|
|
|
#endif
|
|
// --------------------------------------------------------------
|
|
|
|
#endif // _SINE_H_
|