File: ProxyMonitorGui.schelp

package info (click to toggle)
supercollider 1%3A3.13.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 80,292 kB
  • sloc: cpp: 476,363; lisp: 84,680; ansic: 77,685; sh: 25,509; python: 7,909; makefile: 3,440; perl: 1,964; javascript: 974; xml: 826; java: 677; yacc: 314; lex: 175; objc: 152; ruby: 136
file content (116 lines) | stat: -rw-r--r-- 3,111 bytes parent folder | download | duplicates (2)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
class:: ProxyMonitorGui
summary:: controls the top-level of a nodeproxy and its monitor
categories:: JITLib>GUI, Live Coding
related:: Classes/ProxyMixer, Classes/NodeProxyEditor

description::

is a GUI for controlling the top-level of a nodeproxy and its monitor. It is e.g. used in ProxyMixer, and NodeProxyEditor, and it is cross-platform.

Examples::

code::
s.boot;

	// make a proxy space and a test proxy
(
s.scope(8);
p = ProxySpace.push;

~test = { |freq=1000, dens=5, amp=1, lev=3|
	var freqline = { exprand(0.3, 3) } ! 3 * XLine.kr(0.125, 1, 2);
	Ringz.ar(Dust.ar(dens ! 3, dens.reciprocal.sqrt), freq * freqline, 0.1)
};
~test.playN(0, vol: 0.1);
)

	// make a ProxyMonitorGui
z = ProxyMonitorGui();

	// switching between proxies: drag-view displays proxy key
z.proxy = ~otto12345;	// up to 9 letters or so on macOS
z.proxy = ~test;		// make audio controls available if proxy is audio
z.proxy = nil;
z.proxy = ~otto; ~otto.kr;	//
z.proxy = ~test;



	// configuration variants

	// pudgier
ProxyMonitorGui(~test, bounds: 300@30);

	// place it in an existing window:
ProxyMonitorGui(~test, Window("ProxyMonitor", Rect(200, 200, 400, 100)).front);

ProxyMonitorGui(~test, Window("ProxyMonitor").front, bounds: 350@40);

ProxyMonitorGui(~test, Window("ProxyMonitor").front, bounds: Rect(20, 20, 360, 20));


	// show level in dB - off by default
ProxyMonitorGui(~test, showLevel: true, showPlayN: false);

	// without multichan out button - then uses proxy.play. true = playN by default.
ProxyMonitorGui(~test, showPlayN: false);

	// show proxy name or not. on by default.
ProxyMonitorGui(~test, showName: false);

	// show proxy pause and send buttons - true by default
ProxyMonitorGui(~test, showPauseSend: true, showPlayN: false);


	// turn off SkipJack view updates - updates are on by default.
ProxyMonitorGui(~test, makeWatcher: false);

	// minimal:
ProxyMonitorGui.new(~test, bounds: 300@40, showPlayN: false, showPauseSend: false);


	// the GUI functions:

ProxyMonitorGui(~test);
	// left slider is vol
~test.vol_(0.1);
~test.vol_(0.25);

~test.stop;	// play / stop button:
~test.playN;	//
~test.end;	// alt-stop fully ends the proxy.
~test.playN(vol: 0);	// alt-playN starts with volume 0.

	// number box sets first output channel
	// when you want to play out of adjacent channels.
~test.playN(0);
~test.out_(1);

	// playing out to multiple channels
~test.playN([0, 2, 5]);
~test.playN([1, 2, 5]);
	// switches the button next to it to show a different output shape:
	// ("-<" is multiple outs, "-=" is directly adjacent outs.
	// clicking on that button opens an editing dialog:
~test.playNDialog;

~test.out_(0);

	// the pause button pauses and resumes
~test.pause;
~test.resume;

	// snd button re-sends proxy's sound as compiled,
~test.send;
	// or with option-click, it rebuilds the proxy's sound function,
	// so e.g. normal random numbers or lookups in the lang get remade.
~test.rebuild;


//	ProxyMonitorGui gets its look from GUI.skin, so you could customize it there,
//	or pass your own look in:

ProxyMonitorGui(skin: <your look here>)

y = ProxyMonitorGui(~test);
::