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

Re: [sc-users] Re: ATS clicks and distortion



Hi,

I've never noticed anything along the lines of what you describe in your first message. However, in the past I have been caught out by the 'filePointer' arg and how it seems to wrap around. One expects a value of 1 to point to the final frame of the ATS file, but in my experience it actually seems to point to the first frame. So if there's energy in the first frame, and you're scanning the file through to the end, you'll hear a click as the file pointer approaches a value of 1.

I can't say whether this is the issue you're experiencing or not. Although I did try out your second example with a couple of ATS files and I didn't notice any problems besides that already mentioned.

Cheers,
Martin


On 15 December 2014 at 20:09, J <falabala66@xxxxxxxxx> wrote:
Just to confirm, I have the same behaviour using the AtsSynth to playback ATS files - this leads me to the conclusion that there is something inherent in the ATS format which prevents it playing back data smoothly at fast scan speed:

( //this clicks unless the MouseX lag is above 1.5 or so
b = {
AtsSynth.ar(e.bufnum, e.numPartials, 0, 1,
filePointer: MouseX.kr(0,1), freqMul: 1 ,mul: 1).dup
}.play(s);
);

I will try the BE_Partials approach and see if it's any better.

On Tue, Dec 9, 2014 at 1:40 PM, J <falabala66@xxxxxxxxx> wrote:
Hello,

I asked this question awhile back and I thought that I had got a handle on this problem, but it appears I hadn't.

Basically, I am running an ATS SynthDef that creates a single partial, and I am reconstructing the while ATS file through a pattern that plays all the partials. It works quite well, until I go down to very small envelope times. I am even using an .ar envelope and OffsetOut, which helps a little but not much.

It's not just the 'pop' of a quick envelope attack either, it almost sounds like nyquist aliasing, or zipper noise.

Josh had identified earlier that this is probably ATS tracks going to zero and the track changing scheme of ATS data - this makes sense, as when I am scanning through the data very quickly and applying to the sine waves is when it starts popping.

Is there anything more that can be done either on the ATS analysis side or on the SC side to deal with this?

I've included my code below - note that it's more or less prominent with different analyses, but but it's always noticeable when I have short envelope times with a very fast scan of the ATS data.

Perhaps I would have better luck with using a SPEAR based approach, or another analysis protocol? Any suggestions welcome!

SynthDef and Pattern below:

(
//partial player

SynthDef(\atsPartialPlayer, {arg ampBuffer, freqBuffer, partial, ampBufDur = 1, freqBufDur = 1, atk = 1, sus = 1, rel = 1, sustain =1, anaLag = 0.01, baseFreq = 1, fStr =0, fEnd = 1, fCurve = 1,aStr =0, aEnd = 1, aCurve= 1, amp = 1, freq = 1, freqScal = 1, ampScal = 1, pan = 0, curve = 0, outBus = 0; var sig, parFreq, parAmp, fEnv, aEnv, env;

aEnv = Env([aStr, aEnd],[1],[aCurve]);
fEnv = Env([fStr, fEnd],[1],[fCurve]);
aEnv = EnvGen.ar(aEnv.duration = sustain);
fEnv = EnvGen.ar(fEnv.duration = sustain) ;

parFreq = AtsFreq.ar(freqBuffer, partial, fEnv).lag(anaLag);
parAmp = AtsAmp.ar(ampBuffer, partial, aEnv).lag(anaLag);

env = EnvGen.ar(Env.linen(atk,sus,rel,1, curve).duration = sustain, doneAction:2);
sig = SinOsc.ar(parFreq * (freq/baseFreq) * freqScal, 0, parAmp * ampScal);

OffsetOut.ar(outBus, Pan2.ar(sig * env, pan))
}).add(s);

//partial pattern
Pdef(\atsPartialPattern,
Pbind(\instrument, \atsPartialPlayer,
\type, \on,
\group, ~gen,
\addAction, \addToTail,
\ampBuffer, g.bufnum,
\freqBuffer, g.bufnum,
\baseFreq, 60.midicps,

\degree, Pseq([[0, 2, 4], [2, 0, 4],[3, 6, 2]] , inf),
\scale, Scale.minor(~tuning),
\root, Pseries(-12 , Pseries(-12 ,4, inf).fold(0, 7), inf).fold(-12, 12),

\partial, Pfunc{Array.series(32, 0, 1)},
\freqScal, Pfunc{Array.series(32, 1, 0)},
\ampScal, Pfunc{Array.series(32, 0.4, -0.001)},

        \fStr, 0.2,
        \fEnd, 0.7,
        \fCurve, \lin,
        \aStr, 0.2,
        \aEnd, 0.7,
\aCurve, \lin,

\atk, Pkey(\partial).fold(1,2),
\sus, Pkey(\partial).fold(1,2),
\rel, Pkey(\partial).fold(1,3),

\curve, 0,
\anaLag, 0.01,
\pan, Pkey(\partial).fold(-1,1),
\outBus, 0,
\dur, Pseries(0.002, 0.15,inf).fold(0.01, 0.2),
\legato, Pkey(\dur) * Pseries(1, 0.1,inf).fold(1, 15),
)
);

--


--