## Tweets

**supercollider**

**clean-up #22:**

Here are my best-of twitter tweets so far. See twitter.com/redFrik for the rest. With the hard limitation of 140 characters, it is really challenging to write a piece of SuperCollider code that fits and sounds good _and is interesting to listen to for more than a few seconds.

### tweet0001

```
r{99.do{|i|x={Pan2.ar(SinOsc.ar(i+1,SinOsc.ar((i%9).div(3)*100+(i%9)+500),0.03),1.0.rand2)}.play;2.wait;x.release(25)}}.play//#SuperCollider
```

99 sine oscillators played one after the other with a two seconds interval. Each oscillator lasts for 27 seconds. So the total duration is 99 * 2 + 27 = 225 seconds. the oscillators are phase modulated with other sine oscillators with frequencies repeating in the number series: 500, 501, 502, 603, 604, 605, 706, 707, 708. The base frequencies of the 99 carrier oscillators slowly raise by one Hertz from 1 to 99. The only random thing is the stereo panning position for each oscillator.

### tweet0006

```
r{loop{x={GVerb.ar(MoogFF.ar(ClipNoise.ar*0.4,LFPar.kr({0.3.rand}!2,0,600,990)),9,9,1)}.play(s,0,19);3.wait;x.release}}.play//#SuperCollider
```

A clip noise generator runs through a Moog filter and then a reverb. Every third second there is a new noise added and each noise lasts for 22 seconds. Each Moog filter has two unique parabolic LFOs that runs at a random rate between 0 and 0.3 Hertz - each in one channel. At most, there is 8 number of overlapping noises playing at the same time. As there are so many reverbs playing here at once one needs to allocate more memory to SC server. Something like this... `Server.local.options.memSize= 32768;`

and then reboot the localhost server.

### tweet0014

```
play{a=SinOscFB;sum({|i|a.ar(a.ar(a.ar(a.ar(i+1,1/9,999),1/9,a.ar(1/9,1,1/9)),a.ar(0.1,3),i+2*999),a.ar(1/9,1/9),1/9)}!9)!2}//#SuperCollider
```

This one is completely deterministic although it is hard to believe when hearing it. A lot of nested feedbacking sine oscillators. Nine parallel oscillators are mixed down to 1 and duplicated in left and right channels. Each of the nine oscillators is frequency and feedback modulated but have a static amplitude of 1/9. The frequency modulator consists of yet more modulated feedbacking sine oscillators, while the feedback of the outer is only modulated with a single feedbacking sine oscillator running at 0.1 Hertz. All in all, there are 109 unit generators in total running in this tweet and it peaks at about 9.3% of my computer's CPU.

### tweet0016 - tweet0019

These four all work the same way. They only differ in buffer size and what kind of oscillator is used for reading back samples from the buffer. There is not much progress over longer time but they do have character and subtle though deterministic variation in the details.

```
play{b=LocalBuf(9e4,2).clear;i=Sweep.ar(BufRd.ar(2,b,Saw.ar(12,3e4,4e4)),9e4);BufWr.ar(Saw.ar([8,9]),b,i);BufRd.ar(2,b,i)/2}//#SuperCollider
```

```
play{b=LocalBuf(8e4,2).clear;i=Sweep.ar(BufRd.ar(2,b,Saw.ar(3.1,4e4,4e4)),8e4);BufWr.ar(Blip.ar([2,3]),b,i);BufRd.ar(2,b,i)}//#SuperCollider
```

```
play{b=LocalBuf(5e3,2).clear;i=Sweep.ar(BufRd.ar(2,b,Saw.ar(50,2e3,5e3)),6e4);BufWr.ar(Saw.ar([4,3]),b,i);BufRd.ar(2,b,i)/6}//#SuperCollider
```

```
play{b=LocalBuf(1e4,2).clear;i=Sweep.ar(BufRd.ar(2,b,Saw.ar(1,2e3,5e3)),5e5);BufWr.ar(Saw.ar([8,50]),b,i);BufRd.ar(2,b,i)/3}//#SuperCollider
```

### tweet0020

```
play{a=LFPulse;b=(1..4);Mix(a.ar(a.ar(a.ar(a.ar(b/32)+1/8)+1*b)+(Mix(a.ar(b/64))+a.ar(4/b)*(a.ar(a.ar(b/8))*2+b))*100))/8!2}//#SuperCollider
```

This tweet is also totally deterministic and without any randomness. Here a lot of nested square wave oscillators creates the complexity. Basically, there are 4 channels/voices mixed down to one and then duplicated in left and right channel. There are three levels deep nesting of frequency modulation with another set of square waves mixed and added.

### tweet0021

```
r{{|j|a=play{sin(Decay.ar(Duty.ar(1/50,0,Dseq(flat({|i|asBinaryDigits(j+1*i)}!8),4),2),j+1*0.008))/2!2};5.12.wait}!256}.play//#SuperCollider
```

Binary numbers from 0 to 255 form the rhythmic patterns in this tweet. Each number first repeats 8 times - each time all the bits are shifted one position to the left. That creates an array of 64 ones and zeros. This array is then repeated four times. This is what makes it sound like a 4 x 4/4 bar theme (i.e. 4 bars per number). The total 64 * 4 * 256 binary digits are played in sequence and each digit lasts for 1/50th of a second. The total duration becomes 64 * 4 * 256 / 50 = 1310.72 seconds. The sound is generated by the ones and the zeros directly. There is an exponential decay for these flipflop pulses that slowly increases throughout the 256 numbers. It starts with a decay time of 0.008 seconds and ends with 2.04 seconds. In the MP3 below only the numbers 0 - 31 are played.

### tweet0024

```
{|j|r{{|i|x=sin(i/5+(j*5));Ndef(i%5+(j*5),{Pan2.ar(LFCub.ar(j*2+x*40+400+i)/15,i%5/2-1)}).play;wait(x.abs+0.5)}!500}.play}!5//#SuperCollider
```

Another tweet without any randomness. There are five parallel routines and all do something 500 times. What they do is to define or redefine a node proxy. There are 25 proxies in total and each one contains a sine shaped oscillator panned to one out of four positions in the stereo field. The frequencies are climbing upwards in a slightly jagged curve. The exact length is a bit complicated to calculate but it is around 575 seconds. In the end, the proxies do not stop to play but just keeps the last assigned frequency and the whole soundscape becomes static.