1. Video documentation of me using a brain-computer-interface (in this case an Emotiv headset reading EEG) to turn a motor controlling a pinch-valve using Open Sound Control.  This is a proof-of-concept project for a number of upcoming performance and interactive pieces.

  2. Site specific installation Three Ships for Galeano from Passages at INSCAPE.  The inaugural open house show and rechristening of the INS building which is now artist work space.

  3. This week I am finishing up a site-specific installation entitled “Three Ships for Galeano” for Passages at INSCAPE, the inaugural show for the converted Immigration and Naturalization Services building in downtown Seattle.  The installation is being constructed in the gold exchange on the top floor of the former INS building and features a digital sound composition created from onsite recordings of Eduardo Galeano’s Memory of Fire trilogy which tells the history of the Americas in vignette form.  You can listen to an excerpt of the work in progress here. 

    This week I am finishing up a site-specific installation entitled “Three Ships for Galeano” for Passages at INSCAPE, the inaugural show for the converted Immigration and Naturalization Services building in downtown Seattle.  The installation is being constructed in the gold exchange on the top floor of the former INS building and features a digital sound composition created from onsite recordings of Eduardo Galeano’s Memory of Fire trilogy which tells the history of the Americas in vignette form.  You can listen to an excerpt of the work in progress here

  4. Voicewriter
    Meghan Trainor, 2010


    Voicewriter is a site-specific work created during my recent residency at the James W. Washington, Jr. and Janie Rogella Washington Foundation in Seattle’s Central District.
    Mr. Washington was a celebrated local artist best known for his stone sculpture celebrating natural forms.  He was friends with Mark Tobey and a member of the “Northwest School” of painters during the mid-twentieth century. Over his long life he gave many talks on his philosophies of art, beginning with a presentation to African-American Navy men in 1945.  During my residency I dove deep into the archives, listening to many of Mr. Washington’s recorded speeches, and in his vast library finding a unique annotation system that mapped very directly to his talks.  Using a star system, along with various underlines and notations, Mr. Washington revealed the trajectory of his research rough these texts. Early in his life he worked as an electrician for the military, amongst many other jobs, and his fascination with gadgets is evident in his sizable collection of Edison Voicewriter devices.  Having long worked with my recorded voice in my installation work I set about recording from Mr. Washington’s annotated texts onto wax cylinders.
    The digitized recordings were then composed within Supercollider, a digital sound synthesis environment. Taking oak lampshades, another of Mr. Washington’s many collections of objects lingering throughout his vast work spaces, I constructed a form to house the wax cylinders, inset laser cut panels were generated using Grasshopper, a parametric plug-in for Rhino, a 3D modeling environment. Mr. & Mrs. Washington’s greenhouse became a listening chamber, housing both the audio composition created using his materials and tools, and the physical response to the greenhouse itself.

  5. Washington House Residency: week 2

    I’m just finishing up my second week here at the James Washington House and I’m in the midst of prototyping some of my project ideas out in the studio.  There are rooms upon rooms filled with tools, many for stone work, as well as wood working, printing and general making related tasks.  One of the side products of one of the stone drills are these core shapes.  Apparently there were buckets of these cores that Mr. Washington had drilled out of stone, but no one is exactly sure where the stones they came from are.  Certainly a few pieces had cores drilled out for mounting, but given the quantity of cores, they expected more.  So it’s a little bit of a mystery here at the Foundation.

    Prototyping Drilling

    That said, some of the cores also come from previous resident Romson Regarde Bustillo, who drilled holes in stones from the garden and placed them in water in the greenhouse for a haunting examination of negative space.  These stones were then re-purposed by last month’s resident Nikolus Meisel in his piece And then the bush said...

    Because stone is such a primary material to Mr. Washington’s work and legacy I wanted to include it as a mechanism for interactive digital experience; to be touched and moved by the audience. 

    Edison Voicewritercylinder tower

    Another project involves using one of the many Edison voicewriters that Mr. Washington had collected over the years.  These machines are a marvel of engineering and yet at the same time a wildly inefficient way to gather just a little bit of very low quality of sound.  The physicality of these machines, and the wax cylinders they used, stands in stark contrast to the almost ephemeral nature of digital audio we take for granted today.  For this piece I’ll be recording onto the cylinders from Mr. Washington’s archive, with special attention to his own “three star” annotation method and then digitally processing the audio in SuperCollider.

  6. Karst

    Karst: a site-specific performance work for amplified gesture and prosthetic voice featuring Sonnets to Orpheus (Part 2, Number 11) by Rainer Maria Rilke.

  7. Karst final SuperCollider code

    //Karst
    /*
    a site-specific performance work for amplified gesture and prosthetic voice featuring Sonnets to Orpheus (Part 2, Number 11) by Rainer Maria Rilke.
    */

    //audio sample available here: http://soundcloud.com/meghatron

    //SERVER
    (
    Server.default = s = Server.internal.boot;
    s.waitForBoot({
    });
    //took out paren to save a step since I have to reboot entirely after every kill

    //ARDUINO
    //ibid
    SerialPort.listDevices;
    d = SerialPort.devices[2];
    f = SCPyduino.new(d);  //declares f an SCPyduino object
    )

    //NON SEQUENTIAL CLOSE  (rather than scrolling to the end, kill SCPyduion here when code block stopped before reboot)
    //close the serial port
    (
    f.close;
    )

    //KARST MAIN CODE BLOCK
    (
    //VARIABLES
    //synths
    var synth, scrape;

    //functions
    //ACTION - remane these functions and create a 4th, one for each sample
    var func, pfunc, ffunc;

    //sample variables
    var transform, death, machine, noisefloor;

    //more joshparametrical magic right here
    var flex1, flex2, controlflex1, controlflex2;

    //CONTROL
    controlflex1 = CtkControl.play;
    controlflex2 = CtkControl.play;

    //SAMPLES
    //Source = Rilke: Orpheus Sonnet pt2 10 “The machine threatens all we have gained, so long as it dare become the tyrant of spirit, rather than its servant.”
    machine = CtkBuffer.playbuf(“sounds/Karst_Machine.aif”).load;

    //Source = Rilke: Orpheus Sonnet pt2 11 “Many quietly acceptable methods of death have come to pass since onward conquering man first laid claim to the hunter’s arts;….”
    death = CtkBuffer.playbuf(“sounds/Karst_Death.aif”).load;

    //Source = Rilke: Orpheus Sonnet pt2 12 “Aspire to transform, O enraptured be by the fire wherein something elusive flames with brazen tidings of change;….”
    transform = CtkBuffer.playbuf(“sounds/Karst_Transform.aif”).load;

    //Source = Site Noisefloor, May 29, 2010
    noisefloor = CtkBuffer.playbuf(“sounds/Karst_Noisefloor.aif”).load;

    //KILL SWITCH
    //actions on CmdPeriod which is triggered by a sensor on pin 5
    CmdPeriod.doOnce({
        machine.free;
        death.free;
        transform.free;
        noisefloor.free;
        a.stop;
        b.stop;
        c.stop;
        g.stop;
        h.stop;
        k.stop;
        Server.killAll;
        ”I’m freeing the buffers!”.postln;
        });
        
    //SYNTHDEFS
    // trigger synth
    synth = CtkSynthDef(\synth, {arg imp, begin, out = 0, bufnum = 0, pan = 0, amp =0.5, deviation = 0, pch = 1;
        var trig, sig, sampstosecs, devAmt, outsig, env;
        env = EnvGen.kr(Env.new([0, 1,0], [0.1,0.1], \linear, 1));
        trig = Impulse.ar(imp);
        sampstosecs = (SampleRate.ir * BufRateScale.kr(bufnum));
        devAmt = (deviation * LFNoise1.kr( imp) * sampstosecs);
        sig = PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum) * pch, trig, (begin * sampstosecs) + devAmt, 0);
        outsig = Pan2.ar(sig*amp, pan);
        Out.ar(out, [outsig[0], DelayN.ar(outsig[1], 0.002, 0.002)]);
    });

    //contact mic synth for scraping the walls
    scrape = CtkSynthDef(\scrape, { arg bus;
        var signal;
        signal = SoundIn.ar(bus);
        Out.ar(bus,signal*1);
    });

    scrape.new(0,nil).bus_(0).play;
    scrape.new(0,nil).bus_(1).play;

    //FUNCTIONS
    //FUNC :: for use with impulse triggers
    func = {arg duration, amp, rhythms,  imps, begs, pans, dev;
    var start, now, index, dur, imp, beg, rhy, pan1;
    Task({
        start = Main.elapsedTime;
        now = 0;
        index = 0;
        imp = imps;
        while({
        now < duration;
        }, {
        now = Main.elapsedTime - start;
        rhy = rhythms[index%rhythms.size];
        
        imp = imps[index%imps.size];
        beg = begs[index%begs.size];
        pan1 =pans[index%pans.size];
        synth.new(0, nil).bufnum_(noisefloor.bufnum).imp_(4).begin_(beg).pan_(pan1).amp_(amp).deviation_(dev)
            .pch_(controlflex1).play;
        rhy.wait;
        index = index + 1;
        })
    }).play
    };

    //PFUNC :: make my func the pfunc
    pfunc = {arg duration, amp, rhythms, durs, imps, begs, pans, dev;
    var start, now, index, dur, imp, beg, rhy, pan1;
    Task({
        start = Main.elapsedTime;
        now = 0;
        index = 0;
        imp = imps;
        while({
        now < duration;
        }, {
        now = Main.elapsedTime - start;
        rhy = rhythms[index%rhythms.size];
        dur = durs[index%durs.size];
        imp = imps[index%imps.size];
        beg = begs[index%begs.size];
        pan1 =pans[index%pans.size];
        synth.new(0,10).bufnum_(death.bufnum).imp_(4).begin_(beg).pan_(pan1).amp_(amp).deviation_(dev).play;
        (rhy + dur).wait;
        index = index + 1;
        })
    }).play
    };

    //FFUNC :: machine function
    ffunc = {arg duration, amp, rhythms, durs, imps, begs, pans, dev;
    var start, now, index, dur, imp, beg, rhy, pan1;
    Task({
        start = Main.elapsedTime;
        now = 0;
        index = 0;
        imp = imps;
        while({
        now < duration;
        }, {
        now = Main.elapsedTime - start;
        rhy = rhythms[index%rhythms.size];
        dur = durs[index%durs.size];
        imp = imps[index%imps.size];
        beg = begs[index%begs.size];
        pan1 =pans[index%pans.size];
        synth.new(0, 10).bufnum_(machine.bufnum).imp_(4).begin_(beg).pan_(pan1).amp_(amp).deviation_(dev).play;
        (rhy + dur).wait;
        index = index + 1;
        })
    }).play
    };


    //ARDUINO

    //Arduino: Sensors
    //Left Piezo     ”a” “u” lop
    //f.analog[0].active_(1);
    //Left Flex     ”b” “v” lox
    f.analog[1].active_(1);
    //Left Force     ”c” “w” lor
    f.analog[2].active_(1);

    //Right Piezo “g” “x” rop
    //f.analog[3].active_(1);
    //Right Flex     ”h” “y” rox
    f.analog[4].active_(1);
    //Right Force “k” “z” ror
    //f.analog[5].active_(1);
        
    /*    
    //Left Piezo
    a = fork{
            loop{
                var lop;
                f.iterate;
                u= f.analog[0].value;
                ”u:”.post;
                u.postln;
                lop = (1000-u)/100;
                ”lop: imp: “.post;
                lop.postln;
                syn1.imp_(lop);
                0.001.wait;
            }
    };    
    */    
        
    m = 0;
    //Left Flex
    //3030: this is working, starts inactive, is trigger at first bend and cycles through noisefloor functions, the first of which is pitch affected by sensor value
    b = fork{
        t = Main.elapsedTime;
            loop{
                var lox;
                f.iterate;
                v= f.analog[1].value;
                flex1 = v;
                //controlflex1.set((flex1 / 500) - 0.5);
                controlflex1.set((flex1 / 500) - 0.5);
                ”v:”.post;
                v.postln;
                (v > 250).if({
                    (Main.elapsedTime > (t + 1)).if({
                        t = Main.elapsedTime;
                        m = m + 1;
                        m.postln;
                        [        
                        
                        //FUNC:::: duration, amp, rhythms, durs, imps, begs, pans, dev;
                        //duration = duration of the gesture, but may default to 10 seconds
                        //amp = amp
                        //rhythms = space between attacks in the gesture
                        //imps = how ofter the playbuff retriggers; low values = larger chunks o’ audio, inverse relationship means 0.1 = 10 seconds, 10 = .1 seconds
                        //begs = pickup spot
                        //pans = pan
                        //dev    = deviation or randomness on the location of the pickup spot    
                        //duration should be longer than rhytms for more than one note        
                            {func.value(30, 0.5, [1],[0.02],[0.1],[0, 1, -1],[2]).play},
                            {func.value(30, 0.5, [10],[0.4],[0.1],[0, 1, -1],[2]).play},
                        ].wrapAt(m).value;
                        })
                    });
                    
                
                0.001.wait;
            }
    };

    /*

    //Left Force
    c = fork{
            loop{
                var lor;
                f.iterate;
                w= f.analog[2].value;
                ”w:”.post;
                w.postln;
                lor = 100-w;
                ”lor: imp: “.post;
                lor.postln;
                syn3.imp_(lor);
                syn3.pan_(lor-80);
                syn3.imp_(lor+0.1);
                syn3.pan_(lor-90);
                0.001.wait;
            
            }
    };



    //Right Piezo
    g = fork{
            loop{
                var rop;
                f.iterate;
                x= f.analog[3].value;
                ”x:”.post;
                x.postln;
                rop = x-350/100;
                ”imp “.post;
                rop.postln;
                0.001.wait;
            }
    };
    */
    n = 0;
    //Right Flex
    h = fork{
        t = Main.elapsedTime;
            loop{
                var lox;
                f.iterate;
                y= f.analog[4].value;
                flex1 = y;
                controlflex2.set((flex1 / 1000) - 0.5);
                ”y:”.post;
                y.postln;
                (y > 350).if({
                    (Main.elapsedTime > (t + 1)).if({
                        t = Main.elapsedTime;
                        n = n + 1;
                        n.postln;
                        [                        
                            {pfunc.value(2, 0.5, [0.25],[0.03],[3],[1],[0, 1, -1],[2]).play},    
                            {ffunc.value(2, 0.5, [0.25],[0.03],[3],[4,5,6,7,8,9],[0, 1, -1],[2]).play},    
                            {ffunc.value(2, 0.5, [0.25],[1],[5],[4,5,6,7,8,9],[0, 1, -1],[2]).play},    
                            {ffunc.value(2, 0.5, [0.25],[3],[3],[4,5,6,7,8,9],[0, 1, -1],[2]).play}
                        ].wrapAt(m).value;

                        })
                    });
                    
                lox = 250-y;
                
                0.001.wait;
            }
    };

    //Right Force
    //Right Force has a yellow wire conencting to the breadboard in prototype layout
    k= fork{
            loop{
                var ror;
                f.iterate;
                z =0;
                z = f.analog[2].value;
                ”z:”.post;
                z.postln;
                ((z>350) and: {z<1000}).if({
                CmdPeriod.run;
                });
                
                0.001.wait;
            }
    };

      )
    //SEQUENTIAL CLOSE  (this is repeated at the top)
    //close the serial port
    (
    f.close;
    )

  8. functional draft

    Karst-031-secondforce by Meghatron

    This draft is functioning, i.e. exoskeleton activated 24” force sensors with correct behaviors.  Needs a lot of work on trigger control, but now that it’s all working I can dive into the compositional considerations.  I’m still using the previous work for formal considerations, but will try to rely on the inherent properties of this form as well.

    SuperCollider code below, there is still a ton of junk in there that needs to be jettisoned as I finalize the piece.

    //Karst version 31
    //code still not finalized but getting cleaned up
    //things to do:
    //add envelope with gate to decrease clipping
    //setup MOTU inputs for wall scraping with exoskeleton
    //more notes in the code to help with version tracking in the final 24 hours
    //add notes about site layout where pertinent
    //test different sensor behavior with exoskeleton -DONE
    //transition to normalized audio files - DONE
    //add stops to sensor behavior: CmdPeriod.run; and a-k.stop inside fork

    //SERVER
    (
    Server.default = s = Server.internal.boot;
    s.waitForBoot({
    });
    )

    //ARDUINO
    (
    SerialPort.listDevices;
    d = SerialPort.devices[2];
    f = SCPyduino.new(d);  //declares f an SCPyduino object
    )

    //KARST MAIN CODE BLOCK
    (
    //VARIABLES
    //synths
    var synth, synth2;
    //functions
    var func, pfunc, ffunc;
    //alpha &
    var omega = 1;
    //sample variables
    var transform, death, machine, noisefloor;
    //crap imma get rid of
    var syn1, syn2, syn3, syn4, syn5, syn6;
    var breath, chant;
    //more joshparametrical magic right here
    var flex1, flex2, controlflex1, controlflex2;

    controlflex1 = CtkControl.play;
    controlflex2 = CtkControl.play;

    //SAMPLES
    //Source = Rilke: Orpheus Sonnet pt2 10 “The machine threatens all we have gained, so long as it dare become the tyrant of spirit, rather than its servant.”
    machine = CtkBuffer.playbuf(“sounds/Karst_Machine.aif”).load;

    //Source = Rilke: Orpheus Sonnet pt2 11 “Many quietly acceptable methods of death have come to pass since onward conquering man first laid claim to the hunter’s arts;….”
    death = CtkBuffer.playbuf(“sounds/Karst_Death.aif”).load;

    //Source = Rilke: Orpheus Sonnet pt2 12 “Aspire to transform, O enraptured be by the fire wherein something elusive flames with brazen tidings of change;….”
    transform = CtkBuffer.playbuf(“sounds/Karst_Transform.aif”).load;

    //Source = Site Noisefloor, May 29, 2010
    noisefloor = CtkBuffer.playbuf(“sounds/Karst_Noisefloor.aif”).load;

    //testing samples
    breath = CtkBuffer.playbuf(“sounds/breath.aif”).load;
    chant = CtkBuffer.playbuf(“sounds/chant.aif”).load;

    CmdPeriod.doOnce({“I’m freeing the buffers!”.postln;
        machine.free;
        death.free;
        transform.free;
        noisefloor.free;
        breath.free;
        chant.free;
        });
       
    //SYNTHDEFS
    // trigger synth
    synth = CtkSynthDef(\synth, {arg imp, begin, out = 0, bufnum = 0, pan = 0, amp =0.5, deviation = 0, pch = 1;
        var trig, sig, sampstosecs, devAmt, outsig;
        trig = Impulse.ar(imp);
        sampstosecs = (SampleRate.ir * BufRateScale.kr(bufnum));
        devAmt = (deviation * LFNoise1.kr( imp) * sampstosecs);
        sig = PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum) * pch, trig, (begin * sampstosecs) + devAmt, 0);
        outsig = Pan2.ar(sig*amp, pan);
        Out.ar(out, [outsig[0], DelayN.ar(outsig[1], 0.002, 0.002)]);
    });

    //FUNCTIONS

    //FUNC :: for use with impulse triggers
    func = {arg duration, amp, rhythms, durs, imps, begs, pans, dev;
    var start, now, index, dur, imp, beg, rhy, pan1;
    Task({
        start = Main.elapsedTime;
        now = 0;
        index = 0;
        imp = imps;
        while({
        now < duration;
        }, {
        now = Main.elapsedTime - start;
        rhy = rhythms[index%rhythms.size];
        dur = durs[index%durs.size];
        imp = imps[index%imps.size];
        beg = begs[index%begs.size];
        pan1 =pans[index%pans.size];
        synth.new(0, 10).bufnum_(noisefloor.bufnum).imp_(4).begin_(beg).pan_(pan1).amp_(amp).deviation_(dev)
            .pch_(controlflex1).play;
        (rhy + dur).wait;
        index = index + 1;
        })
    }).play
    };

    //PFUNC :: make my func the pfunc
    pfunc = {arg duration, amp, rhythms, durs, imps, begs, pans, dev;
    var start, now, index, dur, imp, beg, rhy, pan1;
    Task({
        start = Main.elapsedTime;
        now = 0;
        index = 0;
        imp = imps;
        while({
        now < duration;
        }, {
        now = Main.elapsedTime - start;
        rhy = rhythms[index%rhythms.size];
        dur = durs[index%durs.size];
        imp = imps[index%imps.size];
        beg = begs[index%begs.size];
        pan1 =pans[index%pans.size];
        synth.new(0, 10).bufnum_(noisefloor.bufnum).imp_(4).begin_(beg).pan_(pan1).amp_(amp).deviation_(dev).play;
        (rhy + dur).wait;
        index = index + 1;
        })
    }).play
    };

    //FFUNC
    ffunc = {arg duration, amp, rhythms, durs, imps, begs, pans, dev;
    var start, now, index, dur, imp, beg, rhy, pan1;
    Task({
        start = Main.elapsedTime;
        now = 0;
        index = 0;
        imp = imps;
        while({
        now < duration;
        }, {
        now = Main.elapsedTime - start;
        rhy = rhythms[index%rhythms.size];
        dur = durs[index%durs.size];
        imp = imps[index%imps.size];
        beg = begs[index%begs.size];
        pan1 =pans[index%pans.size];
        synth.new(0, 10).bufnum_(machine.bufnum).imp_(4).begin_(beg).pan_(pan1).amp_(amp).deviation_(dev).play;
        (rhy + dur).wait;
        index = index + 1;
        })
    }).play
    };

    /*
    //synth instantiations :: aka crap imma get rid of
    syn1 = synth.new(0, nil).bufnum_(noisefloor.bufnum).imp_(4).begin_(0).pan_(1).amp_(4).deviation_(2).play;
    syn2 = synth.new(0, nil).bufnum_(noisefloor.bufnum).imp_(4).begin_(110).pan_(-1).amp_(4).deviation_(2).play;
    syn3 = synth.new(0, nil).bufnum_(noisefloor.bufnum).imp_(4).begin_(220).pan_(-1).amp_(4).deviation_(2).play;
    syn4 = synth.new(0, nil).bufnum_(noisefloor.bufnum).imp_(4).begin_(330).pan_(-1).amp_(4).deviation_(2).play;
    syn5 = synth.new(0, nil).bufnum_(noisefloor.bufnum).imp_(4).begin_(440).pan_(-1).amp_(4).deviation_(2).play;
    syn6 = synth.new(0, nil).bufnum_(noisefloor.bufnum).imp_(4).begin_(550).pan_(-1).amp_(4).deviation_(2).play;
    */

    //ARDUINO

    //Arduino: Sensors
    //Left Piezo     “a” “u” lop
    f.analog[0].active_(1);
    //Left Flex     “b” “v” lox
    f.analog[1].active_(1);
    //Left Force     “c” “w” lor
    f.analog[2].active_(1);

    //Right Piezo “g” “x” rop
    f.analog[3].active_(1);
    //Right Flex     “h” “y” rox
    f.analog[4].active_(1);
    //Right Force “k” “z” ror
    f.analog[5].active_(1);


    //j = CtkSynthDef(\grain, {arg freq, dur;
    //    Out.ar(0, SinOsc.ar(freq, 0, 0.1) * EnvGen.kr(Env([0, 1, 0], [0.5, 0.5], \sin), timeScale: dur, doneAction: 2))
    //    });


    j = synth2 = CtkSynthDef(\synth2, {arg freq, dur, imp, begin, out = 0, bufnum = 0, pan = 0, amp =0.5, deviation = 0;
        var trig, sig, sampstosecs, devAmt, outsig;
        trig = Impulse.ar(imp);
        sampstosecs = (SampleRate.ir * BufRateScale.kr(bufnum));
        devAmt = (deviation * LFNoise1.kr( imp) * sampstosecs);
        sig = PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum), trig, (begin * sampstosecs) + devAmt, 0);
        outsig = Pan2.ar(sig*amp, pan);
        Out.ar(out, [outsig[0], DelayN.ar(outsig[1], 0.002, 0.002)]);
    });

    l = CtkSynthDef(\sawgrain, {arg freq, dur;
        Out.ar(0, LFSaw.ar(freq, 0.05) * EnvGen.kr(Env([0, 1, 0], [0.5, 0.5], \sin), timeScale: dur, doneAction: 2))
        });
       
    k = {arg noteObj;
        Task({
            20.do({
                noteObj.new.freq_(1000 -  v).dur_(2.5).play;
                0.05.wait;
                })
            }).play;
        };
       
    /*   
    //Left Piezo
    a = fork{
            loop{
                var lop;
                f.iterate;
                u= f.analog[0].value;
                “u:”.post;
                u.postln;
                lop = (1000-u)/100;
                “lop: imp: “.post;
                lop.postln;
                syn1.imp_(lop);
                0.001.wait;
            }
    };   
    */   
       
       
    m = 0;
    //Left Flex
    //3030: this is working, starts inactive, is trigger at first bend and cycles through noisefloor functions, the first of which is pitch affected by sensor value
    b = fork{
        t = Main.elapsedTime;
            loop{
                var lox;
                f.iterate;
                v= f.analog[1].value;
                flex1 = v;
                //controlflex1.set((flex1 / 500) - 0.5);
                controlflex1.set((flex1 / 250) - 0.5);
                “v:”.post;
                v.postln;
                (v < 250).if({
                    (Main.elapsedTime > (t + 1)).if({
                        t = Main.elapsedTime;
                        m = m + 1;
                        m.postln;
                        [                       
                            {func.value(0.5, 0.5, [0.25],[3],[3],[4],[0, 1, -1],[2]).play},
                            {pfunc.value(2, 0.5, [0.25],[3],[3],[4,5,6,7,8,9],[0, 1, -1],[2]).play},
                            //{ffunc.value(2, 0.5, [0.25],[3],[3],[4,5,6,7,8,9],[0, 1, -1],[2]).play},
                            //{pfunc.value(0.1, 0.5, [0.25],[3],[3],[4,5,6,7,8,9],[0, 1, -1],[2]).play}
                        ].wrapAt(m).value;
    //
    //
    //                    (m.odd).if({
    //                        func.value(0.5, 0.5, [0.25],[3],[3],[4],[0, 1, -1],[2]).play;
    //                        }, {
    //                        pfunc.value(2, 0.5, [0.25],[3],[3],[4,5,6,7,8,9],[0, 1, -1],[2]).play;
    //                        },
    //                        {
    //                        pfunc.value(0.1, 0.5, [0.25],[3],[3],[4,5,6,7,8,9],[0, 1, -1],[2]).play;
    //                        });
    //
    //                    Task({
    //                        20.do({
    //                            noteObj.new.freq_(1000 -  v).dur_(2.5).play;
    //                            0.05.wait;
    //                            })
    //                        }).play;
                        })
                    });
                   
                lox = 250-v;
    //            “lox: imp: “.post;
    //            lox.postln;
                //syn2.imp_(lox);
    //            if((v == 40) ,{arg inc = 0;
    //            inc = inc+1;
    //            func.value(0, 15, 0.5, [0.25],[3],[30],[4,5,6,7,8,9],[0, 1, -1],[4]).play;
    //                        },{
    //           
    //            }           
    //            );           
                0.001.wait;
            }
    };



    /*


    //Left Force
    c = fork{
            loop{
                var lor;
                f.iterate;
                w= f.analog[2].value;
                “w:”.post;
                w.postln;
                lor = 100-w;
                “lor: imp: “.post;
                lor.postln;
                syn3.imp_(lor);
                syn3.pan_(lor-80);
                syn3.imp_(lor+0.1);
                syn3.pan_(lor-90);
                0.001.wait;
           
            }
    };



    //Right Piezo
    //Right Piezo has a yellow wire conencting to the breadboard in prototype layout
    g = fork{
            loop{
                var rop;
                f.iterate;
                x= f.analog[3].value;
                “x:”.post;
                x.postln;
                rop = x-350/100;
                “imp “.post;
                rop.postln;
                syn4.imp_(rop);
                0.001.wait;
            }
    };
    */
    n = 0;
    //Right Flex
    h = fork{
        t = Main.elapsedTime;
            loop{
                var lox;
                f.iterate;
                y= f.analog[4].value;
                flex1 = y;
                controlflex2.set((flex1 / 1000) - 0.5);
                “y:”.post;
                y.postln;
                (y < 300).if({
                    (Main.elapsedTime > (t + 1)).if({
                        t = Main.elapsedTime;
                        n = n + 1;
                        n.postln;
                        [                       
                            {pfunc.value(0.5, 0.5, [0.25],[3],[3],[4],[0, 1, -1],[2]).play},   
                            {ffunc.value(2, 0.5, [0.25],[3],[3],[4,5,6,7,8,9],[0, 1, -1],[2]).play},   
                            {pfunc.value(0.5, 0.5, [0.25],[30],[3],[4],[0, 1, -1],[2]).play},   
                            {ffunc.value(2, 0.5, [0.25],[1],[5],[4,5,6,7,8,9],[0, 1, -1],[2]).play},   
                            {pfunc.value(0.5, 0.5, [0.25],[5],[1],[4],[0, 1, -1],[2]).play},   
                            {ffunc.value(2, 0.5, [0.25],[3],[3],[4,5,6,7,8,9],[0, 1, -1],[2]).play}
                        ].wrapAt(m).value;

                        })
                    });
                   
                lox = 250-y;
               
                0.001.wait;
            }
    };
    /*
    //Right Force
    k= fork{
            loop{
                var ror;
                f.iterate;
                z = f.analog[5].value;
                “z:”.post;
                z.postln;
                ror = 100-z;
                syn6.begin_(ror);
                “beg:”.post;
                ror.postln;
                0.001.wait;
            }
    };
    */
      )
    //cease reading values
    (
    a.stop;
    b.stop;
    c.stop;
    g.stop;
    h.stop;
    k.stop;
    )
    //close the serial port
    (
    f.close;
    )

  9. six sensor supercollider (by meghatron)
Two breadboard set up with the two sets of sensors: piezo, flex and force, one for each side of the tunnel.

    six sensor supercollider (by meghatron)

    Two breadboard set up with the two sets of sensors: piezo, flex and force, one for each side of the tunnel.

  10. Six Sensor SuperCollider code

    //This prototype code modifies six audio samples with six analog sensors.  No compositional considerations here.

    //SERVER
    (
    Server.default = s = Server.internal.boot;
    s.waitForBoot({
    //s.scope;
    //FreqScope.new(400, 200, 0);
    });
    )

    (
    SerialPort.listDevices;
    d = SerialPort.devices[2];
    f = SCPyduino.new(d);  //declares f an SCPyduino object
    )


    (
    //VARIABLES + SCORE
    var score;
    //synths
    var synth;
    //samples
    var ril11, breath;
    //functions
    var func;
    var syn1, syn2, syn3, syn4, syn5, syn6;


    //score
    score = CtkScore.new;

    //SAMPLE
    //Source = Rilke: Orpheus Sonnet pt2 11 “Many quietly acceptable methods of death have come to pass…”
    ril11 = CtkBuffer.playbuf(“sounds/kar01.aif”);
    score.add(ril11);

    breath = CtkBuffer.playbuf(“sounds/kar01.aif”).load;
    score.add(breath);

    //SYNTHDEF
    // trigger synth
    synth = CtkSynthDef(\help_PlayBuf, {arg imp, begin, out = 0, bufnum = 0, pan = 0, amp =0.5, deviation = 0;
        var trig, sig, sampstosecs, devAmt, outsig;
        trig = Impulse.ar(imp);
        sampstosecs = (SampleRate.ir * BufRateScale.kr(bufnum));
        devAmt = (deviation * LFNoise1.kr( imp) * sampstosecs);
        sig = PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum), trig, (begin * sampstosecs) + devAmt, 0);
        outsig = Pan2.ar(sig*amp, pan);
        Out.ar(out, [outsig[0], DelayN.ar(outsig[1], 0.002, 0.002)]);
    });



    //FUNCTIONS
    //function for use with impulse triggers
    func = {arg starttime, duration, amp, rhythms, durs, imps, begs, pans, dev;
    var now, index, dur, imp, beg, rhy, pan1;
    now = 0;
    index = 0;
    imp = imps;
    while({
    now < duration;
    }, {
    rhy = rhythms[index%rhythms.size];
    dur = durs[index%durs.size];
    imp = imps[index%imps.size];
    beg = begs[index%begs.size];
    pan1 =pans[index%pans.size];
    score.add(synth.new(now+starttime, dur).bufnum_(ril11.bufnum).imp_(imp).begin_(beg).pan_(pan1).amp_(amp).deviation_(dev));
    now = now + rhy + dur;
    index = index + 1;
    })};


    //FUNC::::starttime, duration, amp, rhythms, durs, imps, begs, pans, dev;

    //synth instantiations
    syn1 = synth.new(0, nil).bufnum_(breath.bufnum).imp_(4).begin_(0).pan_(1).amp_(4).deviation_(2).play;
    syn2 = synth.new(0, nil).bufnum_(breath.bufnum).imp_(4).begin_(110).pan_(-1).amp_(4).deviation_(2).play;
    syn3 = synth.new(0, nil).bufnum_(breath.bufnum).imp_(4).begin_(220).pan_(-1).amp_(4).deviation_(2).play;
    syn4 = synth.new(0, nil).bufnum_(breath.bufnum).imp_(4).begin_(330).pan_(-1).amp_(4).deviation_(2).play;
    syn5 = synth.new(0, nil).bufnum_(breath.bufnum).imp_(4).begin_(440).pan_(-1).amp_(4).deviation_(2).play;
    syn6 = synth.new(0, nil).bufnum_(breath.bufnum).imp_(4).begin_(550).pan_(-1).amp_(4).deviation_(2).play;


    //Arduino: Sensors
    //Left Piezo     “a” “u” lop
    f.analog[0].active_(1);
    //Left Flex     “b” “v” lox
    f.analog[1].active_(1);
    //Left Force     “c” “w” lor
    f.analog[2].active_(1);

    //Right Piezo “g” “x” rop
    f.analog[3].active_(1);
    //Right Flex     “h” “y” rox
    f.analog[4].active_(1);
    //Right Force “k” “z” ror
    f.analog[5].active_(1);


    //Left Piezo
    a = fork{
            loop{
                var lop;
                f.iterate;
                u= f.analog[0].value;
                “u:”.post;
                u.postln;
                lop = (1000-u)/100;
                “lop: imp: “.post;
                lop.postln;
                syn1.imp_(lop);
                0.001.wait;
            }
    };

    //Left Flex
    b = fork{
            loop{
                var lox;
                f.iterate;
                v= f.analog[1].value;
                “v:”.post;
                v.postln;
                lox = 250-u;
                “lox: imp: “.post;
                lox.postln;
                syn2.imp_(lox);
                0.001.wait;
            }
    };

    //Left Force
    c = fork{
            loop{
                var lor;
                f.iterate;
                w= f.analog[2].value;
                “w:”.post;
                w.postln;
                lor = 100-w;
                “lor: imp: “.post;
                lor.postln;
                syn3.imp_(lor);
                syn3.pan_(lor-80);
                syn3.imp_(lor+0.1);
                syn3.pan_(lor-90);
                0.001.wait;
           
            }
    };



    //Right Piezo
    g = fork{
            loop{
                var rop;
                f.iterate;
                x= f.analog[3].value;
                “x:”.post;
                x.postln;
                rop = x-350/100;
                “imp “.post;
                rop.postln;
                syn4.imp_(rop);
                0.001.wait;
            }
    };


    //Right Flex
    h = fork{
            loop{
                var rox;
                f.iterate;
                y = f.analog[4].value;
                “y:”.post;
                y.postln;
                rox = y;
                syn5.pan_(rox);
                “pan:”.post;
                rox.postln;
                0.001.wait;
           
            }
    };

    //Right Force
    k= fork{
            loop{
                var ror;
                f.iterate;
                z = f.analog[5].value;
                “z:”.post;
                z.postln;
                ror = 100-z;
                syn6.begin_(ror);
                “beg:”.post;
                ror.postln;
                0.001.wait;
            }
    };




      )
    //cease reading values
    (
    a.stop;
    b.stop;
    c.stop;
    g.stop;
    e.stop;
    f.stop;
    )
    //close the serial port
    (
    f.close;
    )