Hello, I am currently working on a semester project at university. The project revolves around creating a multi-effect pedal for use with an electric guitar. Here my group and I have chosen to use the SparkFun WM8960 and an ESP32 Wroom-32D as the basis. We have however run into some trouble.
Having followed the hookup guide and tested the setup with some of the examples in the SparkFun WM8960 Arduino library and confirming that it seemingly works as intended, we have run into the problem of processing the input signal. Any sort of arithmetic operation more complex than addition or subtraction results in a large amount of white noise drowning out any sort of music. Even just dividing by two, either using right bitshifting or the “/”-operator introduces significant noise, although the music is still audible beneath the noise. Through trial and error we have come to think that we might be misinterpreting the input data type and thus handling it improperly. One idea a professor of ours had was that it could be since the codec supports 24-bit resolution, it sends all of this along, and then depending on the application’s need the codec just replaces the non-needed values with 0. In our case we are using a 16-bit resolution at 44.1kHz, going off of the previous assumption we were advised to try and reverse the order of the input array, then do our arithmetic operations and then reverse the processed data back into the original order. Having tried this it simply negates any processing and just creates what sounds like a direct passthrough. We are at the end of our rope and were wondering if anyone here might know what we are doing wrong. Below I have attached a copy of the code using the index reversing and bitshifting, the code uses the I2S Passthrough example as a base.
Any reply is hugely appreciated. Thanks in advance.
Kind regards,
Jonas
indexReversing.c (12.1 KB)