Open umlaeute opened 2 years ago
Certainly odd. Replacing all frequencies to 440Hz and it is OK.
So it s inside the Sitar class in C++
The more I look the stranger it is.
If I comment out evertthng after the first score blank line it is OK. If I comment out the low note at time 3.7 then it gives an error much earlier! That rather suggests memory but valgrind reports nothing odd. Still no ideas where to look.
Need Michael Gogins I think
I suspect this is an STK bug, but I will look at it.
The following one-line patch to the STK sources causes this behavior to stop, and rendering to look and sound normal.
mkg@xenakis:~/stk$ git diff
diff --git a/src/Sitar.cpp b/src/Sitar.cpp
index 2d3364e..11c493e 100644
--- a/src/Sitar.cpp
+++ b/src/Sitar.cpp
@@ -61,7 +61,7 @@ void Sitar :: setFrequency( StkFloat frequency )
#endif
targetDelay_ = (Stk::sampleRate() / frequency);
- delay_ = targetDelay_ * (1.0 + (0.05 * noise_.tick()));
+ delay_ = targetDelay_;
delayLine_.setDelay( delay_ );
loopGain_ = 0.995 + (frequency * 0.0000005);
if ( loopGain_ > 0.9995 ) loopGain_ = 0.9995;
mkg@xenakis:~/stk$
This is enough to prove that the bug lies within the deleted line, or its side effects, and is entirely contained in the STK Sitar class.
I do not understand what is happening well enough to really fix it, but I will open an issue in the STK repository that references this issue.
as i don't have time right now to look into this myself, so I'm forwarding an oldish (6 years!) bug-report from Debian (here's the original bugreport), that appears to still be present in Csound-6.16
(i also reported this as https://github.com/csound/csound/issues/1526 but was directed here)
find the CSD in STKSitar_overflow.zip