«Risset rhythm» by snappizz

on 06 Mar'16 21:04 in rhythmrissetshephardaccelerandodecelerandoillusion

buffer playback with eternal accelerando rhythm

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// See http://c4dm.eecs.qmul.ac.uk/papers/2011/Stowell2011icmc.pdf

// use any shortish 4/4 drum loop
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/break2.aiff");
b.free;

(
SynthDef(\risset, {
    |out = 0, buf, megabardur = 3.0, bufdur = 3.0, level = 0, bandwidth = 1, centerrate = 1, dir = 1|
    var t, rate, snd, power;
    t = Sweep.kr * dir;
    rate = bufdur * 2.log / megabardur * pow(2, t / megabardur + level);
    power = (pi * bandwidth * 0.5 * log2(rate / centerrate)).clip2(pi).cos + 1 / 2;
    snd = PlayBuf.ar(1, b, BufRateScale.kr(b) * rate, loop: 1) * power;
    EnvGen.kr(Env([0, 0], [megabardur]), doneAction: 2);
    Out.ar(out, Pan2.ar(snd));
}).add;
)

(
// amount of time it takes for the audio to speed up or slow down 2x
// the rhythm repeats seamlessly every megabar
var megabardur = 20.0;
Pbind(
    \instrument, \risset,
    \buf, b,
    \megabardur, megabardur,
    \dur, megabardur,
    \bufdur, b.duration,
    \level, (0..5),
    \bandwidth, 0.8, // adjust this if the illusion isn't very convincing
    \centerrate, 1.0,
    \dir, 1 // 1 for accel, -1 for decel
).play;
)
raw 1146 chars (focus & ctrl+a+c to copy)
reception
comments
LFSaw user 03 Mar'20 14:15

see also https://sc-users.bham.ac.narkive.com/Qdtp11n7/risset-accelerando