GithubHelp home page GithubHelp logo

Comments (27)

telephon avatar telephon commented on May 27, 2024

I don't know what bug in the windows plugin binaries produces this. It would be interesting to find out. Are you sending anything?

For a quick fix if this is annoying, you can run:

(
var numChannels = 2; // assuming you have 2
SynthDef("dirt_monitor" ++ numChannels, { |dryBus, effectBus, outBus, gate = 1|
		var drySignal = In.ar(dryBus, numChannels);
		var wetSignal = In.ar(effectBus, numChannels);
		//var signal = XFade2.ar(wetSignal, drySignal, dry * 2 - 1);
		var signal = wetSignal + drySignal;

		signal = signal.collect { |x| Select.ar(CheckBadValues.ar(x, post: 0) > 0, [x, DC.ar(0)]) };

		signal = Limiter.ar(signal);

		// or if you like it harsher
		//signal = tanh(signal);
		// or:
		//signal = distort(signal);

		signal = signal * EnvGen.kr(Env.asr, gate, doneAction:2);
		Out.ar(outBus, signal)
	}, [\ir, \ir, \kr, \kr]).add;
)

from superdirt.

arraybercov avatar arraybercov commented on May 27, 2024

@telephon thanks for helping out! : ) what do ya mean by "sending"? In my tests, I'm using the standard SC3 plugins with no additional modifications. Tidal is also more or less the default install except for Tidal Midi.

I'll try that code later and write back.

from superdirt.

arraybercov avatar arraybercov commented on May 27, 2024

@telephon I tried evaluating that ScLang code (the whole thing you wrote) before booting server and after booting server, but I still get the CheckBadValues after boot and even everytime a simple Tidal line like d1 $ s "bd" cycles.

Now it sometimes says normal twice then unknown twice and keeps on repeating like this:
CheckBadValues: unknown found in Synth 1000, ID 0 (previous 12553 values were normal)
CheckBadValues: unknown found in Synth 1000, ID 0 (previous 12553 values were normal)
CheckBadValues: normal found in Synth 1000, ID 0 (previous 31547 values were unknown)
CheckBadValues: normal found in Synth 1000, ID 0 (previous 31547 values were unknown)
CheckBadValues: unknown found in Synth 1000, ID 0 (previous 12553 values were normal)
CheckBadValues: unknown found in Synth 1000, ID 0 (previous 12553 values were normal)
CheckBadValues: normal found in Synth 1000, ID 0 (previous 31548 values were unknown)
CheckBadValues: normal found in Synth 1000, ID 0 (previous 31548 values were unknown)
CheckBadValues: unknown found in Synth 1000, ID 0 (previous 12553 values were normal)
CheckBadValues: unknown found in Synth 1000, ID 0 (previous 12553 values were normal)

Any ideas?

from superdirt.

telephon avatar telephon commented on May 27, 2024

what do ya mean by "sending"?

I meant what do you write in tidal. You replied that: d1 $ s "bd"

but I have no idea what this is. CheckBadValues shouldn't post.

from superdirt.

arraybercov avatar arraybercov commented on May 27, 2024

@telephon ah! thanks for hanging in this with me. Sorry if I'm misunderstanding. Let me know if this is more helpful:
So in Tidal i'm simply sending the command to play 1 sample in my Dirt Sample folder every cycle. Every time that sample plays the Supercollider IDE posts the CheckBadValues.

I'm not sending any other commands whatsoever from Tidal except the OSC packet that contains the time-stamping, the command s to play a sample and then the pattern string with the sample name "bd". Oh and also of course d1 for the first SuperDirt channel.

Is this helpful info?

from superdirt.

telephon avatar telephon commented on May 27, 2024

Thank you @lagauche.

One test: can you run these two lines of code in supercollider, one after the other?

{ CheckBadValues.ar(DC.ar(1/0), post:2) }.play; // this should post a value
{ CheckBadValues.ar(DC.ar(1/0), post:0) }.play; // this should *not* post a value

from superdirt.

arraybercov avatar arraybercov commented on May 27, 2024

@telephon

the first line posts:
-> Synth('temp__14' : 1074)
CheckBadValues: infinity found in Synth 1074, ID 0

the second line posts:
-> Synth('temp__15' : 1075)

The numbers go up every time I eval either line so temp_16, temp_17 etc and 1075, 1076 etc.

from superdirt.

telephon avatar telephon commented on May 27, 2024

try setting numChannels = 1 above - does it go away then?

from superdirt.

arraybercov avatar arraybercov commented on May 27, 2024

@telephon could you walk me through where I would add numChannels = 1? I know next to 0 sclang doh.

from superdirt.

telephon avatar telephon commented on May 27, 2024

of course!

I just meant, when you run the above code, replace the number 2 by 1:

(
var numChannels = 1;
SynthDef("dirt_monitor" ++ numChannels, { |dryBus, effectBus, outBus, gate = 1|
		var drySignal = In.ar(dryBus, numChannels);
		var wetSignal = In.ar(effectBus, numChannels);
		//var signal = XFade2.ar(wetSignal, drySignal, dry * 2 - 1);
		var signal = wetSignal + drySignal;

		signal = signal.collect { |x| Select.ar(CheckBadValues.ar(x, post: 0) > 0, [x, DC.ar(0)]) };

		signal = Limiter.ar(signal);

		// or if you like it harsher
		//signal = tanh(signal);
		// or:
		//signal = distort(signal);

		signal = signal * EnvGen.kr(Env.asr, gate, doneAction:2);
		Out.ar(outBus, signal)
	}, [\ir, \ir, \kr, \kr]).add;
)

But if you use the branch 1.0-dev, I've just made a change so that you can write:

SuperDirt.postBadValues = false

But we have cured the symptom only. You can see if it goes away in the future.

from superdirt.

arraybercov avatar arraybercov commented on May 27, 2024

@telephon I tried to change numChannels to 1 but I get an error. Here's your code. It evaluates fine when set to 2 and returns ->a SynthDef, but here's the error with 1: (code pasted below the error)

CALL STACK:
	DoesNotUnderstandError:reportError
		arg this = <instance of DoesNotUnderstandError>
	Nil:handleError
		arg this = nil
		arg error = <instance of DoesNotUnderstandError>
	Thread:handleError
		arg this = <instance of Thread>
		arg error = <instance of DoesNotUnderstandError>
	Object:throw
		arg this = <instance of DoesNotUnderstandError>
	Function:protect
		arg this = <instance of Function>
		arg handler = <instance of Function>
		var result = <instance of DoesNotUnderstandError>
	SynthDef:build
		arg this = <instance of SynthDef>
		arg ugenGraphFunc = <instance of Function>
		arg rates = [*4]
		arg prependArgs = nil
	< closed FunctionDef >
		var numChannels = 1
	Interpreter:interpretPrintCmdLine
		arg this = <instance of Interpreter>
		var res = nil
		var func = <instance of Function>
		var code = "(
var numChannels = 1; // as..."
		var doc = nil
		var ideClass = <instance of Meta_ScIDE>
	Process:interpretPrintCmdLine
		arg this = <instance of Main>
^^ The preceding error dump is for ERROR: Message 'collect' not understood.
RECEIVER: a BinaryOpUGen

Here's the code along with my SuperDirt startup settings:

(
var numChannels = 1; // assuming you have 2
SynthDef("dirt_monitor" ++ numChannels, { |dryBus, effectBus, outBus, gate = 1|
		var drySignal = In.ar(dryBus, numChannels);
		var wetSignal = In.ar(effectBus, numChannels);
		//var signal = XFade2.ar(wetSignal, drySignal, dry * 2 - 1);
		var signal = wetSignal + drySignal;
		signal = signal.collect { |x| Select.ar(CheckBadValues.ar(x, post: 0) > 0, [x, DC.ar(0)]) };
		signal = Limiter.ar(signal);
		// or if you like it harsher
		//signal = tanh(signal);
		// or:
		//signal = distort(signal);
		signal = signal * EnvGen.kr(Env.asr, gate, doneAction:2);
		Out.ar(outBus, signal)
	}, [\ir, \ir, \kr, \kr]).add;
)
(
s.options.device = "ASIO : Universal Audio Thunderbolt";
s.options.sampleRate = 44100;
s.options.numBuffers = 1024 * 256;
s.options.memSize = 8192 * 128;
s.options.numOutputBusChannels = 16;
s.options.numInputBusChannels = 2;
s.waitForBoot {
    ~dirt = SuperDirt(1, s);
    ~dirt.loadSoundFiles;
	~dirt.loadSoundFiles("C:/Users/ianbe/Desktop/Work/livecode/tidalcycles/zel_samples/*");
    s.sync;
   //~dirt.start(57120, [0, 2, 4, 6, 8, 10, 12, 14]);
	~dirt.start(57120, [0, 0, 0, 0, 0, 0, 0, 0]);
};
);

from superdirt.

telephon avatar telephon commented on May 27, 2024

Ha! we have found another bug. (sorry, I couldn't test it before).

But in any case, I suppose you run superdirt with a default setup (that is, stereo)?

Then please, try once more:

(
var numChannels = 2; // assuming you have 2
SynthDef("dirt_monitor" ++ numChannels, { |dryBus, effectBus, outBus, gate = 1|
		var drySignal = In.ar(dryBus, numChannels);
		var wetSignal = In.ar(effectBus, numChannels);
		//var signal = XFade2.ar(wetSignal, drySignal, dry * 2 - 1);
		var signal = wetSignal + drySignal;

		signal = signal.collect { |x| Select.ar(CheckBadValues.ar(x, post: 0) > 0, [x, DC.ar(0)]) };

		signal = Limiter.ar(signal);

		// or if you like it harsher
		//signal = tanh(signal);
		// or:
		//signal = distort(signal);

		signal = signal * EnvGen.kr(Env.asr, gate, doneAction:2);
		Out.ar(outBus, signal)
	}, [\ir, \ir, \kr, \kr]).add;
)

the messages really should not appear anymore then.

from superdirt.

arraybercov avatar arraybercov commented on May 27, 2024

@telephon I just tried your new code in your last message both before and after booting the server (in case it matters).

Here is my startup:

(
s.options.device = "ASIO : Universal Audio Thunderbolt";
s.options.sampleRate = 44100;
s.options.numBuffers = 1024 * 256;
s.options.memSize = 8192 * 128;
s.options.numOutputBusChannels = 16;
s.options.numInputBusChannels = 2;
s.waitForBoot {
    ~dirt = SuperDirt(2, s);
    ~dirt.loadSoundFiles;
	~dirt.loadSoundFiles("C:/Users/ianbe/Desktop/Work/livecode/tidalcycles/zel_samples/*");
    s.sync;
   //~dirt.start(57120, [0, 2, 4, 6, 8, 10, 12, 14]);
	~dirt.start(57120, [0, 0, 0, 0, 0, 0, 0, 0]);
};
);

I also tried the default SuperDirt.start.

I am getting the same CheckBadValues errors unfortunately.

I'm using the latest 1.0dev that you just made with the modification to accept SuperDirt.postBadValues = false

Any ideas? : )

from superdirt.

telephon avatar telephon commented on May 27, 2024

I just tried your new code in your last message both before and after booting the server (in case it matters).

sure, it does matter. It should be run after your superdirt has started. Have you tried this?

Alternatively, also after your your superdirt has started, run:
SuperDirt.postBadValues = false.

from superdirt.

arraybercov avatar arraybercov commented on May 27, 2024

I did try it after yes. I'm confident the issue persists, but when I get chance I will try again late tonight. I'm at work now unfortunately so can't test for a while.

SuperDirt.postBadValues = false does work, but as you mentioned. It doesn't fix the cause : )

from superdirt.

telephon avatar telephon commented on May 27, 2024

Ok. Let's see, it might be a windows related thing. It is a little hard to pin down in superdirt, let's see if others stumble over it. Let us know if you have sound problems or any hint to a proper cure :)

from superdirt.

arraybercov avatar arraybercov commented on May 27, 2024

@telephon I haven't noticed it messing with the sound, and unfortunately not many Windows Tidal users on the 1.0 dev : ( This does not happen at all with the latest official SuperDirt release so it's something that was introduced in the 1.0d dev I imagine. Does that help at all?

By the way, SuperDirt.postBadValues = false only works if I eval it before booting the server.

from superdirt.

telephon avatar telephon commented on May 27, 2024

yes, the ugen was introduced in 1.0-dev in order to, well, check for bad values and replace them with zero.

and yes, you have to set the option before you load the synth defs, that means before you start superdirt. The server can be running already.

from superdirt.

mhetrick avatar mhetrick commented on May 27, 2024

I can confirm that I'm experiencing the same issue over here.

from superdirt.

telephon avatar telephon commented on May 27, 2024

OK, so I assume that SuperDirt.postBadValues = false at least fixes the symptom?

from superdirt.

telephon avatar telephon commented on May 27, 2024

this is not a SuperDirt issue, but somewhere in a UGen on windows, I suspect. I close it, but please do add information if you find it.

from superdirt.

torotumbo avatar torotumbo commented on May 27, 2024

hi ppl, got the same issue and even lower levels of coding. Try to paste the codelines above but didnt work. got lost in that SuperDirt.postBadValues = false. if you could trow a bone would be great.

from superdirt.

telephon avatar telephon commented on May 27, 2024

got lost in that SuperDirt.postBadValues = false. if you could trow a bone would be great.

Have you actually tried to set this:
SuperDirt.postBadValues = false
?

from superdirt.

yaxu avatar yaxu commented on May 27, 2024

This problem is still popping up on fresh installs. Could we just default postBadValues to false for now?

from superdirt.

telephon avatar telephon commented on May 27, 2024

OK, done. I am not sure, does this need to be cherry picked to some other branch?

4739b0e

from superdirt.

thckr avatar thckr commented on May 27, 2024

On a Win 7 64 bit notebook with SuperCollider 3.9.3, this code as the SC startup file helped for me:

SuperDirt.postBadValues = false;

SuperDirt.start;

from superdirt.

telephon avatar telephon commented on May 27, 2024

@thckr yes, this is exactly how you can configure it.

@yaxu whenever it needs to be in another branch, I'll add it there.

from superdirt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.