Poème Symphonique

Reconstructing Ligeti's "Poème Symphonique" for 100 metronomes.

en.wikipedia.org/wiki/po%c3%a8me_symphonique

#stresstest #Ligeti

Log in to post a comment.

// Reconstructing Ligeti's "Poème Symphonique" for 100 metronomes.

input.bpmMin = 60; // min=30, max=120, step=1
input.bpmMax = 120; // min=30, max=120, step=1

ditty.bpm = 100;

const metronome = synth.def( (phase, env, tick) =>  (Math.sin(phase * Math.PI * 2) + .25 * (Math.random() - .5)) * Math.exp(-tick * 500) * env.value, {attack: 0.0025, release: 0.01, env: adsr2});

function rand(min, max) {
    return lerp(min, max, Math.random()) | 0;
}

for (let i=0; i<100; i++) {
    
    // each loop is a separate metronome
    
    loop( class {
        constructor() {
            this.totalTicks = rand(40, 100);
            this.bpmLerp = Math.random();
            this.pan = Math.random() * 2 - 1;
            this.amp = 4 + Math.random();
            this.note = c4 + Math.random() * 4;
        }
        
        process(count) {
            if (count > this.totalTicks) return false;
            
            metronome.play(this.note, { pan: this.pan, amp: this.amp });
            sleep(ditty.bpm / lerp(input.bpmMin, input.bpmMax, this.bpmLerp));
        }
    });
}