036 Float

Description

Between sensation and thought. Between action and suspension.

The sounds are a combination of granulated, randomly selected recordings of a small child talking and granulated playback of Antony & The Johnsons "Bird Gerhl": the movements make the playhead skip forward in the sound buffer and trigger a new pattern that plays back from the new position. However, two sensors are competing for the playback position, which causes jitter in the playback function.

Source Code

Requires KF Supercollider-quarks and movement sensors. We use MiniBees, but with a bit of rewriting the MiniBeeUtils should work with any sensor data. See the full gitlab repo for more details on implementation.

// birdgirl.scd
( 
    var currentPos = 0;
    var initTime = thisThread.seconds;

    ~birdGirlFx = List.new(0);
    4.do{
        ~birdGirlFx.add(
            FxChain.new(
                fadeInTime: 30,
                level: 1,
                fadeOutTime: 30,
                out: ~masterBus,
            );
        );
    };
    ~birdGirlFx[0].addPar(
        \comb, [\mix, 0.3, \delay, 0.2, \decay, 1, \amp, 1/3],
        \comb, [\mix, 0.3, \delay, 0.5, \decay, 1, \amp, 1/3],
        \comb, [\mix, 0.3, \delay, 0.7, \decay, 1, \amp, 1/3],
    ); 
    ~birdGirlFx[0].add(\eq, [
        \locut, 120
    ]); 
    //--------------------------------------------------------- 
    ~birdGirlFx[1].add(\jpverb, [
        \revtime, 3,
        \mix, 0.3
    ]); 
    //--------------------------------------------------------- 
    ~birdGirlFx[2].add(\greyhole, [
        \delayTime, 0.3,
        \feedback, 0.9,
        \mix, 0.3
    ]); 
    //--------------------------------------------------------- 

    ~birdGirl = ~mb.collect{|id, idx|
        MBDeltaTrig.new(
            speedlim: 0.5, 
            threshold: 0.02,
            minibeeID: id,
            minAmp: -26,
            maxAmp: -6,
            function: {|dt, minAmp, maxAmp|
                var currentFx;
                var buf = ~buf[\birdGirl];
                var numFrames = buf[0].numFrames;
                var dur = 0.2;
                var step = dur * s.sampleRate;
                var len = dt.linlin(0.0, 1.0, step, step * 10);
                var pos = (
                    currentPos, currentPos+step..currentPos+len
                ); 
                var currentTime = thisThread.seconds - initTime;
                currentPos = pos[pos.size-1].mod(numFrames); 


                Pbind(
                    \instrument, \playbuf,
                    \buf, Prand(buf),
                    \dur, dur,
                    \attack, Pkey(\dur),
                    \release, Pkey(\dur) * 4,
                    \startPos, Pseq(pos),
                    \legato, 2,
                    \rate, Pwhite(0.99, 1.01),
                    \db, dt.linlin(0.0, 1.0, minAmp, maxAmp),
                    \pan, Pwhite(-1.0, 1.0),
                    \out, Pfunc({
                        currentFx = ~birdGirlFx.choose;
                        currentFx.in
                    }),
                    \group, Pfunc({ 
                        currentFx.group
                    }),
                ).play;
            }
        );
    }; 
)
// mupssong.scd
( 
    var currentPos = 0;
    var initTime = thisThread.seconds;

    ~mupssongFx = List.new(0);
    4.do{
        ~mupssongFx.add(
            FxChain.new(
                fadeInTime: 30,
                level: 1,
                fadeOutTime: 30,
                out: ~masterBus,
            );
        );
    };
    ~mupssongFx[0].addPar(
        \comb, [\mix, 0.3, \delay, 0.2, \decay, 1, \amp, 1/3],
        \comb, [\mix, 0.3, \delay, 0.5, \decay, 1, \amp, 1/3],
        \comb, [\mix, 0.3, \delay, 0.7, \decay, 1, \amp, 1/3],
    ); 
    ~mupssongFx[0].add(\eq, [
        // \locut, 120
        \locut, 440,
        \peakfreq, 500,
        \peakdb, -7,
    ]); 
    //--------------------------------------------------------- 
    ~mupssongFx[1].add(\jpverb, [
        \revtime, 3,
        \mix, 0.3
    ]); 
    ~mupssongFx[1].add(\eq, [
        // \locut, 120
        \locut, 440,
        \peakfreq, 500,
        \peakdb, -7,
        // \hicut, 600,
    ]); 
    //--------------------------------------------------------- 
    ~mupssongFx[2].add(\greyhole, [
        \delayTime, 0.3,
        \feedback, 0.9,
        \mix, 0.3
    ]); 
    ~mupssongFx[2].add(\eq, [
        // \locut, 120
        \locut, 440,
        \peakfreq, 500,
        \peakdb, -7,
        // \hicut, 600,
    ]); 
    //--------------------------------------------------------- 
    ~mupssongFx[3].add(\eq, [
        // \locut, 120
        \locut, 440,
        // \hicut, 600,
    ]); 

    ~mupssong = ~mb.collect{|id, idx|
        MBDeltaTrig.new(
            speedlim: 0.5, 
            threshold: 0.02,
            minibeeID: id,
            minAmp: -14,
            maxAmp: 6,
            function: {|dt, minAmp, maxAmp|
                var currentFx;
                var buf = ~buf[\mupssong];
                var numFrames = buf[0].numFrames;
                var dur = 0.2;
                var step = dur * s.sampleRate;
                var len = dt.linlin(0.0, 1.0, step, step * 10);
                var pos = (currentPos, currentPos+step..currentPos+len); 
                var currentTime = thisThread.seconds - initTime;
                currentPos = pos[pos.size-1]; 
                // currentPos = pos[pos.size-1].mod(numFrames); 


                if(currentPos<numFrames){
                    Pbind(
                        \instrument, \playbuf,
                        \buf, Prand(buf),
                        \dur, dur,
                        \attack, Pkey(\dur),
                        \release, Pkey(\dur) * 4,
                        \startPos, Pseq(pos),
                        \legato, 2,
                        \rate, Pwhite(0.99, 1.01),
                        \db, dt.linlin(0.0, 1.0, minAmp, maxAmp),
                        \pan, Pwhite(-1.0, 1.0),
                        \out, Pfunc({
                            currentFx = ~mupssongFx.choose;
                            currentFx.in
                        }),
                        \group, Pfunc({ 
                            currentFx.group
                        }),
                    ).play;
                }{ 
                    ~mupssongFx.do(_.free);
                    ~mupssong.do(_.free);
                }
            }
        );
    }; 
)

// (
//     ~mupssongFx.do(_.play);
//     ~mupssong.do(_.play);
// )
// (
//     ~mupssongFx.do(_.free);
//     ~mupssong.do(_.free);
// )