| @@ -99,6 +99,7 @@ extern "C" { · 98 unmodified lines |
| 99 | 99 | // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
| 100 | 100 | |
| 101 | 101 | /* tSOLAD : pitch shifting algorithm that underlies tRetune etc */ |
| 102 | + // from Katja Vetters http://www.katjaas.nl/pitchshiftlowlatency/pitchshiftlowlatency.html |
| 102 | 103 | #define LOOPSIZE (2048*2) // (4096*2) // loop size must be power of two |
| 103 | 104 | #define LOOPMASK (LOOPSIZE - 1) |
| 104 | 105 | #define PITCHFACTORDEFAULT 1.0f |
| @@ -199,20 +200,21 @@ extern "C" { · 94 unmodified lines |
| 199 | 200 | |
| 200 | 201 | typedef _tRetune* tRetune; |
| 201 | 202 | |
| 202 | | − void tRetune_init (tRetune* const, int numVoices, int bufSize, int frameSize); |
| 203 | | − void tRetune_free (tRetune* const); |
| 204 | | − void tRetune_initToPool (tRetune* const, int numVoices, int bufSize, int frameSize, tMempool* const); |
| 205 | | − void tRetune_freeFromPool (tRetune* const, tMempool* const); |
| 206 | | − |
| 207 | | − float* tRetune_tick (tRetune* const, float sample); |
| 208 | | − void tRetune_setNumVoices (tRetune* const, int numVoices); |
| 209 | | − void tRetune_setPitchFactors (tRetune* const, float pf); |
| 210 | | − void tRetune_setPitchFactor (tRetune* const, float pf, int voice); |
| 211 | | − void tRetune_setTimeConstant (tRetune* const, float tc); |
| 212 | | − void tRetune_setHopSize (tRetune* const, int hs); |
| 213 | | − void tRetune_setWindowSize (tRetune* const, int ws); |
| 214 | | − float tRetune_getInputPeriod (tRetune* const); |
| 215 | | − float tRetune_getInputFreq (tRetune* const); |
| 203 | + void tRetune_init (tRetune* const, int numVoices, int bufSize, int frameSize); |
| 204 | + void tRetune_free (tRetune* const); |
| 205 | + void tRetune_initToPool (tRetune* const, int numVoices, int bufSize, int frameSize, tMempool* const); |
| 206 | + void tRetune_freeFromPool (tRetune* const, tMempool* const); |
| 207 | + |
| 208 | + float* tRetune_tick (tRetune* const, float sample); |
| 209 | + void tRetune_setNumVoices (tRetune* const, int numVoices); |
| 210 | + void tRetune_setPitchFactors (tRetune* const, float pf); |
| 211 | + void tRetune_setPitchFactor (tRetune* const, float pf, int voice); |
| 212 | + void tRetune_setTimeConstant (tRetune* const, float tc); |
| 213 | + void tRetune_setHopSize (tRetune* const, int hs); |
| 214 | + void tRetune_setWindowSize (tRetune* const, int ws); |
| 215 | + void tRetune_setFidelityThreshold(tRetune* const, float threshold); |
| 216 | + float tRetune_getInputPeriod (tRetune* const); |
| 217 | + float tRetune_getInputFreq (tRetune* const); |
| 216 | 218 | |
| 217 | 219 | // Autotune |
| 218 | 220 | typedef struct _tAutotune |
| @@ -241,20 +243,21 @@ extern "C" { · 22 unmodified lines |
| 241 | 243 | |
| 242 | 244 | typedef _tAutotune* tAutotune; |
| 243 | 245 | |
| 244 | | − void tAutotune_init (tAutotune* const, int numVoices, int bufSize, int frameSize); |
| 245 | | − void tAutotune_free (tAutotune* const); |
| 246 | | − void tAutotune_initToPool (tAutotune* const, int numVoices, int bufSize, int frameSize, tMempool* const); |
| 247 | | − void tAutotune_freeFromPool (tAutotune* const, tMempool* const); |
| 248 | | − |
| 249 | | − float* tAutotune_tick (tAutotune* const, float sample); |
| 250 | | − void tAutotune_setNumVoices (tAutotune* const, int numVoices); |
| 251 | | − void tAutotune_setFreqs (tAutotune* const, float f); |
| 252 | | − void tAutotune_setFreq (tAutotune* const, float f, int voice); |
| 253 | | − void tAutotune_setTimeConstant (tAutotune* const, float tc); |
| 254 | | − void tAutotune_setHopSize (tAutotune* const, int hs); |
| 255 | | − void tAutotune_setWindowSize (tAutotune* const, int ws); |
| 256 | | − float tAutotune_getInputPeriod (tAutotune* const); |
| 257 | | − float tAutotune_getInputFreq (tAutotune* const); |
| 246 | + void tAutotune_init (tAutotune* const, int numVoices, int bufSize, int frameSize); |
| 247 | + void tAutotune_free (tAutotune* const); |
| 248 | + void tAutotune_initToPool (tAutotune* const, int numVoices, int bufSize, int frameSize, tMempool* const); |
| 249 | + void tAutotune_freeFromPool (tAutotune* const, tMempool* const); |
| 250 | + |
| 251 | + float* tAutotune_tick (tAutotune* const, float sample); |
| 252 | + void tAutotune_setNumVoices (tAutotune* const, int numVoices); |
| 253 | + void tAutotune_setFreqs (tAutotune* const, float f); |
| 254 | + void tAutotune_setFreq (tAutotune* const, float f, int voice); |
| 255 | + void tAutotune_setTimeConstant (tAutotune* const, float tc); |
| 256 | + void tAutotune_setHopSize (tAutotune* const, int hs); |
| 257 | + void tAutotune_setWindowSize (tAutotune* const, int ws); |
| 258 | + void tAutotune_setFidelityThreshold (tAutotune* const, float threshold); |
| 259 | + float tAutotune_getInputPeriod (tAutotune* const); |
| 260 | + float tAutotune_getInputFreq (tAutotune* const); |
| 258 | 261 | |
| 259 | 262 | //============================================================================== |
| 260 | 263 | |