oneShot: free the responder before running user func (avoid error)
[supercollider.git] / HelpSource / Classes / FreqScope.schelp
blob735e6d2f62208420a63d41d72ffca04540c3e265
1 class:: FreqScope
2 summary:: A nice wrapper for FreqScope
3 categories:: GUI
4 related:: Classes/FreqScope
6 description::
7 FreqScope shows the frequency spectrum of the specified audio bus. The scope will remain active after a command-period. To turn it off you must either click off the 'Power' button or close the window.
9 Panel commands:
10 table::
11 ## Power || Turns the scope on and off. This is useful for freezing the signal on the display or for saving CPU.
12 ## BusIn || The audio bus to be analyzed.
13 ## FrqScl || Determines the mapping of frequencies on the x-axis. Can be linear (lin) or logarithmic (log). Logarithmic is equal spacing per musical octave.
14 ## dbCut || Determines the lowest decibel shown on the y-axis.
17 ClassMethods::
19 method:: new
20 argument:: width
21 Default value is 512.
22 argument:: height
23 Default value is 300.
24 argument:: busNum
25 The number of the audio link::Classes/Bus:: to be monitored.
26 argument:: scopeColor
27 An instance of link::Classes/Color::. The drawing color of the scope.
28 argument:: bgColor
29 An instance of link::Classes/Color::. The background color of the scope.
30 discussion::
31 Example:
32 code::
33 // must use internal server
34 s = Server.internal.boot;
36 // create a new analyzer
37 FreqScope.new(400, 200, 0);
39 // basic sine
40 { SinOsc.ar(2000, 0, 0.25) }.play(s);
42 // random saw
43 { RLPF.ar(Saw.ar(110, 0.2), LFNoise2.kr(1,1e4,1e4), LFNoise2.kr(1, 0.2, 0.22)) }.play(s);
45 // modulate phase
46 { SinOsc.ar(800, SinOsc.ar(XLine.kr(20, 8000, 10), 0, 2pi), 0.25) }.play(s);
48 // all harmonics
49 { Blip.ar(200, Line.kr(1, 100, 10), 0.2) }.play(s);
53 subsection:: Subclassing and Internal Methods
55 The following methods are usually not used directly or are called by a primitive. Programmers can still call or override these as needed.
57 method:: scopeOpen
58 Returns a link::Classes/Boolean::, whether the scope is open.
60 InstanceMethods::
62 subsection:: Subclassing and Internal Methods
64 The following methods are usually not used directly or are called by a primitive. Programmers can still call or override these as needed.
66 method::window
67 Returns the window in which the FreqScope view is placed.
69 method:: scope
70 Returns the FreqScope.