Data Transfer through Sound

2009-SoundCommunication.jpgToday, I stumbled across this article that investigates into using sound as a transfer medium for digital information.

Though this is actually a very old and commonly used method for transferring files back in the 90s (we did this via tty telephone modems), it is kind-of pleasing to see this idea popping up again, and triggered some thoughts about it’s usefulness in cooperative livecoding situations.  

Yes, it would be really fun not have to setup wireless LAN that invisibly and–for the audience–almost magically transfer information from one laptop to another, and, instead, having some sort of musical/non-aweful sound that transmit additional information from one laptop to another.

I wonder if anyone ever thought of this in the SuperCollider / LiveCoding community, but I think it’s worth!

Kuler and sclang

This patch extracts color values from the kuler api via a themeID and converts them to Color objects.

It requires 
- the XML quark by Jens Gulden (wow! thanx) for parsing the xml stuff and
- the wslib quark by wouter snoei (wow, too!) for Meta_Color:newHex
- a valid kuler dev-key (see http://kuler.adobe.com/api/ for details)


// Process Kuler rss feed for Color extraction

(
~getFeed = {
arg
fileName,
kulerKey, // insert your kuler key
themeID(347630); // ID of a kuler theme

"curl \"http://kuler-api.adobe.com/rss/search.cfm?itemsPerPage=20&startIndex=0&searchQuery=themeID:%&key=%\" > /tmp/%"
.format(themeID, kulerKey, fileName).unixCmd;
};
~xml2color = {|fileName|
DOMDocument("/tmp/%".format(fileName))
.getElementsByTagName("kuler:swatch")
.collect{|swatch|
swatch.getElementsByTagName("kuler:swatchHexColor")
.collect(_.getText)
}.flatten.collect{|str|
Color.newHex(str)
}
};
~tidy = {|fileName|
"rm /tmp/%".format(fileName).unixCmd;
};
~show = {|color, bounds(Rect(30,300, 100, 30))|
var window;
var extent = bounds.extent.asArray;
window = Window.new("ColorTest", bounds, false);
window.drawHook = {
3.do{|i|
Pen.color = Color.gray(i * 0.5);
Pen.fillRect(
Rect.fromArray([i*(extent.first/3),0] ++
(extent * [1/3, 1]))
);
};
Pen.color = color;
Pen.fillRect(Rect.fromArray(extent*0.1 ++ extent * 0.8));
};
window.front;
}
)
(
{
~fileName = "%.xml".format(Date.getDate.stamp);
~getFeed.value(~fileName, "your Kuler key here");
2.wait;
"less /tmp/%".format(~fileName).unixCmd;
a = ~xml2color.value(~fileName);
1.wait;
~tidy.value(~fileName)
}.fork;
)

a.do{|c| ~show.(c)}

Base


(
~duau.play;
~duau = {|t_gate = 0, t_gate2 = 0, freq = 80|
var src;
src = SinOsc.ar(
Phasor.ar(t_gate, [20, 21], freq, 10),
pi,
2
).softclip.sum;

src = CompanderD.ar(src, src,
thresh: EnvGen.ar(Env([0,1,0], [0.1, 0.1]), gate: t_gate),
slopeBelow: 0.022,
slopeAbove: 0.1,
clampTime: 0.2,
relaxTime: 0.00002
) * EnvGen.ar(Env([0,1,0], [0.0001, 2]), gate: t_gate2)!2;
src.softclip
}
)
~duau.set(\t_gate, 1, \t_gate2, 1, \freq, 76)
~duau.set(\t_gate, 1, \t_gate2, 1, \freq, 96)

Technorati Tags: ,

Livecoding Practice II

Done without the function posted in the last post, but I like it anyhow:


s.boot;
p = ProxySpace.push(s);
ProxyMixer(p)
History.start;

~tacker.clear
~tacker.fadeTime = 10;
~tacker = {|amp = 0.1, freq = 60|
var in;
var lf = {LFSaw.ar(Phasor.ar(
Impulse.ar(2/5, 2.0.rand),
120,
1,
TRand.kr(0.5 * freq, freq, Impulse.ar(50))
))}!10;
in = lf.collect{|lf|
(Impulse.ar(lf.exprange(15, 1000)) * lf.range(0.1, 1))
}.sum * 0.1;
(Pan2.ar(in, WhiteNoise.ar(1)) * 20 * amp).softclip
}
~tacker.play

~filta = {|freq = 10000, rq = 0.1|
RLPF.ar(~tacker.ar, freq, rq)
}

Spec.add(\wet, [0, 1].asSpec)
~outa = {|wet = 0.1| (wet * ~filta.ar) + ((1-wet) * ~tacker.ar)}
~cutta = {
~outa.ar * LFPulse.ar(Line.kr(10, 20, 300))
}

Spec.add(\dt, [0, 1].asSpec)
~tacker1 = {|dt = 0.2| DelayN.ar(~cutta.ar, 1, dt)}
p.free(10)

Technorati Tags: , ,

Livecoding Practice

sometimes it makes sense to practice livecoding. In order not to use the same UGens and Patterns over and over again, I wrote this little recurrent function which collects all available UGens and chooses one for you to use.

f = {|ugen|
ugen.subclasses.notNil.if({
ugen.subclasses.collect({|ugen| f.(ugen)}) ++ [ugen]
}, {
[ugen]
})
}

f.(UGen).flat.choose

enjoy!

Update: redFrik pointed me to this little patch AdC wrote some time ago. It is much fancier then mine, but you have to post your solutions and score here.

[ redFrik | AdC | livecoding ]

Spiritus Coloris

Spcoloris-Blumengiessen-Klein
On Friday, 15th of June, René Tünnermann, Matthias Zenker and myself will present the latest in sonobotanics, an exhibition of Spiritus Coloris, a colorvorous plant normally invisible and not perceivable vegetable form of life. More information may be found here.

Update:
It was much work, but in the end it was really great! Thanx to all participating and experiencing and believing in and to Sp.Coloris. Pictures and sounds (and videos?) will follow soon.

[ Sonobotanics home | Exhibition home | in this blog ]

Technorati Tags:

Description of Live Coding

If you’re building a house that you plan to live in for a few decades, you’d better make sure it has a good framework. Live coding is more like making a fort out of cardboard boxes — it goes up REALLY FAST and you have a hell of a lot of fun playing in it, and when the game’s over, nobody cares if it falls down 2 seconds later.

[ James Harkins, in a mail to the sc users mailinglist on mai, 31 2007 17:27:04 MESZ ]

SETO


The Framework for TUIO-based tangible computing with SuperCollider now is called SETO – SuperCollider Environment for Tangible Objects.

You may install it in SuperCollider by evaluating

Quarks.checkoutAll;
Quarks.install("TUIO") // still the old name...

and then restarting the interpreter.
If you have a GUI app (Cocoa or SwingOSC atm.) you may want to use TUIOServer:gui to see the recognized objects and their states.
More information can be found at the SETO home and the TUIO home.
Have fun and feel free to contact me if something isn’t working right.

[SETO home | TUIO home]

Using Geshi for sc code markup

New here: Geshi sc Markup:


p = ProxySpace.push(s.boot);

(
SynthDef(\autoTweety,{
|freq= 400, dFreq = 200, out = 0 , amp = 0.1, pan = 0|

var sum, trig, dur;

trig = Lag.kr(Dust.kr(MouseX.kr(0, 30)) > 0, 0.1);
dur = MouseY.kr(1.0, 2);

sum = SinOsc.ar(
((dFreq) * EnvGen.kr(
Env.perc(0.99,0.01),
trig, 1, 0, dur, doneAction: 0
)) + freq,
0,
EnvGen.kr(
Env.perc(0.01, 0.99),
trig,
1,
0,
dur,
doneAction: 0
)
);
Out.ar(out, Pan2.ar(sum, pan, amp));
}).send(s)
)

~autoTweety = \autoTweety;
~autoTweety.play;

~trig.play
~trig = {Saw.ar(400)*(-1)}
~trig.clear
~autoTweety.stop;
~autoTweety.free;
-------------

thanks Dan!

[ sourcecode and example on how to use it ]

Grafer update

I’ve rediscovered my Griffin PowerMate.
Grafer, a simulation of one of these little drawing-boards with two knobs to control a pen now has a Powermate Control…

Ah, and now it’s also usable with SwingOSC.

Enjoy :-)

HandRails

On thursday evening Alberto and me decided to try out the sound of the handrails in the IEM staircase. It was really amazing; we had attached contact microphones to the railings used it as a source for a sound synthsesis process and finally put it back into the hallway. Because of the huge reverb in there it sounded really amazing, which also means that it does not make any sense to put up a recorded sound file here…
Instead I put up the original SuperCollider file for processing the input.
Enjoy!

Img 5855 Img 5853
[handrail & setup]

[see also Installations for further explanations on why to do this]

Bham impressions

First of all it was … hot.
We have seen James, James, Socks, Ron, AdC, JrH, Ron, Scott, Thor, Nick, CV, sometimes no coffee, chaotic accomodations (Maple Bank), cabs, and much more…

Personal Impressions

Text vs. Sound
Julian gave a nice introduction to interactive programming in general and the JITLib in particular which I found very interesting in it’s theoretical backing. Now I not only know that I use the JITLib extensively, but also why I do this :-)

Patterns Everywhere
Ron gave a nice talk on how to use Patterns in SC. I have to admit, that I was not in the topic before (just because I did not had the time to learn the way to use them properly…), but now I do have a much more brighter view on it and will use it more often, in particular for granular synthesis techniques and sonification stuff.

Granularity in Compositions

The concert at the custard factory was really awesome. Most of the pieces where based on granular synthesis. My favorites where the one’s of Jan Trützschler (Oxygen, tape piece) and Powerbooks unplugged.

LuscoFusco
The second (?) LuscoFusco event has happened at ssSymposium on Saturday evening. It’s theme was A tribute to Paul Dirac. Aftershow Party is open.

Open concert
On Saturday evening there was an open concert where I tried to perform a piece of mine (sorces posted at my wiki) (it partly worked, but then I had some glitches due to CPU overload…)

Perhaps the presenters are interested in putting their workshop material to the swiki or somewhere else?

That’s it for the moment; more to come soon…

Arbeitsgebiet

Mittlerweile steht auch so ungefähr mein Arbeitsfeld fest; ich werde mich zunächst um das Vicon Trackingsystem kümmern, und ausserdem eine von mir schon lange angedachte Interaktionsstruktur (also Anbindung von verschiedensten HCI Controllern OSC (neuer link!), MIDI, etc) in Supercollider implementieren. Mal sehen wie weit dieses Design trägt… Einen Namen hat es jedenfalls schon: JustInTerface.

Um auch denjenigen etwas zu zeigen die nicht in die Tiefen der Programmierung eintauchen wollen möchte ich auch auf jeden Fall eine Installation machen/konzipieren, dazu wird aber vorerst noch nichts verraten…