«first  …15 16 17 18 19 20 21 last»

swiki

2010-01-28 23:32 supercollider

Just a listing of some of the SuperCollider code I've published on the swiki. Much is old but still fully functional and hopefully useful.

swiki.hfbk-hamburg.de:8888/MusicTechnology/743 - 3D extensions for the Pen class. Vector and matrix multiplication.

swiki.hfbk-hamburg.de:8888/MusicTechnology/760 - 1D cellular automata pattern.

swiki.hfbk-hamburg.de:8888/MusicTechnology/818 - Live coding practice sessions.

swiki.hfbk-hamburg.de:8888/MusicTechnology/854 - More live coding practice sessions.

swiki.hfbk-hamburg.de:8888/MusicTechnology/763 - Tempo clock synchronisation and beat matching.

swiki.hfbk-hamburg.de:8888/MusicTechnology/833 - Some drawings.

swiki.hfbk-hamburg.de:8888/MusicTechnology/901 - Examples ported from NodeBox.

swiki.hfbk-hamburg.de:8888/MusicTechnology/902 - Examples ported from Processing.

swiki.hfbk-hamburg.de:8888/MusicTechnology/726 - Quicklauncher folder GUI.

swiki.hfbk-hamburg.de:8888/MusicTechnology/810 - Hacked server windows.

swiki.hfbk-hamburg.de:8888/MusicTechnology/870 - A silly drum machine.

swiki.hfbk-hamburg.de:8888/MusicTechnology/869 - Port of particle chamber by Derek Holzer.

swiki.hfbk-hamburg.de:8888/MusicTechnology/906 - Examples ported from form+code.


klipp av Logo

2009-12-28 19:09 supercollider

Some SuperCollider code to generate old school klipp av logos.

klipp av generated logo nystan 0

Click the window in the SuperCollider code to generate new pictures.


//redFrik
(
    var width= 800, height= 600;
    var win, usr, p0, p1, l= 50, w= 10, h= 15, c= 0.9, o= 0.1;
    win= Window("nystan", Rect(128, 64, width, height), false);
    usr= UserView(win, Rect(0, 0, width, height));
    usr.mouseDownAction= {usr.refresh};
    usr.background= Color.new255(51, 47, 57);
    win.front;
    usr.drawFunc= {
        Pen.translate(width*0.5, height*0.5);
        5.rrand(20).do{
            var p, pp1, len;
            Pen.rotate(pi.linrand);
            p0= Point(0, 0);
            p1= Point(0, h.rand*10.linrand);
            pp1= p1;
            (20.linrand).do{|i|
                len= l+l.rand2;
                Pen.color= Color(c, c, c.rrand(1.0), (1-c).rrand(1.0));
                Pen.moveTo(p0);
                Pen.lineTo(p1);
                if(o.coin, {
                    p= 200.rand;
                    p0= p0+p;
                    p1= p1+p;
                }, {
                    p0= p0+Point(len+w.rand2, h.rand);
                    p1= p1+Point(len+w.rand2, h.rand);
                });
                Pen.lineTo(p1);
                Pen.lineTo(p0);
                Pen.draw(0);
            };
            Pen.moveTo(p0);
            Pen.lineTo(p1);
            Pen.lineTo(pp1);
            Pen.lineTo(Point(0, 0));
            Pen.draw(5.rand);
        };
    };
    CmdPeriod.doOnce({if(win.isClosed.not, {win.close})});
)

klipp av generated logo nystan 1


Sunday Drawings

2009-11-27 15:52 supercollider

2006 I fiddled with some simple drawing routines in SuperCollider. (swiki.hfbk-hamburg.de:8888/MusicTechnology/833). Now I've added matching (?) sound synthesis and some slight modifications to the drawing code. There are 7 parameters that are used to both generate the picture and the sound. Normally the parameters are randomised but it is possible to copy&paste a good sounding/looking set of parameters into the code to get the same drawing back.

Below is the new code + embedded vimeos.

//redFrik
(
s.latency= 0.05;
s.waitForBoot{
    var width= 640, height= 480, w, u, drawFunc, clearFunc;
    var fadeAtk= 1400, fadeSus= 700, fadeRel= 350;
    var a, b, c, d, e, f, g, i= 0, theta= 0;
    var syn= SynthDef(\sunday, {|amp= 0, a= 1, b= 1, c= 1, d= 1, e= 1, f= 1, g= 1|
        var z0= Mix(BPF.ar(LFSaw.ar([a, b]), a+b, e, amp));
        var z1= SinOsc.ar(a, Ringz.ar(z0, c.abs, f, 2pi), amp);
        var z2= SinOsc.ar(b, Ringz.ar(z0, d.abs, g, 2pi), amp);
        Out.ar(0, Pan2.ar(z0, 0, 0.3)+Pan2.ar(z1, -0.3, 0.3)+Pan2.ar(z2, 0.3, 0.3));
    }).play(s);
    s.sync;
    w= Window("sunday drawings2", Rect(128, 64, width, height), false);
    drawFunc= {
        var x, y;
        if(i==0, {
            "//---------------------".postln;
            [
                \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \g, g
            ].pairsDo{|m, n| (""++m++"="+n++";").postln};
        });
        if(i<fadeAtk, {
            theta= theta+(d*e*f);
            x= sin(theta*a%a/b*c*2pi);
            y= sin(theta*b%b/a*d*2pi);
            Pen.strokeColor= Color.grey(1, 0.5);
            Pen.translate(width*0.5, height*0.5);
            Pen.scale(f, g);
            Pen.rotate(theta);
            switch(a%3,
                0, {Pen.strokeOval(Rect.aboutPoint(Point(x*100, y*100), a, b))},
                1, {Pen.strokeRect(Rect.aboutPoint(Point(x*100, y*100), a, b))},
                2, {Pen.line(Point(x*100, y*100), Point(a*c*100, b*d*100)); Pen.stroke}
            );
            syn.set(\amp, i/fadeAtk, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \g, g);
        });
        if(i>(fadeAtk+fadeSus), {
            clearFunc.value;
            theta= 0;
            Pen.fillColor= Color.grey(0, 5/fadeRel);
            Pen.fillRect(Rect(0, 0, width, height));
            syn.set(\amp, i.linexp(fadeAtk+fadeSus, fadeAtk+fadeSus+fadeRel, 1, 0.0001));
        });
        if(i==(fadeAtk+fadeSus+fadeRel), {
            i= 0;
        }, {
            i= i+1;
        });
    };
    clearFunc= {
        
        //--replace with preset from here
        a= 200.rand+1;
        b= 200.rand+1;
        c= 3.0.rand2;
        d= 3.0.rand2;
        e= 3.0.rand;
        f= 0.1.rrand(1.5)*#[1, -1].choose;
        g= 0.1.rrand(1.5)*#[1, -1].choose;
        //--to here
        
    };
    clearFunc.value;
    u= UserView(w, Rect(0, 0, width, height))
        .clearOnRefresh_(false)
        .drawFunc_(drawFunc)
        .background_(Color.black);
    w.front;
    u.animate= true;
    CmdPeriod.doOnce({if(w.isClosed.not, {w.close})});
    w.onClose= {syn.free};
};
)

iPod Touch Microphone

2009-10-23 11:49 electronics

I bought the klinkenstecker 3.5mm 4pol for €2,40 from Segor. The capsule microphone I had laying around. Sorry, no data or idea where I got it. The whole thing is very simple to build and the sound is totally all right. Now I can record into the iPod Touch and run apps like RjDj and SuperCollider with audio input.

ipod mic schematics

ipod mic photo 0 ipod mic photo 1


sc140 - the scTweets Album

2009-10-21 14:51 supercollider

I'm proud to have contributed with one short track on the just-released CC BY-NC-SA 3 licensed album sc140. Download/listen: supercollider.github.io/community/sc140.html. It is compiled by Dan Stowell in conjunction with The Wire magazine and consists of 22 tracks with corresponding SuperCollider source code. The thing with this project is that all the tracks are written to fit within the Twitter limitation of 140 characters. Read the source code at: www.archive.org/download/sc140/sc140_sourcecode.txt

Reference: 140 character examples on the swiki.

thewire.co.uk/articles/3177/


EL-wire

2009-10-02 20:28 electronics

For our recent installation at ISCM World New Music Days in Växjö (www.musicalfieldsforever.com/interactive-art/searching-voices/), I built a circuit for controlling 9x5m el-wire (electroluminescence). There are 9 channels in total and 3 inverters that are powering three 5meter cables each. TIC201d TRIACs are used for switching the 110V AC on/off, 9 led+LDR pairs (aka Vactrol) generates the control voltage for the TRIACs and wireless control for the whole thing is obtained with an ATmega8 and a pair of Nordic transceivers. SuperCollider is generating control data.

Attachments:
el-wire_9ch_triacs.png
el-wire_9ch_triacs.sch

Intel vs PPC

2009-08-11 04:10 supercollider

Something I knew all along but tried to ignore: Many of my noisier synths sound like crap on modern (Intel) macintoshes and some even go all silent. The code below deliberately blows up a resonant hi-pass filter and is typical for how different the same code can sound on my Intel vs my PPC mac. Listen to the attached MP3 files. In a few years, all the PPC computers will be gone and we can't recreate the sounds.

//punk (loud!)
{RHPF.ar(GbmanN.ar([2300,1150]),LFSaw.ar(Pulse.ar(4,[1,2]/8,1,LFPulse.ar(1/8)/5+1))+2)}.play

update 090811: Thanks to Batuhan Bozkurt for putting me straight. It's not an Intel vs PPC issue but rather Apple changed something in their internal soundcards. Using a newer (Intel) machine and an external soundcard (Fireface 400), the punk code sounds the same as the PPC version below (i.e good/better in my ears - no autocompression).

So the internal soundcard in my old PowerBook (1GHz, PPC) is robust, filters hardly ever blow up and it doesn't have that automatic compressor/limiter as my newer MacBook Pro (2.16GHz Duo, Intel) internal soundcard.

update 180101: With GlitchRHPF from sc3-plugins and some clipping one can get the original sound back...

{GlitchRHPF.ar(GbmanN.ar([2300,1150]),LFSaw.ar(Pulse.ar(4,[1,2]/8,1,LFPulse.ar(1/8)/5+1))+2).clip(-1,1)}.play
Attachments:
punk_intel.mp3
punk_ppc.mp3

KretsloppKontroll

2009-07-31 13:14 electronics

More custom electronics. A wireless system for our flute/video duo kretslopp (together with flautist Anna Svensdotter).

3 knobs and 3 buttons on the right-hand arm, 1 accelerometer (3D) on the left-hand arm.

Anna made the leather bracelets.

Attached are schematics, AVR firmware and a MaxMSP patch for testing.

Wireless transmitter and USB receiver...

kretsloppKontroll photo 0 kretsloppKontroll photo 1

Overview. Controllers, receiver, transmitter and 'bracelet'.

kretsloppKontroll photo 2 kretsloppKontroll photo 3

Updates:

  • 090823: also attached SuperCollider classes (req. conductor quark)
Attachments:
KretsloppKontroll-supercollider.zip
kretsloppKontroll.zip

«first  …15 16 17 18 19 20 21 last»