Hi,
I just saw this video and tried to test it with one of the JUCE filters at 44100Hz and it is cramping a lot when it gets closer to the Nyquist freq(in my case I tried from 10K to 20K). When I try to increase the sample rate(as expected), it disappeared. I saw a few plugins that don’t cramp. I assume that they are using internal oversampling to be able to get beyond the Nyquist freq. I was planning to use the JUCE oversampling to do the same but this means that it will introduce a latency which I don’t want. Do you have any suggestions for solving this issue? oversampling without latency? I tried to create a simple oversampler to solve the issue but it didn’t work as I expected. My solution is something like this:
Let’s say I have 4 samples in my buffer.
inBuffer{10,11,12,13}
I simply create a new buffer that has inBuffer.getNumSamples()*2-1 and then insert the inBuffer with one sample space.
so the new buffer looks like this:
osBuffer {10,0,11,0,12,0,13}.
then I replace the “0” values with the average of the numbers that are near to it.
it becomes :
osBuffer {10, (10+11)/2.0f, 11, (11+12)/2.0f, 12, (12+13)/2.0f, 13}.
osBuffer {10, 10.5f, 11, 11.5f, 12, 12.5f, 13}.
I use this buffer for filtering.
Let’s say the new buffer after filtering is :
osBuffer {23, 44, 75, 32, 66, 788, 123}
after filtering I am deleting the extra samples at the extra indexes from the osBufffer and I am going back to the previous state of the buffer.
osBuffer {23,44, 75, 32, 66, 788, 123}
osBuffer {23, 75, 66, 123}. This method worked fine except for only one point. Sound-wise it works fine, with no latency, and also it is not cramping but somehow it lowers the volume of the total sound and when it gets closer to the Nyquist freq, the gain increases for a few dBs.
Could you please let me know if you have a better way to prevent cramping?