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

[sc-users] Pbind re-scales amplitude automatically?



Hi, advanced users.

I wrote a SynthDef in attempting to make a "bad contact sound", (like when you plug in/out a jack into your running audio mixer)
but as my DSP knowledge is zero and I'm relatively newbie in SC, I just made something in blind way.

(
SynthDef(\jack,{|freq = 110, dur =0.2, dTime = 0.1, pan = 0|
    var sound, syn, env;
    env = EnvGen.kr(Env.perc(0.0000001,dur),doneAction:2);
    syn = LFSaw.ar(freq,pi/2,1); // start at highest wave point, use .plot to see
    sound = CombN.ar(syn, 1, dTime); // used as resonator, use small numbers
   
    Out.ar(0, Pan2.ar(sound, pan));
    }).memStore;

)

It does its job, at least I'm satisfied but the problem is if I replace the LFSaw's mul value as an argument ("amp" for example),

SynthDef(\jack,{|freq = 110, dur =0.2, dTime = 0.1, pan = 0, amp = 1|

syn = LFSaw.ar(freq,pi/2,amp); // start at highest wave point, use .plot to see

like so,

then it start to make a mystery.

when I play like

Synth(\jack)

then it's ok, it's the same sound in the both cases,

but as soon as I play it as patterns,

(
TempoClock.default.tempo = 84/60;
c = Pbind(\instrument, \jack,
        \freq, Pwhite(1, 20, inf),
        \dur, Pwhite(1, 5, inf),
        \dTime, Pwhite(0.00001, 0.005, inf)
).play;
)

then the amplitude kind of scale itself to "resonable" volume, and removes my desired clicking effects.
(when the each patterns overlaps, there must be this loud "TAKK!" sound)

the only way to get that sound back and make sound louder is to remove "amp" argument and replace it to this dirty "1".
But I need to control the amplitude becuase I want this synth to be usable in SC context.

For me it's absolutely non sense that between "amp = 1" and "1" there's a whole different world.

Can anybody please help me to have dirty loud accidental sound but still controllable?
Or do you have better way to write that kind of sound?

I'm on OSX 10.5 running SC 3.3 without external DSP device. (but using firewire DSP converter doesn't seem to change something anyway.)


best,

jae ho