«first  …9 10 11 12 13 14 15 last»

More SC Twitter

2012-05-14 16:25:12 supercollider

More audio recordings of my twitter sctweets. See twitter.com/redFrik and the previous post /f0blog/tweets/.

Normally you run these lines of code (140 characters) in SuperCollider and it will play you some kind of generative music or soundscape (also graphics in rare cases). Here I've recorded a few for those who are too lazy to install SuperCollider.

tweet0026

{CombL.ar(In.ar(8).tanh/8,1,1,8)!2}.play;Pbind(\amp,8,\dur,1/4,\degree,Pseq(List.fib(32)%(List.fib(64)%12),inf),\out,8).play//#SuperCollider

This one is using the built-in .fib (as in fibonacci) method to generate pitches (\degree) for the Pbind. The Pbind in it self is quite boring to listen to, so by playing it out on audio bus 8 and then making a small distortion+echo effect synth reading from bus 8, we get a much more interesting sound.

tweet0028

play{MoogFF.ar(LFTri.ar(CombN.ar(Duty.ar(1/8,0,Dseq(Dshuf(List.fib(16)%8*99,8),inf)),4,4,16))/4,LFTri.kr(1/16,0,2e3,3e3))!2}//#SuperCollider

Again using the built-in fibonacci method to generate patterns. Here every 8th bar the pattern is scrambled (Dshuf), and in every 8th bar period the first 2 bars are transposed by a strange trick running the melody pattern (i.e. the frequencies) through a CombN.

tweet0030

play{a=LFPar;GVerb.ar(VarSaw.ar(a.ar(1,0,5,a.ar([0.05,0.04],0,50,160).round(50)),0,a.ar(0.2,0,0.5,a.ar(3,0,0.2,0.5)))/8,80)}//#SuperCollider

Here is something that sounds a bit like a couple of trombones playing a riff in a reverberant room. The riff just goes on and on and is made from a pair of slowly changing LFPar oscillators, scaled, offset and rounded to the nearest 50 Hz.

tweet0033

play{f=LFPar.ar(1/14).round*20+80;Splay.ar(LFPar.ar({|i|[i+1*f,i*f+(i+1/3)]}!4)>BrownNoise.ar(Pulse.ar({|i|i+1}!4,0.35))/3)}//#SuperCollider

Sounds a bit like punk rock in 6/8 time signature. The crispness comes from the > BrownNoise combo and the rhythms from the Pulse. Overall melody is the slowly running LFPar oscillator stored in variable f. Note that this tweet only works in SuperCollider version 3.5 and above.

tweet0041

play{o=SinOsc.ar(1/RunningMax.ar(Sweep.ar(LocalIn.ar(6)),Impulse.ar([1,0.749,6,12,3,4])));LocalOut.ar(o);Splay.ar(o).tanh/2}//#SuperCollider

An ever rising tone cluster with some clicks. This is built using a LocalIn/LocalIut feedback chain. There are plateaus where one thinks the maximum frequency is reached, but those are only temporary and after a while the tone starts to rise again.

tweet0044

play{a=SinOsc;Limiter.ar(LeakDC.ar(a.ar(0.11,BRF.ar(a.ar(a.ar(0.12).exprange(1,1e4),2pi),1/a.ar(0.13).range(1,[99,100])))))}//#SuperCollider

Here the cutoff frequency of a BRF (band reject filter) is modulated with a SinOsc. The cutoff varies between 1 and 99 Hz in the left channel, and 1 and 100 Hz in the right channel. The BRF goes wild and outputs totally crazy sounds when modulated in this matter - just like the BPF used to behave in old SuperCollider versions (3.3 and earlier).

tweet0045

play{a=SinOsc;a.ar(a.ar(a.ar(0.11)),a.ar(a.ar(95*a.ar(0.01,0,1,1),0,a.ar(5e-3,0,50),100),a.ar([98,97]),pi+a.ar(5e-4))).tanh}//#SuperCollider

A deep fat bass. It sounds as lovely in a big speaker system as it sounds poor in laptop speakers. The patch is mainly doing phase modulation on a SinOsc with tanh distortion.

tweet0046

play{a=LFTri;GVerb.ar(Mix(Limiter.ar(BRF.ar(a.ar(50,1e-4),a.ar(a.ar([1.01,1.0111])*a.ar(8e3)*1e3+4e3,55),a.ar(0.01)*3))))/9}//#SuperCollider

This tweet sounds much like a field recording. The noise comes from an exploding BRF (band reject filter) that is wrapped in a Limiter so that it keeps in range. Last a GVerb is adding a metallic quality reverb to the overall sound.

tweet0047

play{CombN.ar(Limiter.ar(BRF.ar(LFSaw.ar(10,0,0.01),LFTri.ar([5,6]*0.1))),0.1,LFTri.kr(0.1,0,0.05,0.05).round(0.01))}//#SuperCollider#SC2012

This was coded, believe it or not, within a 5min time limit and under water pistol threat (part of sc2012 keynote talk in London). Again it's a BRF misbehaving run through a comb delay with short modulated delaytime (from 0 to 0.1).

tweet0048

play{a=Impulse;b=SinOsc;c=b.ar(0,BRF.ar(a.ar([7,8]),a.ar(9).lag2(1e-3),1.5,2pi));Ringz.ar(c,b.ar(0.02,0,99,150),1/9)+c*0.02}//#SuperCollider

A quite poor tweet. The rhythms are not so interesting and it also have the problem of running out and stopping after a few seconds. Anyway, the principle is that a BRF is generating strange sounds that phase modulate a SinOsc, that in turn goes through a ringing filter (Ringz). I only wanted to record it so that when someone fixes the BRF in some upcoming SuperCollider version, I can go back and listen to how it could sound.

tweet0053

Pbind(\freq,Pseq("SUPERCOLLIDER".ascii,inf)*Pstutter(64,Pseq([3,4,5],inf))*[1,2.045],\dur,0.03,\amp,Pseq([0,0.1],inf)).play// #SuperCollider

Super annoying little thing. It is using the values of the ASCII characters in the string "SUPERCOLLIDER" which is [83, 85, 80, 69, 82, 67, 79, 76, 76, 73, 68, 69, 82]. This is played in sequence and transposed and detuned. Maybe a candidate for the official SuperCollider theme song?

tweet0054

play{CombN.ar(SyncSaw.ar(Saw.ar([3,4],32,64),Saw.ar([4,3],99,Duty.kr(1,0,flop(Dseq(2!6++4++3,99)*(4**(0..4))))))/9,1,1/6,2)}//#SuperCollider

Very intense sounding tweet.

tweet0055

play{a=Pulse;CombN.ar(Slope.ar(a.ar(a.ar([1,2]/3,1/9,50,[50,150])),a.ar([3,4],1/3)+a.ar([2,3],1/4)/10+0.005).cos/5,1,1/6,2)}//#SuperCollider

An even more intense sounding tweet.

tweet0057

a=GVerb;fork{loop{z=play{#b,c,d,e,f,g,h,i=(1..50).scramble;a.ar(a.ar(a.ar(a.ar(Dust.ar(1),b,c),d,e),f,g),h,i)/20};6.wait;z.release(5)}}//#sc

This patch is heavy on the CPU. It consists of a synth with nested GVerbs all with random settings for roomsize and reverberation time. Synths play for 6 seconds and then fades out over 5 seconds as another synth, with different reverb settings start. The result is overlapping sounds and quite dense texture.

tweet0059

a=LFTri;play{CombN.ar(SinOsc.ar(Saw.ar(3,128,128),Saw.ar([3,4],a.ar(a.kr(0.1,0,8,12),0,32,128)).sin)/4,1,1/6,a.kr(1/32)+1)}// #SuperCollider

A rhythmic tweet. Gets a bit annoying after a while but there are some nice details in there.

tweet0061

a=Demand;b=SinOsc;play{b.ar(a.ar(t=Saw.ar([9,9.01]),0,Dseq(0!6++500,inf)),b.ar(a.ar(t,0,Dshuf((0..7)*99,inf)).lag(0.04)))/2}//#SuperCollider

Phasing melody in left and right channels. Every 7th note has a slightly different timbre (the 0!6++500 part) and every time one starts this tweet the melody changes (the Dshuf((0..7) part). The phasing is done with two Saw oscillators running at 9 and 9.01Hz. They are in turn used as triggers for the timbre and melody sequences (the two Demand UGens).


redShift Excerpt

2012-05-11 09:20:32 supercollider

A short excerpt from a rehearsal. It is made with the patch I played at the SuperCollider Symposium 2012 club night (Corsica studios, London).

It's controlled with my custom controller redThermoKontroll


One Reason Why I Love SC

2012-05-08 14:37:00 supercollider

140 characters...

play{Splay.ar(SinOsc.ar(9,SinOsc.ar(midicps((Sweep.ar(0,(33..3))%128&(Sweep.ar(0,(3..9))%(LFSaw.ar(3)*9+99)))+33),0,pi)))/3}//#SuperCollider

If we run this line in SuperCollider we hear this...

and using Rohan Drape's great rd_dot quark and swap play{} with draw{} in the line above, this mess gets revealed...

637231982.png

So with a single line of code - short enough to fit in a twitter tweet - we've built this amazingly complex sound synthesis patch. I can not imagine a system with greater code-to-noise ratio than SuperCollider.

And this one is pretty fun to .draw as well...

play{f={|o,i|if(i>0,{SinOsc.ar([i,i+1e-4]**2*f.(o,i-1),f.(o,i-1)*1e-4,f.(o,i-1))},o)};f.(60,6)/60}//#SuperCollider

A heavily recursive patch that looks almost fractal. The PDF file generated from this line of code is 300kB! The number 6 in the code means recursion depth and 60 is the base frequency.

To run the rd_dot quark in SuperCollider on a mac you'll need Graphviz (I use 2.28 on my OSX 10.6.8). You also need to make sure the resulting .dot files open automatically in Graphviz and not Photoshop, Word or something. (Get info on a .dot file in Finder and change all filetypes to open with graphiviz. You'll find the .dot files from rd_dot in your hidden /tmp directory)

Attachments:
637231982.pdf
1909609728.pdf

Analogue Video In/Out on a Recent MacBook Pro

2012-04-22 11:35:33 other

For a project, I needed to take in and send out realtime analogue (composite) video. Analogue video input has always been a problem, but on recent laptops, Apple even removed the video output via DVI adapter option (i.e. there is no DisplayPort to video/s-video adapter).

So after experimenting and going through some old hardware I had laying around, I found a solution using two devices that I last used around 10 years ago.

  • dfg1394 bus-powered s-video/composite video to uncompressed firewire converter from The Imaging Source (firewire version no longer available).
  • Mac OSX drivers for the dfg1394 from Outcastsoft. Works with MaxMSPJitter etc.
  • an old TView Gold scan converter from Focus enhancements. Used in combo with a 5V power from USB hack and a DisplayPort to VGA adapter.

analogvideoinout


Broderi

2011-10-03 14:02:22 electronics

Wireless sensor for embroidery.

The sensor is a tilt-compensated compass i.e. a 3D accelerometer in combo with a 3D magnetometer. Compared to my other wireless boxes, this one runs on 3.0V (two AAA batteries) and not 3.6V. This due to the LSM303DLH sensor's lack of onboard voltage regulators and 1.8V I2C data lines.

The ATmega168 has an Arduino sketch loaded as firmware and is using the internal 8 MHz oscillator. So the circuit is pretty minimal.

As part of the project knyppel with Ann Rosén. Also, see this post.

broderi photo1broderi photo2

Schematics, Arduino firmware, parts list, MaxMSPJitter patches, SuperCollider class attached.

Attachments:
broderi.zip

Soft Modem

2011-09-29 16:42:50 electronics, supercollider

This summer I build 8 small circuits that can control a bunch of LEDs (6 channels PWM) from basically any iDevice or Android phone. The circuit connects to the audio jack of the phone and uses the right channel to send data commands (in the form of a modem signal).

We use rjdj (and Pdlib, SuperCollider, etc) to generate the data signal on the phone in realtime. And it's relatively easy to connect for example the built-in accelerometer in the phone to control some LEDs, or to run amplitude/pitch tracking on the microphone and let that flash some LEDs.

The circuits will be used in the rhyme research project as well as in the upcoming e-textile workshop in Oslo (Oct 2011).

softModem photo1softModem photo2softModem photo3softModem photo4

The design is based on SoftModem by arms22. Attached below are my schematics, Pd FSK abstraction and Arduino firmware.

The modem signal is generated using Frequency-shift keying and here's how to do that in SuperCollider...

(
c= "how are you?";
{var t= 1/1225; var m= Duty.ar(Dseq([t*100]++t.dup(11*c.size)), 0, Dseq([1]++c.ascii.collect{|cc| [0]++(cc.asBinaryString.ascii-48).reverse++[1, 1]}.flat), 2); SinOsc.ar(m*(7350-4900)+4900)!2}.play(fadeTime:0);
)

This will send the characters "how are you?" at a baud rate of 1225. This is of course not a valid command for the circuit above, just something to demonstrate how it sounds. below is an MP3...

Attachments:
softModem.zip


Knyppel

2011-06-29 23:11:26 electronics

Wireless lace pillows. In collaboration with Ann Rosén.

See knyppel.se.

knyppel photo1knyppel photo2

Schematics, firmware, parts list, MaxMSPJitter patches, SuperCollider class attached.

Updates:

  • 110928: removed light sensor and added 2 more sliders, added SuperCollider class
Attachments:
knyppel.zip

«first  …9 10 11 12 13 14 15 last»