[PD] Clock Division

Roman Haefeli reduzent at gmail.com
Sun Jan 10 13:01:48 CET 2016


On Sat, 2016-01-09 at 15:07 -0500, Peter van Haaften wrote:
> Greetings,
> 
> I am trying to find a simple and efficient way to divide quarter notes
> in Pd.
> 
> The patch I am constructing is a kind of ostinato sequencer. There are
> four quarter notes, which should each by divided into 1-16 ticks (user
> definable). So, QT1 could be divided into 5 ticks, QT2 into 10, QT3
> into 1, and QT4 into 16. On the GUI, a series of 16 toggles allow the
> user to sequence and trigger a sample at each outputted tick.
> 
> I was originally using the [timing.tempo] pdmtl patch as my clock. It
> largely works well, but there is a second component to this project,
> where a variable master tempo can change across time. With quickly
> shifting tempos, [timing.tempo] stumbles and occasionally counts
> incorrectly.
> 
> Can anyone recommend a simple way to divide a clock in the fashion
> described above? Perhaps there is already a stable abstraction out
> there I can take advantage of?
> 

As I understand you, you want to be able to smoothly change the master
tempo while maintaining synchronicity among all subdivision. All
suggestions posted yet fail at that, since they simply send an updated
interval to the [metro]. However, [metro] takes the new interval into
account only _after_ it has finished the current interval. When having
many subdivisions, the tempo change takes effect at a different moment
in time for every subdivision and thus you get shift.

I tried to tackle that problem in netpd in the [master] instrument (the
master clock of all sequencers). It uses [rh_metro] internally, which is
a [metro] replacement that does take into account tempo changes during
intervals. There is also a [master-poly] abstraction that generates any
integer subdivision tempo that stays in sync with the master. 

Check https://github.com/reduzent/netpd-instruments

I was working on those things before [metro] was updated in Pd 0.45. It
now supports setting time intervals in many different units. There is
newly introduced 'tempo' method that let's change tempo _during_
intervals (which makes [rh_metro] from above obsolete). Checkout the
help of [delay], it covers all the details of specifying units and
tempo. I think using [metro] and changing tempo with 'tempo' is what
you're looking for.

Roman


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160110/88848131/attachment.sig>


More information about the Pd-list mailing list