simulations

numerical experiments, simulations and learning projects
git clone https://damianlofi.de/git/simulations.git
Log | Files | Refs | README

osc.h (299B)


      1 #ifndef OSC_H
      2 #define OSC_H
      3 
      4 #include <stdatomic.h>
      5 
      6 typedef struct osc {
      7     const float *wavetable;
      8     float phase; // in [0.0, 1.0)
      9     float inc;
     10     _Atomic float inc_target;
     11 } osc;
     12 
     13 float osc_process(osc *o);
     14 
     15 void osc_create(osc *o, float freq, float sample_rate, float *wavetable);
     16 
     17 #endif