History

fix off by 1 / out of bounds error in tSOLAD; fix tSimpleRetune missing pdbuffer

Matthew Wang committed 5 years ago

Commit c38b5b81 parent ab2f6614 files · +19 −7Browse files

Showing the changes to TestPlugin/Source/MyTest.cpp (1 of 4 files). Show all

Unified · Split

TestPlugin/Source/MyTest.cpp+9−1
@@ -40,6 +40,7 @@ tMBSampler sampler; · 39 unmodified lines
4040
4141 const int numWavetables = 1;
4242 tWaveTable wavetables[numWavetables];
43+tSimpleRetune retune;
4344
4445 float gain;
4546 float dtime;
@@ -61,7 +62,10 @@ int lastLoadedAudioSize = 0; · 15 unmodified lines
6162
6263 void LEAFTest_init (float sampleRate, int blockSize)
6364 {
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);
6569
6670 // tWaveTable_init(&wt, __leaf_table_sawtooth[0], 2048, 10000.f, &leaf);
6771 // tWaveTableS_init(&cwt, __leaf_table_sawtooth[0], 2048, 10000.f, &leaf);
@@ -101,6 +105,10 @@ inline double getSawFall(double angle) { · 33 unmodified lines
101105
102106 float LEAFTest_tick (float input)
103107 {
108+ tSimpleRetune_tuneVoice(&retune, 0, mtof(roundf(ftom(tSimpleRetune_getInputFrequency(&retune)))));
109+ return tSimpleRetune_tick(&retune, input);
110+
111+
104112 float out = 0.0f;
105113 for (int i = 0; i < fmin(loadedAudio.size(), numWavetables); ++i)
106114 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t