[PD] 2 abstractions

Luke Iannini (pd) lukexipd at gmail.com
Tue Apr 1 11:34:54 CEST 2008


Here are another couple abstractions from a night of building things
that needed them:

YALA (yet-another-list-abstraction):
[list-split-at], which splits a list into multiple lists each time it
encounters a delimiter, so [a b c . d e f . g h i j( into
[list-split-at .] will spit out 3 lists, [a b c(, [d e f( and [g h i
j(.  Requires list-abs, but is pure-pd. (and Frank as always if you
like it you are welcome to take it for list-abs).

and

[beat2frac], which takes a note division like [1/16( and outputs the
fraction of a quarter note as a float (so, that would give 0.25).  A
bit odd, but it makes it very convenient to multiply by the length of
one beat in seconds (60 / BPM) and get the input beat length in
seconds.  It also supports triplets (e.g. [1/16T( or [1/16t(, would
give 0.1666), and arbitrary divisions like [3/17( (gives 0.705822).
Requires list-split-at, list-abs and zexy.

Cheers
Luke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: list-split-at-and-beat2frac.zip
Type: application/zip
Size: 4457 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20080401/522aa542/attachment.zip>


More information about the Pd-list mailing list