fix: refactor code structure into files (#8)
closes #7 Co-authored-by: HiveBeats <e1lama@protonmail.com> Reviewed-on: #8
This commit is contained in:
33
oscillator.h
Normal file
33
oscillator.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef OSCILLATOR_H
|
||||
#define OSCILLATOR_H
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
typedef enum {
|
||||
Sine,
|
||||
Triangle,
|
||||
Saw,
|
||||
Square
|
||||
} OscillatorType;
|
||||
|
||||
typedef struct OscillatorParameter {
|
||||
OscillatorType osc;
|
||||
float freq;
|
||||
} OscillatorParameter;
|
||||
|
||||
typedef struct OscillatorParameterList {
|
||||
OscillatorParameter* array;
|
||||
size_t count;
|
||||
} OscillatorParameterList;
|
||||
|
||||
typedef struct OscillatorGenerationParameter {
|
||||
OscillatorParameterList oscillators;
|
||||
float sample;
|
||||
} OscillatorGenerationParameter;
|
||||
|
||||
float multiosc(OscillatorGenerationParameter param);
|
||||
SynthSound freq(float duration, OscillatorParameterList osc);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user