File: MonitorGui.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 (119 lines) | stat: -rw-r--r-- 2,799 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
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
117
118
119
class:: MonitorGui
summary:: display and control a Monitor
categories:: Libraries>JITLib>GUI
related:: Classes/NodeProxy, Classes/Ndef, Classes/JITGui, Classes/NdefGui

description::

MonitorGui displays the state of a link::Classes/NodeProxy::'s link::Classes/Monitor::. It is used in link::Classes/NdefGui::, link::Classes/ProxyMixer::, and link::Classes/NdefMixer::.

subsection::First examples

code::
s.boot;
Ndef(\a).ar;
Ndef(\k).kr;

	// make a MonitorGui with all bells and whistles
m = MonitorGui.new(bounds: 500@40, options: [\playN, \name, \level, \fade]);

	// when it has a kr proxy, it is visible, but disabled
m.object_(Ndef(\k));
	// with an ar proxy, it is enabled
m.object_(Ndef(\a));

	// show its play state
Ndef(\a).play		//
	// and volume
Ndef(\a).vol_(0.25);
Ndef(\a).stop

	// switch to playN mode - spread outputs should show
Ndef(\a).playN([0, 2]);
	// switch back to play - spread outbox goes back
Ndef(\a).stop;
Ndef(\a).play(0);
::

ClassMethods::

private::initClass

subsection::Creation

method::new

code::
g = MonitorGui(Ndef(\a));	// barebones
(
w = Window.new.front;
w.addFlowLayout;
g = MonitorGui(Ndef(\a), w, 300@40);
)
	// different options:
	// a playN dialog button
g = MonitorGui.new(Ndef(\a), options: [\playN])

	// bounds
MonitorGui.new(Ndef(\a), bounds: Rect(100, 100, 400, 30), options: [\playN])
MonitorGui.new(Ndef(\a), bounds: 400@24, options: [\playN])

	// level name and numerical value
MonitorGui.new(Ndef(\a), options: [\playN, \level])

	// a nameView and a fadeTime setter box
MonitorGui.new(Ndef(\a), options: [\playN, \name, \fade])

	// all of 'em
MonitorGui.new(Ndef(\a), options: [\playN, \level, \name, \fade])
::

argument::object
the nodeproxy whose monitor state will be shown, or nil.

argument::parent
a parent view where MonitorGui is to be shown. If nil, a window is made.

argument::bounds
bounds where the view (or window) will be shown.

argument::makeSkip
a flag whether to create and start a link::Classes/SkipJack:: for auto-updating.

argument::options
an array of symbols for options of what to display.

subsection::Class Variables

method::lastOutBus
the highest outbus number to allow. Default is 99.

InstanceMethods::

subsection::Instance Variables

method::config
some information on what to display

method::ampSl
an link::Classes/EZSlider:: for link::Classes/Monitor:: volume

method::playBut
a play button - shows play or playN

method::setOutBox
a numberbox to set output routing

method::playNDialogBut
opens a dialog window for playN output routing by code

method::fadeBox
a numberbox for setting monitor fadeTime.

subsection::Some Methods

method::playNMode
switches between playN mode (true) and play mode (false)

method::checkUpdate
compare previous state with current state, and update gui elements.