Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

different responses on Onsets with Windows 64-bit build made with MSYS/MinGW and on one build with MSVC #2888

Open
enrike opened this issue May 24, 2017 · 6 comments
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: server plugins os: Windows

Comments

@enrike
Copy link
Contributor

enrike commented May 24, 2017

the output of Onsets class on a Windows 64-bit machine running a Supercollider 3.9dev build made with MSVS is much worst that with the same version but made with MSYS/MinGW. The first one constantly drops a lot of the incoming onsets in a very random way.

This is the code for testing

(
b = Buffer.alloc(s, 512);
x = {
	var sig, chain, onsets, pips;
	sig = Decay2.ar(Impulse.ar(1, 0.25), 0.01, 1, mul: SinOsc.ar(mul: 0.1));
	chain = FFT(b, sig);
	onsets = Onsets.kr(chain, threshold: 0.2, odftype: \rcomplex);
	pips = WhiteNoise.ar(EnvGen.kr(Env.perc(0.001, 0.1, 0.1), onsets));
	Out.ar(0, [sig, pips]);
}.play;
)
@nhthn nhthn added bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: server plugins labels May 24, 2017
@nhthn
Copy link
Contributor

nhthn commented May 24, 2017

the onsetsds code is pretty big, but it is deterministic. i would approach it by starting with the shortest possible deterministic input signal that reproduces this behavior (like just 1024 samples or something), then use wolf fence debugging to locate the first point where the math diverges.

@mossheim
Copy link
Contributor

There are two #defines that get switched on for msvc in the relevant TU; one for hypotf and one that undefines inline. It seems like both are unnecessary in VS2013+ (https://msdn.microsoft.com/en-us/library/a9yb3dbt(v=vs.120).aspx). @enrike, which version of msvc are you using? Could be a problem with their headers.

@bagong
Copy link
Contributor

bagong commented May 24, 2017

enrike didn't build, I did. I once removed this c99 related stuff, or anything that made msvc special in that code line. Didn't make a difference. But you're right, they are not needed any more (at least the build doesn't break without them)

@mossheim
Copy link
Contributor

@bagong, thanks for the info. if you read the documentation I provided above, it says that the underscore-prefixed versions are identical to the standard-name functions. which VS edition did you build with?

@bagong
Copy link
Contributor

bagong commented May 24, 2017

Possibly not 2013, I think 2015.

@mossheim
Copy link
Contributor

OK! I will check it out next time I have my windows machine booted. To clear up any confusion, I'm talking about the implementation for hypotf provided by the msvc compiler, which will be different from (though hopefully equivalent to) gcc's. From what I've read on the mailing list, it sounds like the problem lies there. It may be that for some set of inputs (denormalized floats or 0 or inf or nan) the behavior diverged because it's loosely defined by the standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: server plugins os: Windows
Projects
None yet
Development

No branches or pull requests

4 participants