[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] bizarre audio cutouts



Title: bizarre audio cutouts
i have an 8-channel quad-spatializing soundfile playback that is giving me a headache.  i'm trying to add filtering to a working patch and the audio will cut out for no reason.  same on stereo, which is what i'm working on right now.

i'm trying to add to the Pan2 with LPF.  when i add an LPF the master audio cuts out randomly, for a sec or 20, then come back in at a different place, and it spits out data for me so i know it continues selecting soundfiles and generating control data for them.

 i sat down with a bunch of data that it spit out and tried to line up all the events and it is completely useless.  seems more like a coincidence rather than a cause.  the CPU usage never gets above like 60% and there are up to 800 uGens but usually 500 or less.

if i comment out the last few lines of the spawns to hide the LPF's it works fine.

here's the essential part of the code.

                Mix.ar(Array.fill(8,
                            {
arg i; Spawn.ar({

                                        ... // choose soundfiles and generate control data for them
                               
       
                                        p = PlayBuf.ar(voice, 44100, speed); // play the chosen sample
                                 
                                        e = EnvGen.ar( env2, Pan2.ar(p, min(1, x), 0.5 )); 
                                                        // stereo version using function x, which is chosen from
                                                        // an array of functions like: SinOsc, Dust, Saw
                                       
                                        lpf1 = EnvGen.ar(env3, LPF.ar(e.at(0), 1700, min(1, ((x+1)*0.5)) ));
                                        lpf2 = EnvGen.ar(env3, LPF.ar(e.at(1), 1700, min(1, ((x-1)*0.5).abs) ));
                                        lpf = [lpf1, lpf2];  // filtering to help the side-to-side sensation
                                       
                        e                       // e works
                                + lpf }         //lpf works too but the master cuts out once in a while
               
 thanks a lot bob
--
be safe and insane
http://www.halfnormal.com