wavetable.h (472B)
1 enum { 2 WFSize = 2048, 3 WTSize = 256, 4 5 ModWtSel = 0, 6 ModFreq, 7 ModPhase, 8 ModMod, 9 ModVolume, 10 ModPan, 11 }; 12 13 typedef struct Synth Synth; 14 typedef struct Phasor Phasor; 15 16 struct Phasor { 17 u64int t; 18 }; 19 20 struct Synth { 21 s16int *table[64]; 22 union { 23 int p[6]; 24 struct { 25 int wtsel, freq, phase, mod, vol, pan; 26 }; 27 } mod; 28 int flag; 29 }; 30 31 int pstep(Phasor *, int, int, int); 32 u32int wtfunc(s16int *wtp, int phase, int mod, int vol, int pan); 33 u32int wtstep(Synth *, Phasor *);