[PD-dev] [PD] Rewriting a unified phasor / metro object for reading tables
reduzent at gmail.com
Sat May 11 11:56:23 CEST 2013
On Thu, 2013-05-09 at 14:33 +0100, Ed Kelly wrote:
> I figured out how to do this.
> Generally the problem is this: the signals to run four independent
> tracks in my patch are all devised from one phasor~ object that scans
> a single bar of material. Clicks then appear in the material when
> jumping from one bar to the next, because the control events are
> quantized to the 64 samples of a block.
This is not the case when using [metro]/[del] in combination with
[vline~] (saying this while only partially understanding what the
[phasor~] are used for. Sorry, if I'm way off).
> So we get lines like the picture enclosed that read the material
> using tabread~.
> In order to get rid of the clicks, I have an alternative method for
> reading the material _without_ adding any new DSP objects (this has to
> run on an iPhone 4). It involves the phasor~-esque object ramping from
> 0 to 8 over 8 bars or not, depending on whether it is jumping around
> or smoothly reading the 2, 4 or 8-bar loop.
> I already have this working - it has to detect when the ramp is
> crossed and generate a clock signal from it for the intra-bar rhythms.
> I took phasorshot~ as my prototype, but that had the same problem as
> before, namely that non-signal pulses are quantized to 64 sample
> blocks. I tried using clocks but they went out of sync while the tempo
> was being changed of course.
The problem with [metro] is that when you change the tempo, the current
interval sticks to the old tempo and the new tempo is only applied at
the time of the next tick. It is possible to change the tempo in the
middle of an interval by measuring the elapsed time since the last tick
and calculating the remaining part of the interval with new tempo. This
way it is possible to change the tempo of many simultaneously running
[metro]s with different interval settings without them running out of
I implemented this to allow the creation of polyrhythmic sequencers. I
made an abstraction ([rh_metro] ) which behaves very similar to
[metro] but allows for in-interval tempo changes.
More information about the Pd-dev