[PD] Shifting arrays (permutation)

Claude Heiland-Allen claude at mathr.co.uk
Wed Oct 10 14:16:46 CEST 2012


On 10/10/12 12:51, Rick T wrote:
> Greets All
>
> I was looking for a way to shift arrays (permutation) by samples

(permutation generally refers to something more general than shifting or 
rotating, more like shuffling a deck of cards than cutting it)

Personally I keep all my vline~ in [0..1] and use maths to manipulate.

Especially because (vanilla's, zexy has a better one)b [wrap~] wraps to 
[0..1], and could be help do what you need:

[0, 1 1000(
  |
[vline~]
  |
[+~ 0.25]  <-- this value in [0..1] too, modulatable at signal rate
  |
[wrap~]
  |
[*~ table size here]
  |
[tabread4~ your table hear]

will play the table wrapped around
starting with the last 3/4 then first 1/4

To convert between samples and [0..1], elementary arithmetic helps.


Claude
-- 
http://mathr.co.uk



More information about the Pd-list mailing list