[PD] phasor time scaling
cyrille henry
cyrille.henry at la-kitchen.fr
Sun Dec 9 18:04:42 CET 2007
Jamie Bullock a écrit :
> Hi Frank,
>
> On Sat, 2007-12-08 at 14:24 +0100, Frank Barknecht wrote:
>> Hallo,
>> Jamie Bullock hat gesagt: // Jamie Bullock wrote:
>>
>>> Has anyone implemented 'phasor time scaling' as an abstraction (or
>>> external)? I know it is relatively easy scale a phasor where the
>>> frequency of the scaled phasor is an integer multiple of the master
>>> phasor:
>>>
>>> [phasor~]
>>> |
>>> [*~ 2]
>>> |
>>> [wrap~]
>>>
>>> ...but what about non-integer multiples, and fractional scaling?
>> A full phasor~ whose frequency is a non-integer multiple of the freq
>> of another phasor~ will not start again at zero everytime, when the
>> first phasor~ starts at zero. For example a phasor with 1.5 times the
>> frequency of the first phasor~ would be in sync only every 3 cycles.
>> So you cannot sync the second phasor with the first phasor on *every*
>> jump of the first phasor with wrap~ ... without keeping track of where
>> the second phasor is.
>
> Sure. I think you might have misunderstood the question. What I am
> asking relates to two things:
>
> i) If you use the above technique to generate a phasor that has a
> frequency that is a non-integer multiple (e.g. 1.5) of the 'master'
> phasor, then you don't get a full phasor. For the 'scaled' phasor, every
> other peak will have an amplitude that is proportional to the size of
> the fractional part of the right operand of the multiplication (see
> attached).
>
> ii) For 'scaled' phasors where the multiplier is less than 1, the result
> is simply an amplitude scaling (also see attached).
>
> I guess all this is fairly obvious stuff, but my question is, how does
> one achieve proper non-integer rate scaling? The [rate~] object in
> Max/MSP does this so I know it is possible! I don't mind coding up and
> external for this if it can't be done in Pd, but I don't know what the
> algorithm for such an operation would be...
i think if the input can only be a phasor you can :
-differenciate the phasor (with a biquad: out(t) = in(t) - in(t-1) )
-ignore negative value (with a test on a expr~ object by exemple)
-multiply by scale factor
-integrated this value (with a biquad: out(t) = in(t) + out(t-1) )
-wrap the result
cyrille
>
>> What you could do instead is calculate wrapped phasors from a very
>> slow phasor like [phasor~ 1] as a base. All phasors derived from that
>> will sync once every second.
>>
>
> What difference does it make how fast or slow the master phasor is?
> Surely it's only the ratio between the phasor rates we're interested in.
>
> Jamie
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
More information about the Pd-list
mailing list