Surge: Clipping beyond -1, 1 somewhere

Created on 14 Sep 2020  路  10Comments  路  Source: surge-synthesizer/surge

I think it's very strange that this one has not been found yet.

Easy patch clips beyond -1, 1 somewhere.zip

Just open the preset and it will clip loudly and stop the sound. An S&H is linked to FM Depth and it happens at maximum slider input. But i still don't get it, I've done this many times, something has been added.

When i open surge 1.6.6 it does not exist. But all the way down to hash 7e9f8934 i still heard it, after that git checkout was not possible anymore and had loads of problems getting back. So i couldn't really bisect the problem.

I received this problem when i was trying to go back to a newer hash.

git checkout problems

even if i used

git reset upstream/main --hard
git pull upstream main
git reset (latest hash)
git submodule update
etc

the only thing that worked was delete everything in my surge folder and completely re-cloning the whole fork with
git clone https://github.com/K0rrid0r/surge.git

Whats the problem with version.cpp?
And of course I don't know git that well and might be missing something.

Bug Report

All 10 comments

So I confirm that after about 30 seconds latched this does indeed blow out

right! yeah it will blow up different everytime if you re-latch.

yeah see it
and 1.7.1 does it also
after a certain point going back in time chances build tools and requires more extensive rebuilds

so it happens when you modulate the fm depth at 72db but not at 65
i have a theory

Yeah exactly.

I also couldn't find where it started since that particular problem in that exact configuration did not occur in 1.6.6.

I bet you 100% it is the sin approximation getting pushed out of bounds by extreme FM.

And that's without even looking at the code

thats strange, i thought we had that fixed hehe.. i mean i really modulated that hard to check it. but here we are again.

Yeah there seems to be some extreme edge case I'm missing which blows us up horribly.

Ha ok
so here's the problem
you are driving fm depth really hard (as you know)
that leads to 32 pi fmdepth^3 being a big number. if fmdepth is 892 then 32 pi fmd^3 is about 4.1e10
Now 4.1e10 doesn't have any significant digits between 0 and pi
so when you apply the 'periodic clamp' operator to it you get randomness
and my period clamp doesn't expect that
so we go out of range on the approximation
and then we get a nan
and then fm feeds that back in

so basically i have a limit on how big fmdepth can be.

Since I don't think skipping 1e10 phases means that much obviously the clamp is below where we are

lemme play with it.

Was this page helpful?
0 / 5 - 0 ratings