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


2009-07-30 23:00 electronics

A cheap little circuit that reads 10 analogue controllers (8 knobs and 1 joystick). I built it for my neighbour Jens' portable keyboard project. It's using an ATmega88 and a 4051 multiplexer to get 10 analogue-to-digital converters. A standard MAX232 with some caps lets the ATmega88 talk to the serial port of the computer.
Attached is schematics, AVR firmware and a MaxMSP patch for testing.

jensKeyboard photo 0 jensKeyboard photo 1

jensKeyboard schematics



2009-07-27 18:52 livecoding, supercollider

Live coding via SMS anyone? An expensive and annoyingly hard hobby for sure.

But the RedPDU SuperCollider class makes this possible in any case. It can decode mobile phone text messages in the PDU format. And with a serial connection to your phone (Bluetooth or cable), it is easy to directly download incoming SMS from your phone into SuperCollider and interpret them. No additional hardware required.

The class is available here: /code/sc/#classes and there is also an mxj Java version for MaxMSP called f0.pdu here: /code/max#java.

And here's a short demo video where I send a short message to myself...

The code I texted in this video was...

Pbind('degree', Pn(Pseries(0, 2, 5), 4), 'dur', 0.1, 'amp', 0.5).play

And the SuperCollider receiver function is in the help file. But note: on many phones it is impossible to type characters like {} [] \ | etc. You might want to add some find&replace functionality and use <> meaning curly brackets etc.

Note: I believe SMS PDU isn't in use much any more so this will only work with old (mid-2000) phones.

Sort of Unicode Support for SC

2009-05-27 21:51 supercollider

This is a big ugly hack and gives far from complete support for these special characters. But still, it is useful in some situations like for buttons or comment boxes in your GUI.

w= Window(Umlaut.fix("åäö test"), Rect(100, 200, 150, 150));
Button(w, Rect(10, 20, 130, 40)).states_([[Umlaut.fixAll("schööön")]]);
Button(w, Rect(10, 70, 130, 40)).states_([[Umlaut.fixAll("Tätigkeit heiß")]]);

Umlaut_sc screenshot

all supported characters... (more can be added on request)


update: there is also asciiCorrect in the wslib quark by Wouter Snoei

note: broken in SC 3.9 under OSX


redUniverse: MRCM and IFS

2009-05-23 01:28 supercollider

Two new classes now in my redUniverse quark. Both use affine transformations to draw fractal-like structures. RedMRCM is a multiple reduction copy machine and RedIFS a standard iterated function system.

RedMRCM screenshot RedIFS screenshot 0 RedIFS screenshot 1

redUniverse: L-System and Turtle

2009-05-11 13:22 supercollider

Now added RedLSystem and RedLTurtle to my redUniverse quark. RedLSystem is a fairly standard string rewrite class. One special feature is that it saves the structure/tree/recursion depth of the rewrite process. RedLTurtle either plot L-systems or standard strings. It comes with a set of default drawing functions, but you can easily add your own commands.

l= RedLSystem("F", ($F: "F[+F--F]+F"));
RedLTurtle(l, 40, 10, 0.9, 0.1).makeWindow;

RedLTurtle screenshot 2

l= RedLSystem("F", ($F: "|[-FFF--F]+F"));
RedLTurtle(l, 20, 20, 0.95, 0.2).makeWindow;

RedLTurtle screenshot 3

l= RedLSystem("F", ($F: "|[--F][+F]-F"));
RedLTurtle(l, 400, 20, 0.65, 0.1).makeWindow(initTranslate: Point(0.5, 0));

RedLTurtle screenshot 0

l= RedLSystem("F-F-F-F", ($F: "F[F]-F+F[--F]+F-F"));
RedLTurtle(l, 6, 90, 0.9).makeWindow(initTranslate: Point(1, 0));

RedLTurtle screenshot 1


2009-04-06 15:48 electronics, supercollider

A custom wireless system built for Craftwife. The LEDs are to be sewn into real ties. There are 6 red LEDs per receiver and each led can be dynamically controlled (PWM 0-255). All receivers run on battery (AA 3.6V lithium) and keep in contact with the transmitter using 2.4GHz wireless transceivers (Nordic nRF24L01+). The maximum working distance is about ~80m (line of sight).

The transmitter talks to SuperCollider via the RedTieMaster and RedTieSlave classes (USB-Serial 115200 baud).

Schematics, firmware, partlist and SuperCollider classes attached below (GNU GPL v2)

redTie transmitter and receivers...

redTie circuits photo1redTie circuits photo2redTie circuits photo3redTie circuits photo4redTie circuits photo5redTie circuits photo6redTie circuits photo7redTie circuits photo8

Leds on ribbon cable...

redTie LEDs photo1redTie LEDs photo2redTie LEDs photo3redTie LEDs photo4

Total cable length: 135cm, distance between LEDs: 4cm


Pact - April

2009-04-01 23:24 livecoding, supercollider

April 2009, 30 days, 1hour/day. Do something and show the result to your contracting party. Similar to our previous live-coding practising sessions (Aug 2006 and Jun 2007). This time I battle Marcus Fjellström. Follow his daily work here.

My rules are: on the last day of March, code a single SynthDef in SuperCollider that I'll force myself to make music with all throughout the month. I'm not allowed to use any other SynthDefs! If I need to change the synth definition during the 30 days, all the music written up to that point will be affected. These constraints are both quite strict and quite silly I know, but I imagine it'll help me focus my 1hour work on controlling the synth instead of rewriting the synthesis part all the time (bad habit). Of course, it is not the optimal way to make music in SuperCollider. Normally one would opt for smaller SynthDefs that do less and are interconnect via busses. See that as a warning and don't copy my SynthDef below. It's a big ugly beast.

So here's first the SynthDef. Coded on March 31st...

//this is the SynthDef that I must use for all 30 days
SynthDef(\redMond, {
    arg out= 0, pan= 0, det= 0,
    atk= 0.01, rel= 0.1, cur= -4, gate= 1,
    amp= 1, freq= 440, sel= 0, selFreq= 40,
    amp2= 0, freq2= 40, sel2= 0, selFreq2= 40,
    amp3= 0, freq3= 40, sel3= 0, selFreq3= 40,
    ringMix= -1, ringFreq= 440, ringGain= 0, ringRate= 1,
    distMix= -1, distFreq= 0.4, distDeep= 1,
    combMix= -1, combFreq= 40, combDecy= 1,
    moogMix= -1, moogFreq= 440, moogGain= 1,
    verbMix= -1, verbRoom= 0.4, verbDamp= 0.4;
    var iii, aaa, bbb, ccc, zzz,
    ii, aa, bb, cc, zz,
    i, a, b, c, z,
    det= det+1;  //detune.  1= no detune
    iii= SelectX.ar(sel3, [
        SinOsc.ar(selFreq3, 0, 1.5, 1.5),
        LFSaw.ar(selFreq3, 0, 1.5, 1.5),
        LFPulse.ar(selFreq3, 0, 0.3, 1.5, 1.5)
    aaa= SinOsc.ar(freq3, 0, amp3);
    bbb= LFSaw.ar(freq3*det, 0, amp3);
    ccc= LFPulse.ar(freq3*det*det, 0, 0.3, amp3);
    zzz= Select.ar(iii, [aaa, bbb, ccc]);
    ii= SelectX.ar(sel2, [
        SinOsc.ar(selFreq2, 0, 1.5, 1.5),
        LFSaw.ar(selFreq2, 0, 1.5, 1.5),
        LFPulse.ar(selFreq2, 0, 0.4, 1.5, 1.5)
    aa= SinOsc.ar(freq2+zzz, 0, amp2);
    bb= LFSaw.ar(freq2+zzz*det, 0, amp2);
    cc= LFPulse.ar(freq2+zzz*det*det, 0, 0.4, amp2);
    zz= Select.ar(ii, [aa, bb, cc]);
    i= SelectX.ar(sel, [
        SinOsc.ar(selFreq, 0, 1.5, 1.5),
        LFSaw.ar(selFreq, 0, 1.5, 1.5),
        LFPulse.ar(selFreq, 0, 0.5, 1.5, 1.5)
    a= SinOsc.ar(freq+zz);
    b= Saw.ar(freq+zz);
    c= Pulse.ar(freq+zz);
    z= Select.ar(i, [a, b, c]);
    z= XFade2.ar(z, SinOsc.ar(ringFreq+SinOsc.ar(ringRate, 0, ringGain), 0, z), ringMix);
    z= XFade2.ar(z, SinOsc.ar(distFreq, z*(1+(distDeep*(8pi-1))))*0.5, distMix);
    z= XFade2.ar(z, CombN.ar(z, 1, combFreq.reciprocal, combDecy), combMix);
    z= XFade2.ar(z, MoogFF.ar(z, moogFreq, moogGain), moogMix);
    z= FreeVerb.ar(z, verbMix*0.5+0.5, verbRoom, verbDamp);
    e= EnvGen.ar(Env.asr(atk, 1, rel, cur), gate, doneAction:2);
    Out.ar(out, Pan2.ar(z, pan, e*amp));

And here follows short MP3 excerpts. Note: all the 30 files + SynthDef can also be found the 'pact-apr09.zip' attached below.


  • 171231: converted all files from .rtf to .scd and attached as a .zip


2009-03-26 13:49 electronics

This is my all-round receiver for wireless controllers like redUniform and redThermoKontroll. It's a rebuild of my previous redUniform-master. I generalised it, added some buttons, switches and LEDs and put it into a proper box. I also removed the on-chip ceramic antenna on the Mirf transceiver and replaced it with a socket + a 4inch duck antenna. Now the range of the system is much greater.

The buttons I will use either as additional controllers or as backup controllers if a transmitter fails during the performance. The 4 LEDs are independently controlled and I imagine using them for visual feedback. Usually, I perform with the laptop hidden in the back and the laptop screen turned off. The LEDs will help to discretely show the status of the piece (form, section, sensor activity etc).

Version3 firmware attached below.

redWirelessMaster photo 1 redWirelessMaster photo 2 redWirelessMaster photo 3 redWirelessMaster photo 4 redWirelessMaster photo 5 redWirelessMaster photo 6 redWirelessMaster photo 7 redWirelessMaster photo 8

redWirelessMaster schematics


  • 100721: rewrote the firmware and changed a few things. Also renamed the project. It was previously called redUniform2-master
  • 100724: added SuperCollider classes to the zip archive

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