Quantcast

Server goes quiet

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Server goes quiet

Erik Natanael Gustafsson-2
Hi list!

I have a problem where the server randomly goes quiet after a while, but there is no error either in JACK or sclang and everything seems to be working except there is no audio output. I made a screen capture with the sound from JACK so that you can see for yourselves:
https://youtu.be/UyufIe6hUw4

I would be happy to post the code, but it's quite long so I figured it might be better if I just explain it. The program is for a live interface and communicates with an arduino via serial. When I touch a sensor the program fires up a note which can then be modified until I let go of the sensor. The bug seems to come quicker if I play more notes and not at all if I play slowly.

This is a stripped down version of the code that launches a new note (returns an event object that is stored):

[code]
~createNote = { | outBus, revBus, pressure, params, freq | // Lägg till argument för alla nod-parametrar
    var glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, noiseSynth, masterSynth, masterBus,
    amplitude = abs(pressure), attack = ~attack, decay = ~decay;

    {
        masterBus = Bus.audio(s, 2);
        //s.sync;

        masterSynth = Synth(\master, [
            \outBus1, outBus,
            \outBus2, revBus,
            \inBus, masterBus,
            \amp, pressure,
            \mix, 0.6, // The mix between dry and wet
            \cutoff, 20000,
            \fadeTime, 0.1,
        ]);

        glitterSynth = Synth(\glitter4, [
            \freq, freq,
            \amp, params[\glitterMix], // insert mix value from node instead of 1
            \attack, attack,
            \decay, decay,
            \outBus, masterBus
        ],
        target: masterSynth,
        addAction: \addBefore
        );

        rawSynth = Synth(\raw_pulse2, [
            \freq, freq,
            \amp, params[\rawMix],
            \roughness, params[\rawRoughness], // insert node value
            \attack, attack,
            \decay, decay,
            \outBus, masterBus
        ],
        target: masterSynth,
        addAction: \addBefore
        );

        diffusSynth = Synth(\string_dist, [
            \freq, freq,
            \amp, params[\diffusMix],
            \cutoffr, 15000,
            \attack, attack,
            \decay, decay,
            \outBus, masterBus
        ],
        target: masterSynth,
        addAction: \addBefore
        );

        noisePadSynth = Synth(\noisepad, [
            \freq, freq,
            \amp, params[\noisePadMix],
            \roughness, params[\noisePadRoughness], // insert node value
            \attack, attack,
            \decay, decay,
            \outBus, masterBus
        ],
        target: masterSynth,
        addAction: \addBefore
        );

        sizzleSynth = Synth(\sizzle, [
            \freq, freq,
            \amp, params[\sizzleMix],
            \attack, attack,
            \decay, decay,
            \outBus, masterBus
        ],
        target: masterSynth,
        addAction: \addBefore
        );

        noiseSynth = Synth(\noises, [
            \freq, freq,
            \amp, params[\noiseMix],
            \attack, attack,
            \decay, decay,
            \outBus, masterBus
        ],
        target: masterSynth,
        addAction: \addBefore
        );
    }.fork;

    ( // The event that is returned
        glitterSynth: glitterSynth,
        rawSynth: rawSynth,
        diffusSynth: diffusSynth,
        sizzleSynth: sizzleSynth,
        noisePadSynth: noisePadSynth,
        noiseSynth: noiseSynth,
        masterSynth: masterSynth,
        amp: 1, // amp always starts out at 1 and only changes with sustain changes
        decay: decay,
        playing: true,

        fadeToAmp: { |self, amp, fadeTime |
            if(self.playing) {
                // Set master synth fade time to fade time and then amp to amp
                masterSynth.set(\fadeTime, fadeTime);
                masterSynth.set(\amp, amp);
            };
        },
        fadeMixToAmp: { | self, amp, symbol, fadeTime = 0.01 |
            if(self.playing) {
                switch(symbol)
                {\rawMix} { rawSynth.set(\amp, amp) }
                {\glitterMix} {glitterSynth.set(\amp, amp) }
                {\diffusMix} {diffusSynth.set(\amp, amp) }
                {\sizzleMix} {sizzleSynth.set(\amp, amp) }
                {\noiseMix} {noiseSynth.set(\amp, amp) }
                {\noisePadMix} {noisePadSynth.set(\amp, amp) };
            };
        },
        fadeOut: { |self |
            if(self.playing) {
                {
                    /* // If using s.sync during instansiation, check that the synths have been started before releaseing
                    while( {noiseSynth == nil}, {
                        "nil, waits".postln;
                        0.002.wait;
                    };*/
                    [glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, noiseSynth, noiseSynth].do {|obj|
                        obj.postln; obj.set(\gate, 0) };

                    (self.decay + 0.5).wait;
                    "free all objects".postln;
                    //[glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, masterSynth, noiseSynth].do {|obj| obj.free };
                    masterSynth.free;
                    masterBus.free;
                }.fork;
            };
            self.playing = false;
        },
        setFreq: { | self, freq |
            if(self.playing) {
                [glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, noiseSynth].do {|obj|
                    obj.set(\freq, freq); };
            }
        },
        setDecay: { | self, decay |
            if(self.playing) {

                [glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, noiseSynth].do {|obj|
                    obj.set(\decay, decay); };
                self.decay = decay;
            }
        },
        // Several more parameter setting methods

    )
};
[/code]


Any ideas what might be happening and how to get rid of it? I am on 3.8 on Ubuntu Studio 16.04.

Cheers,
Erik
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Server goes quiet

Fredrik Olofsson
hard to say.  suddenly quiet could be many things.  the usual suspects to check:

try removing all filters to see if it's one of them is blowing up.

put in the StageLimiter (from BatLib) to detect and remove NaNs.

take an extra look at all exponential ranges.  spot any problems like this (in your case specially in the mastersynth as the sound doesn't come back)...

s.boot
(
SynthDef(\a, {|v= 99, t_trig= 0|
        Out.ar(0, SinOsc.ar(SinOsc.ar([1, 1.01]).exprange(v, 999))*EnvGen.kr(Env.perc, t_trig)*0.2);
}).add;
)

a= Synth(\a)
a.set(\t_trig, 1)
a.set(\v, 0)
a.set(\t_trig, 1)  //silent
a.set(\t_trig, 1)  //silent
a.set(\t_trig, 1)  //silent
a.set(\v, 99)
a.set(\t_trig, 1)
a.set(\t_trig, 1)
a.free

or try isolate the problem hard vs soft ware wise by writing a small routine that generates 'fake' touch inputs.  then disconnect the arduino, run the routine and see if it still goes quiet.

if all that fail then clean up the code and post it here for others to try - to see if it's something special with your system.
_f

> 1 mar 2017 kl. 10:55 skrev Erik Natanael Gustafsson <[hidden email]>:
>
> Hi list!
>
> I have a problem where the server randomly goes quiet after a while, but there is no error either in JACK or sclang and everything seems to be working except there is no audio output. I made a screen capture with the sound from JACK so that you can see for yourselves:
> https://youtu.be/UyufIe6hUw4
>
> I would be happy to post the code, but it's quite long so I figured it might be better if I just explain it. The program is for a live interface and communicates with an arduino via serial. When I touch a sensor the program fires up a note which can then be modified until I let go of the sensor. The bug seems to come quicker if I play more notes and not at all if I play slowly.
>
> This is a stripped down version of the code that launches a new note (returns an event object that is stored):
>
> [code]
> ~createNote = { | outBus, revBus, pressure, params, freq | // Lägg till argument för alla nod-parametrar
>     var glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, noiseSynth, masterSynth, masterBus,
>     amplitude = abs(pressure), attack = ~attack, decay = ~decay;
>
>     {
>         masterBus = Bus.audio(s, 2);
>         //s.sync;
>
>         masterSynth = Synth(\master, [
>             \outBus1, outBus,
>             \outBus2, revBus,
>             \inBus, masterBus,
>             \amp, pressure,
>             \mix, 0.6, // The mix between dry and wet
>             \cutoff, 20000,
>             \fadeTime, 0.1,
>         ]);
>
>         glitterSynth = Synth(\glitter4, [
>             \freq, freq,
>             \amp, params[\glitterMix], // insert mix value from node instead of 1
>             \attack, attack,
>             \decay, decay,
>             \outBus, masterBus
>         ],
>         target: masterSynth,
>         addAction: \addBefore
>         );
>
>         rawSynth = Synth(\raw_pulse2, [
>             \freq, freq,
>             \amp, params[\rawMix],
>             \roughness, params[\rawRoughness], // insert node value
>             \attack, attack,
>             \decay, decay,
>             \outBus, masterBus
>         ],
>         target: masterSynth,
>         addAction: \addBefore
>         );
>
>         diffusSynth = Synth(\string_dist, [
>             \freq, freq,
>             \amp, params[\diffusMix],
>             \cutoffr, 15000,
>             \attack, attack,
>             \decay, decay,
>             \outBus, masterBus
>         ],
>         target: masterSynth,
>         addAction: \addBefore
>         );
>
>         noisePadSynth = Synth(\noisepad, [
>             \freq, freq,
>             \amp, params[\noisePadMix],
>             \roughness, params[\noisePadRoughness], // insert node value
>             \attack, attack,
>             \decay, decay,
>             \outBus, masterBus
>         ],
>         target: masterSynth,
>         addAction: \addBefore
>         );
>
>         sizzleSynth = Synth(\sizzle, [
>             \freq, freq,
>             \amp, params[\sizzleMix],
>             \attack, attack,
>             \decay, decay,
>             \outBus, masterBus
>         ],
>         target: masterSynth,
>         addAction: \addBefore
>         );
>
>         noiseSynth = Synth(\noises, [
>             \freq, freq,
>             \amp, params[\noiseMix],
>             \attack, attack,
>             \decay, decay,
>             \outBus, masterBus
>         ],
>         target: masterSynth,
>         addAction: \addBefore
>         );
>     }.fork;
>
>     ( // The event that is returned
>         glitterSynth: glitterSynth,
>         rawSynth: rawSynth,
>         diffusSynth: diffusSynth,
>         sizzleSynth: sizzleSynth,
>         noisePadSynth: noisePadSynth,
>         noiseSynth: noiseSynth,
>         masterSynth: masterSynth,
>         amp: 1, // amp always starts out at 1 and only changes with sustain changes
>         decay: decay,
>         playing: true,
>
>         fadeToAmp: { |self, amp, fadeTime |
>             if(self.playing) {
>                 // Set master synth fade time to fade time and then amp to amp
>                 masterSynth.set(\fadeTime, fadeTime);
>                 masterSynth.set(\amp, amp);
>             };
>         },
>         fadeMixToAmp: { | self, amp, symbol, fadeTime = 0.01 |
>             if(self.playing) {
>                 switch(symbol)
>                 {\rawMix} { rawSynth.set(\amp, amp) }
>                 {\glitterMix} {glitterSynth.set(\amp, amp) }
>                 {\diffusMix} {diffusSynth.set(\amp, amp) }
>                 {\sizzleMix} {sizzleSynth.set(\amp, amp) }
>                 {\noiseMix} {noiseSynth.set(\amp, amp) }
>                 {\noisePadMix} {noisePadSynth.set(\amp, amp) };
>             };
>         },
>         fadeOut: { |self |
>             if(self.playing) {
>                 {
>                     /* // If using s.sync during instansiation, check that the synths have been started before releaseing
>                     while( {noiseSynth == nil}, {
>                         "nil, waits".postln;
>                         0.002.wait;
>                     };*/
>                     [glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, noiseSynth, noiseSynth].do {|obj|
>                         obj.postln; obj.set(\gate, 0) };
>
>                     (self.decay + 0.5).wait;
>                     "free all objects".postln;
>                     //[glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, masterSynth, noiseSynth].do {|obj| obj.free };
>                     masterSynth.free;
>                     masterBus.free;
>                 }.fork;
>             };
>             self.playing = false;
>         },
>         setFreq: { | self, freq |
>             if(self.playing) {
>                 [glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, noiseSynth].do {|obj|
>                     obj.set(\freq, freq); };
>             }
>         },
>         setDecay: { | self, decay |
>             if(self.playing) {
>
>                 [glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, noiseSynth].do {|obj|
>                     obj.set(\decay, decay); };
>                 self.decay = decay;
>             }
>         },
>         // Several more parameter setting methods
>
>     )
> };
> [/code]
>
>
> Any ideas what might be happening and how to get rid of it? I am on 3.8 on Ubuntu Studio 16.04.
>
> Cheers,
> Erik


  #|
     fredrikolofsson.com     musicalfieldsforever.com
  |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Server goes quiet

Erik Natanael Gustafsson-2
Thanks!
I found the problem: sometimes with the wrong parameter combinations I would get "0.reciprocal" in one of the noise making synths so I added a "max(var, 0.01)". It seemed weird that a problem in one synth would prevent the server from making any noise at all until a s.freeAll, but I guess I should be happy that the server didn't crash completely on an inf.

StageLimiter seems useful, bu I didn't get exactly how to use it. Do you just evaluate "StageLimiter.activate;" before launching any Synths?

Cheers,
Erik

ons 1 mars 2017 kl 11:30 skrev Fredrik Olofsson <[hidden email]>:
hard to say.  suddenly quiet could be many things.  the usual suspects to check:

try removing all filters to see if it's one of them is blowing up.

put in the StageLimiter (from BatLib) to detect and remove NaNs.

take an extra look at all exponential ranges.  spot any problems like this (in your case specially in the mastersynth as the sound doesn't come back)...

s.boot
(
SynthDef(\a, {|v= 99, t_trig= 0|
        Out.ar(0, SinOsc.ar(SinOsc.ar([1, 1.01]).exprange(v, 999))*EnvGen.kr(Env.perc, t_trig)*0.2);
}).add;
)

a= Synth(\a)
a.set(\t_trig, 1)
a.set(\v, 0)
a.set(\t_trig, 1)  //silent
a.set(\t_trig, 1)  //silent
a.set(\t_trig, 1)  //silent
a.set(\v, 99)
a.set(\t_trig, 1)
a.set(\t_trig, 1)
a.free

or try isolate the problem hard vs soft ware wise by writing a small routine that generates 'fake' touch inputs.  then disconnect the arduino, run the routine and see if it still goes quiet.

if all that fail then clean up the code and post it here for others to try - to see if it's something special with your system.
_f

> 1 mar 2017 kl. 10:55 skrev Erik Natanael Gustafsson <[hidden email]>:
>
> Hi list!
>
> I have a problem where the server randomly goes quiet after a while, but there is no error either in JACK or sclang and everything seems to be working except there is no audio output. I made a screen capture with the sound from JACK so that you can see for yourselves:
> https://youtu.be/UyufIe6hUw4
>
> I would be happy to post the code, but it's quite long so I figured it might be better if I just explain it. The program is for a live interface and communicates with an arduino via serial. When I touch a sensor the program fires up a note which can then be modified until I let go of the sensor. The bug seems to come quicker if I play more notes and not at all if I play slowly.
>
> This is a stripped down version of the code that launches a new note (returns an event object that is stored):
>
> [code]
> ~createNote = { | outBus, revBus, pressure, params, freq | // Lägg till argument för alla nod-parametrar
>     var glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, noiseSynth, masterSynth, masterBus,
>     amplitude = abs(pressure), attack = ~attack, decay = ~decay;
>
>     {
>         masterBus = Bus.audio(s, 2);
>         //s.sync;
>
>         masterSynth = Synth(\master, [
>             \outBus1, outBus,
>             \outBus2, revBus,
>             \inBus, masterBus,
>             \amp, pressure,
>             \mix, 0.6, // The mix between dry and wet
>             \cutoff, 20000,
>             \fadeTime, 0.1,
>         ]);
>
>         glitterSynth = Synth(\glitter4, [
>             \freq, freq,
>             \amp, params[\glitterMix], // insert mix value from node instead of 1
>             \attack, attack,
>             \decay, decay,
>             \outBus, masterBus
>         ],
>         target: masterSynth,
>         addAction: \addBefore
>         );
>
>         rawSynth = Synth(\raw_pulse2, [
>             \freq, freq,
>             \amp, params[\rawMix],
>             \roughness, params[\rawRoughness], // insert node value
>             \attack, attack,
>             \decay, decay,
>             \outBus, masterBus
>         ],
>         target: masterSynth,
>         addAction: \addBefore
>         );
>
>         diffusSynth = Synth(\string_dist, [
>             \freq, freq,
>             \amp, params[\diffusMix],
>             \cutoffr, 15000,
>             \attack, attack,
>             \decay, decay,
>             \outBus, masterBus
>         ],
>         target: masterSynth,
>         addAction: \addBefore
>         );
>
>         noisePadSynth = Synth(\noisepad, [
>             \freq, freq,
>             \amp, params[\noisePadMix],
>             \roughness, params[\noisePadRoughness], // insert node value
>             \attack, attack,
>             \decay, decay,
>             \outBus, masterBus
>         ],
>         target: masterSynth,
>         addAction: \addBefore
>         );
>
>         sizzleSynth = Synth(\sizzle, [
>             \freq, freq,
>             \amp, params[\sizzleMix],
>             \attack, attack,
>             \decay, decay,
>             \outBus, masterBus
>         ],
>         target: masterSynth,
>         addAction: \addBefore
>         );
>
>         noiseSynth = Synth(\noises, [
>             \freq, freq,
>             \amp, params[\noiseMix],
>             \attack, attack,
>             \decay, decay,
>             \outBus, masterBus
>         ],
>         target: masterSynth,
>         addAction: \addBefore
>         );
>     }.fork;
>
>     ( // The event that is returned
>         glitterSynth: glitterSynth,
>         rawSynth: rawSynth,
>         diffusSynth: diffusSynth,
>         sizzleSynth: sizzleSynth,
>         noisePadSynth: noisePadSynth,
>         noiseSynth: noiseSynth,
>         masterSynth: masterSynth,
>         amp: 1, // amp always starts out at 1 and only changes with sustain changes
>         decay: decay,
>         playing: true,
>
>         fadeToAmp: { |self, amp, fadeTime |
>             if(self.playing) {
>                 // Set master synth fade time to fade time and then amp to amp
>                 masterSynth.set(\fadeTime, fadeTime);
>                 masterSynth.set(\amp, amp);
>             };
>         },
>         fadeMixToAmp: { | self, amp, symbol, fadeTime = 0.01 |
>             if(self.playing) {
>                 switch(symbol)
>                 {\rawMix} { rawSynth.set(\amp, amp) }
>                 {\glitterMix} {glitterSynth.set(\amp, amp) }
>                 {\diffusMix} {diffusSynth.set(\amp, amp) }
>                 {\sizzleMix} {sizzleSynth.set(\amp, amp) }
>                 {\noiseMix} {noiseSynth.set(\amp, amp) }
>                 {\noisePadMix} {noisePadSynth.set(\amp, amp) };
>             };
>         },
>         fadeOut: { |self |
>             if(self.playing) {
>                 {
>                     /* // If using s.sync during instansiation, check that the synths have been started before releaseing
>                     while( {noiseSynth == nil}, {
>                         "nil, waits".postln;
>                         0.002.wait;
>                     };*/
>                     [glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, noiseSynth, noiseSynth].do {|obj|
>                         obj.postln; obj.set(\gate, 0) };
>
>                     (self.decay + 0.5).wait;
>                     "free all objects".postln;
>                     //[glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, masterSynth, noiseSynth].do {|obj| obj.free };
>                     masterSynth.free;
>                     masterBus.free;
>                 }.fork;
>             };
>             self.playing = false;
>         },
>         setFreq: { | self, freq |
>             if(self.playing) {
>                 [glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, noiseSynth].do {|obj|
>                     obj.set(\freq, freq); };
>             }
>         },
>         setDecay: { | self, decay |
>             if(self.playing) {
>
>                 [glitterSynth, rawSynth, diffusSynth, sizzleSynth, noisePadSynth, noiseSynth].do {|obj|
>                     obj.set(\decay, decay); };
>                 self.decay = decay;
>             }
>         },
>         // Several more parameter setting methods
>
>     )
> };
> [/code]
>
>
> Any ideas what might be happening and how to get rid of it? I am on 3.8 on Ubuntu Studio 16.04.
>
> Cheers,
> Erik


  #|
     fredrikolofsson.com     musicalfieldsforever.com
  |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Server goes quiet

Fredrik Olofsson

2 mar 2017 kl. 09:10 skrev Erik Natanael Gustafsson <[hidden email]>:

Thanks!
I found the problem: sometimes with the wrong parameter combinations I would get "0.reciprocal" in one of the noise making synths so I added a "max(var, 0.01)". It seemed weird that a problem in one synth would prevent the server from making any noise at all until a s.freeAll, but I guess I should be happy that the server didn't crash completely on an inf.

great that you found the issue.  yea, it can be a pain to find infs that occur only under certain conditions.  and that certain constellation of parameters might happen for the first time during your concert!  (part of what makes generative music exciting imo.)

StageLimiter seems useful, bu I didn't get exactly how to use it. Do you just evaluate "StageLimiter.activate;" before launching any Synths?

first boot the server.
then StageLimiter.activate
it'll survive cmd+period but not server reboot.

there's also checkforbadvalues functionality in Alberto's MasterFX class (JITLibExtensions quark) and in his new Safety class (SafetyNet quark).

//try this with/without different classes
a= {ReplaceOut.ar(0, In.ar(0, 2)*SinOsc.ar)}.play
b= {SinOsc.ar([500,600],0,Decay.ar(Impulse.ar(1), 0.2))}.play;
c= {(1/Line.ar(100, 0)).poll}.play;  //warning: loud if SafetyNet or StageLimiter not active
c.free

SafetyNet handles the situation best.  StageLimiter sounds a bit more brutal - clipping.
also SafetyNet posts you nice message: "CheckBadValues: infinity found in Synth 1000, ID 0 (previous 715845 values were normal)"
i guess this could have helped find your issue above (?).
_f

  #|
  |#

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Server goes quiet

Erik Natanael Gustafsson-2
Ahh, a SafetyNet sounds really great, I think I'll always use that from now on. Thanks again!

Erik

tors 2 mars 2017 kl 12:56 skrev Fredrik Olofsson <[hidden email]>:
2 mar 2017 kl. 09:10 skrev Erik Natanael Gustafsson <[hidden email]>:

Thanks!
I found the problem: sometimes with the wrong parameter combinations I would get "0.reciprocal" in one of the noise making synths so I added a "max(var, 0.01)". It seemed weird that a problem in one synth would prevent the server from making any noise at all until a s.freeAll, but I guess I should be happy that the server didn't crash completely on an inf.

great that you found the issue.  yea, it can be a pain to find infs that occur only under certain conditions.  and that certain constellation of parameters might happen for the first time during your concert!  (part of what makes generative music exciting imo.)

StageLimiter seems useful, bu I didn't get exactly how to use it. Do you just evaluate "StageLimiter.activate;" before launching any Synths?

first boot the server.
then StageLimiter.activate
it'll survive cmd+period but not server reboot.

there's also checkforbadvalues functionality in Alberto's MasterFX class (JITLibExtensions quark) and in his new Safety class (SafetyNet quark).

//try this with/without different classes
a= {ReplaceOut.ar(0, In.ar(0, 2)*SinOsc.ar)}.play
b= {SinOsc.ar([500,600],0,Decay.ar(Impulse.ar(1), 0.2))}.play;
c= {(1/Line.ar(100, 0)).poll}.play;  //warning: loud if SafetyNet or StageLimiter not active
c.free

SafetyNet handles the situation best.  StageLimiter sounds a bit more brutal - clipping.
also SafetyNet posts you nice message: "CheckBadValues: infinity found in Synth 1000, ID 0 (previous 715845 values were normal)"
i guess this could have helped find your issue above (?).
_f

  #|
  |#

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Server goes quiet

ddw_music
Erik Natanael Gustafsson-2 wrote
Ahh, a SafetyNet sounds really great, I think I'll always use that from now
on. Thanks again!
Note, however, that SafetyNet appears to be applied to the master signal, so it will not address the concern of "It seemed weird that a problem in one synth would prevent the server from making any noise at all."

If I'm reading SafetyNet correctly (I haven't used it), it will prevent the inf value from reaching the hardware output. But the "problem in one synth" is: when you mix any signal with inf, you get inf. So, you can have 20 mixing buses, 19 of them with valid signals and one with inf, and when you sum them to the master output, the result is inf and you don't hear the valid signals. Same for NaN.

So the bad-value checking needs to be more granular, at least at the level of the mixing bus.

MixerChannel has done this since October 2013 -- https://github.com/jamshark70/ddwMixerChannel/commit/7a9156e9e8a18e9a66167574dc80da271416f062 -- which I implemented because I got tired of rogue synths blasting very large values into a reverb, which would totally distort the output for several seconds until it decayed out. The checking is per MixerChannel -- a bad signal on one channel doesn't interfere with others.

hjh
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Server goes quiet

alberto.decampo
Yes, SafetyNet is the uses the ReplaceBadValues UGen, which you can apply to
any synth output with the shorthand .zap :

x = { RLPF.ar(PinkNoise.ar(0.1), \freq.kr(500), 0.2).zap }.play;

best adc

> On 05/03/2017, at 04:55 , ddw_music <[hidden email]> wrote:
>
> Erik Natanael Gustafsson-2 wrote
>> Ahh, a SafetyNet sounds really great, I think I'll always use that from
>> now
>> on. Thanks again!
>
> Note, however, that SafetyNet appears to be applied to the master signal, so
> it will not address the concern of "It seemed weird that a problem in one
> synth would prevent the server from making any noise at all.”

True - it protects hardware and users ears always when on.
It uses the ReplaceBadValues UGen, which users can apply to any ugen output signal with .zap:
x = { RLPF.ar(PinkNoise.ar(0.1), \freq.kr(500), 0.2).zap }.play;

You can use that for any signal you suspect might explode;
or to any mix bus, or any reverb input you want to protect, etc etc.

best adc

> If I'm reading SafetyNet correctly (I haven't used it), it will prevent the
> inf value from reaching the hardware output. But the "problem in one synth"
> is: when you mix any signal with inf, you get inf. So, you can have 20
> mixing buses, 19 of them with valid signals and one with inf, and when you
> sum them to the master output, the result is inf and you don't hear the
> valid signals. Same for NaN.
>
> So the bad-value checking needs to be more granular, at least at the level
> of the mixing bus.
>
> MixerChannel has done this since October 2013 --
> https://github.com/jamshark70/ddwMixerChannel/commit/7a9156e9e8a18e9a66167574dc80da271416f062
> -- which I implemented because I got tired of rogue synths blasting very
> large values into a reverb, which would totally distort the output for
> several seconds until it decayed out. The checking is per MixerChannel -- a
> bad signal on one channel doesn't interfere with others.
>
> hjh
>
>
>
> --
> View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Server-goes-quiet-tp7630922p7631009.html
> Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Loading...