29.01.2015 Views

Download - Daniel Sauter

Download - Daniel Sauter

Download - Daniel Sauter

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SuperCollider<br />

<strong>Sauter</strong>/AD508/S08/based on http://www.psi-o.net/pseudonym/


download + tutorials<br />

<strong>Download</strong> at:<br />

http://supercollider.sourceforge.net//<br />

Intro for Beginners:<br />

http://www.psi-o.net/pseudonym/<br />

Fredrik Olofsson: Writing Algorithms That Sound<br />

http://www.fredrikolofsson.com/software/writingAlgorithmsThatSound.html<br />

SuperCollider sWiki:<br />

http://swiki.hfbk-hamburg.de:8888/MusicTechnology/6


server + client<br />

Server: SCSynth<br />

Client application: SCLang<br />

SCSynth is responsible for the sound synthesis, sequencing<br />

and sample manipulation. Since it runs as a server, it can be<br />

located on the local machine, or another computer across a<br />

local network, or across the WWW.<br />

SCLang is the programming environment. It works like a<br />

normal text editor, but includes features such as the help<br />

system and the real-time Interpreter.


using SuperCollider<br />

boot localhost and internal server<br />

or write the following command into the post window,<br />

followed by ENTER (fn-RETURN on a Mac):<br />

Server.local.boot<br />

Server.internal.boot<br />

all commands (including multi-line programs) are executed<br />

with enter ENTER (not RETURN!).<br />

Try:<br />

{ SinOsc.ar(400, 0, 0.1) }.play


GUI<br />

SuperCollider is capable of the creation and use of Graphic<br />

User Interfaces for real-time control of the UGens<br />

w = SCWindow.new("myFirstSCWindow").front;<br />

This introduction focuses on direct text-based creation and<br />

manipulation of syntax, as well as Interfacing with Processing<br />

Applets, and therefore omits an intro to GUI within SC.


using help<br />

to look up syntax and definitions, mark (double-click) the<br />

function, and press Command-Shift- (choose SuperCollider<br />

Help).<br />

SinOsc


SynthDefs<br />

Synth Definitions (SynthDef) are container objects for all<br />

synthesis unit generators (UGens).<br />

Much like an analogue Synth, a SynthDef is where you place<br />

all the modules to control the different parts of the synthesis<br />

engine such as amplitude, frequency, effects etc.<br />

SuperCollider enables to build a SynthDef which would be<br />

impossibly complex to build with electronics. Working<br />

algorithmically, any characteristic of the SynthDef can be<br />

modulated. It is possible to create a musical patch which can<br />

change its properties 'on the fly'.


UGens<br />

A List of subclasses from UGens can be called with the<br />

following command (listed in the post window):<br />

UGen.subclasses.do{|x| if(x.respondsTo(\ar), {x.postln}) }<br />

UGen.subclasses.do{|x| if(x.respondsTo(\ar), {x.postln}) }


SuperCollider<br />

Processing<br />

SynthDef(\sine, { |amp = 0.5, freq =<br />

440|<br />

var data = SinOsc.ar(freq, 0, amp);<br />

Out.ar(0, data ! 2);<br />

}).store;<br />

import supercollider.*;<br />

Synth synth;<br />

void setup ()<br />

{<br />

size(800, 200);<br />

// uses default sc server at 127.0.0.1:57110<br />

// does NOT create synth!<br />

synth = new Synth("sine");<br />

// set initial arguments<br />

synth.set("amp", 0.5);<br />

synth.set("freq", 80);<br />

}<br />

// create synth<br />

synth.create();<br />

void draw ()<br />

{<br />

background(0);<br />

stroke(255);<br />

line(mouseX, 0, mouseX, height);<br />

}<br />

void mouseMoved ()<br />

{<br />

synth.set("freq", 40 + (mouseX * 3));<br />

}<br />

void stop ()<br />

{<br />

synth.free();<br />

}


Speech<br />

"hello world".speak<br />

Speech.init(2);<br />

Speech.channels[0].speak("hallo");<br />

Speech.channels[0].isActive;<br />

Speech.channels[0].voice_(3);<br />

Speech.channels[0].speak("hallo");<br />

Speech.channels[0].pitch_(60);<br />

Speech.channels[0].speak("hallo");<br />

Speech.channels[0].volume_(-20.dbamp);<br />

Speech.channels[0].pitchMod_(50);<br />

Speech.channels[0].speak("hallo");<br />

Speech.channels[0].stop(\immediate);<br />

Speech.channels[0].stop(\endOfWord);<br />

Speech.channels[0].stop(\endOfSentence);


Things to try<br />

// modulate phase<br />

{ SinOsc.ar(800, SinOsc.ar(XLine.kr(1, 1000, 9), 0, 2pi), 0.25) }.play;<br />

(<br />

// example signal to process<br />

play({<br />

var z;<br />

z = Decay2.ar(<br />

Impulse.ar(8, 0,LFSaw.kr(0.3, 0, -0.3, 0.3)),<br />

0.001, 0.3, Mix.ar(Pulse.ar([80,81], 0.3)))<br />

})<br />

)<br />

// sustainer<br />

play({<br />

var z;<br />

z = Decay2.ar(<br />

Impulse.ar(8, 0,LFSaw.kr(0.3, 0, -0.3, 0.3)),<br />

0.001, 0.3, Mix.ar(Pulse.ar([80,81], 0.3)));<br />

Compander.ar(z, z,<br />

thresh: MouseX.kr(0.1, 1),<br />

slopeBelow: 0.1,<br />

slopeAbove: 1,<br />

clampTime: 0.01,<br />

relaxTime: 0.01<br />

)*0.1;<br />

})<br />

)


More things to try<br />

//play me<br />

{Pan2.ar(RLPF.ar(Gendy2.ar(1,3,minfreq:20, maxfreq:MouseX.kr(100,1000), durscale:0.0, initCPs:4),<br />

500,0.3, 0.2), 0.0)}.play<br />

// crackle<br />

(<br />

SynthDef("help-Crackle", { arg out=0;<br />

Out.ar(out,<br />

Crackle.ar(1.95, 0.5)<br />

)<br />

}).play;<br />

)<br />

//following frequencymodulates a sine with a noise ugen outputing a signal between 250 and 550<br />

(mul: 150, add: 400)<br />

{ SinOsc.ar( LFNoise2.ar(150, 400), 0, 0.1) }.play<br />

Many more interesting things to try by Frederik Olofsson<br />

(http://www.fredrikolofsson.com):<br />

http://www.fredrikolofsson.com/software/EMS-SCTutorialsPublic.sit

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!