I am trying to read from a delay line using interpolation. So therefore I need to get the fractional part of my index (floating point). I’m using this function:
float fractional(float in) {
long long in_i = in;
float in_f = in_i;
float out = in - in_f;
return out;
}
This calculation works on its own. But when I implement it in my delay read function, it somehow gets stuck at line 2 (converting back to float). I am using the debugger in Arduino IDE. Here are some screenshots to show what the debugger is showing.
Thanks anyway.
The problem I experienced was that I just didn’t get any audio after some new upload cycles. Got it several times again after I thought I solved it. I tried to track the problem down by place “return 0.f” at different places in certain function. But when I thought I had it, it would happen again later on.
Also experienced that my while loop in Main was getting slow (noticed through my LEDs getting updated slower).
And had the impression that analogRead() in Arduino was kinda slow too.
So all this made me decide to go back to the VScode environment. Everything works as expected now.
(The reason I tried out the Arduino environment was because of the Arduino hardware pwm functionality (PWM frequencies at audio sampling rate). As this is not yet implemented in libDaisy, I’m going to use external SPI dac’s now)