Showing the changes to TestPlugin/Source/MyTest.cpp (1 of 4 files). Show all
Unified · Split
| @@ -40,6 +40,7 @@ tMBSampler sampler; · 39 unmodified lines | ||
| 40 | 40 | |
| 41 | 41 | const int numWavetables = 1; |
| 42 | 42 | tWaveTable wavetables[numWavetables]; |
| 43 | +tSimpleRetune retune; | |
| 43 | 44 | |
| 44 | 45 | float gain; |
| 45 | 46 | float dtime; |
| @@ -61,7 +62,10 @@ int lastLoadedAudioSize = 0; · 15 unmodified lines | ||
| 61 | 62 | |
| 62 | 63 | void LEAFTest_init (float sampleRate, int blockSize) |
| 63 | 64 | { |
| 64 | − LEAF_init(&leaf, sampleRate, blockSize, memory, MSIZE, &getRandomFloat); | |
| 65 | + LEAF_init(&leaf, sampleRate, memory, MSIZE, &getRandomFloat); | |
| 66 | + | |
| 67 | + tSimpleRetune_init(&retune, 1, 100, 1200, 2048, &leaf); | |
| 68 | + tSimpleRetune_setMode(&retune, 1); | |
| 65 | 69 | |
| 66 | 70 | // tWaveTable_init(&wt, __leaf_table_sawtooth[0], 2048, 10000.f, &leaf); |
| 67 | 71 | // tWaveTableS_init(&cwt, __leaf_table_sawtooth[0], 2048, 10000.f, &leaf); |
| @@ -101,6 +105,10 @@ inline double getSawFall(double angle) { · 33 unmodified lines | ||
| 101 | 105 | |
| 102 | 106 | float LEAFTest_tick (float input) |
| 103 | 107 | { |
| 108 | + tSimpleRetune_tuneVoice(&retune, 0, mtof(roundf(ftom(tSimpleRetune_getInputFrequency(&retune))))); | |
| 109 | + return tSimpleRetune_tick(&retune, input); | |
| 110 | + | |
| 111 | + | |
| 104 | 112 | float out = 0.0f; |
| 105 | 113 | for (int i = 0; i < fmin(loadedAudio.size(), numWavetables); ++i) |
| 106 | 114 | { |