File: basic_live_coding_techniques.schelp

package info (click to toggle)
supercollider 1%3A3.6.6~repack-2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 23,792 kB
  • ctags: 25,269
  • sloc: cpp: 177,129; lisp: 63,421; ansic: 11,297; python: 1,787; perl: 766; yacc: 311; sh: 286; lex: 181; ruby: 173; makefile: 168; xml: 13
file content (54 lines) | stat: -rw-r--r-- 1,220 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
title:: basic_live_coding_techniques
summary:: basic live coding techniques
categories:: Libraries>JITLib>Tutorials

basic live coding techniques ("object style") without the use of JITLib

more to come..

using a simple environment. this looks just like ProxySpace, but works differently. for the difference, see link::Tutorials/JITLib/jitlib_basic_concepts_01:: and link::Tutorials/JITLib/jitlib_basic_concepts_02::.

code::
d = (); // create a new environment
d.push; // push it to current

// this synthdef can be changed on the fly, but the synth will
// not change from this. use expression [1] for replacing a given synth
(
SynthDef(\x, { |freq=440|
	Out.ar(0,
		Ringz.ar(Dust.ar(40), freq, 0.1)
	)
}).send(s);
)

// send a first synth:
~s1 = Synth(\x);

// [1]
// now you can play around with these lines, as well as with the synth def above
~s1 = Synth.replace(~s1, \x, [\freq, 3000]);
~s1.set(\freq, 4000);

// add a bus:

~b1 = Bus.control(s);
~b1.set(350);
~s1.map(\freq, ~b1);

// set the bus to different values:

~b1.set(100);
~b1.xline(800, 5);

~s3 = { Out.kr(~b1, MouseX.kr(300, 900, 1)) }; // add some mouse control on the fly
~s3.free; // remove it again.



// finish:

~b1.free;
d.clear;
d.pop;
::