File: basic_live_coding_techniques.schelp

package info (click to toggle)
supercollider 1%3A3.10.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 45,496 kB
  • sloc: cpp: 283,513; lisp: 74,040; ansic: 72,252; sh: 23,016; python: 7,175; makefile: 1,087; perl: 766; java: 677; yacc: 314; lex: 175; ruby: 136; objc: 65; xml: 15
file content (54 lines) | stat: -rw-r--r-- 1,236 bytes parent folder | download | duplicates (5)
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:: JITLib>Tutorials, Tutorials>JITLib

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, { |out, freq = 440|
	Out.ar(out,
		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;
::