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

Re: [sc-dev] gotcha! PulseDivider



This is similar to the behavior of Trig1 (where Trig does what you need). Perhaps there should be a PulseDivider1 and PulseDivider? Of course, this change may break others code to bring the naming conventions together. The help file does mention that it outputs an Impulse though, which would imply a 1.0 (though this isn't very clear).

Probably the easiest thing to do would be to mul the output of Impulse by your input:

SynthDef("help-PulseDivider",{ arg out=0;
var p, a, b;
p = Impulse.ar(8) * MouseX.kr(0, 1);
a = SinOsc.ar(1200, 0, Decay2.ar(p, 0.005, 0.1));
b = SinOsc.ar(600,  0, Decay2.ar(PulseDivider.ar(p, 4) * p, 0.005, 0.5)); // * p to scale Impulse of PulseDivider


Out.ar(out,(a + b) * 0.4)
}).play;


Josh

On Dec 4, 2006, at 5:33 AM, James Harkins wrote:

Blast! There is always some stupid little detail that is not documented, that screws up what you're trying to do.

PulseDivider does not hold the trigger's actual level... it always outputs 1.0 for every trigger. I was using triggers for accenting notes, but when I switched to a synth with PulseDivider, all my accents were gone.

if (prevtrig <= 0.f && curtrig > 0.f) {
counter++;
if (counter >= div) {
counter = 0;
/// why --->>>??
z = 1.f;
} else {
z = 0.f;
}
} else {

Should this perhaps be changed? That is, should it be expected that most of the trigger ugens would flatten the trigger levels to 1.0 or 0.0, or is it reasonable to expect them to hold the actual trigger level?

hjh

: H. James Harkins
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

_______________________________________________
sc-dev mailing list

******************************************
Joshua D. Parmenter

“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono