70 lines
2.2 KiB
Text
70 lines
2.2 KiB
Text
class:: FreqScope
|
|
summary:: Frequency spectrum visualizer
|
|
categories:: GUI>Interfaces
|
|
related:: Classes/FreqScopeView
|
|
|
|
description::
|
|
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.
|
|
|
|
Panel commands:
|
|
table::
|
|
## Power || Turns the scope on and off. This is useful for freezing the signal on the display or for saving CPU.
|
|
## BusIn || The audio bus to be analyzed.
|
|
## FrqScl || Determines the mapping of frequencies on the x-axis. Can be linear (lin) or logarithmic (log). Logarithmic is equal spacing per musical octave.
|
|
## dbCut || Determines the lowest decibel shown on the y-axis.
|
|
::
|
|
|
|
ClassMethods::
|
|
|
|
method:: new
|
|
argument:: width
|
|
Default value is 512.
|
|
argument:: height
|
|
Default value is 300.
|
|
argument:: busNum
|
|
The number of the audio link::Classes/Bus:: to be monitored.
|
|
argument:: scopeColor
|
|
An instance of link::Classes/Color::. The drawing color of the scope.
|
|
argument:: bgColor
|
|
An instance of link::Classes/Color::. The background color of the scope.
|
|
argument:: server
|
|
the server whose buses to show on scope.
|
|
discussion::
|
|
Example:
|
|
code::
|
|
s.boot;
|
|
|
|
// create a new analyzer
|
|
FreqScope.new(400, 200, 0, server: s);
|
|
|
|
// basic sine
|
|
{ SinOsc.ar(2000, 0, 0.25) }.play(s);
|
|
|
|
// random saw
|
|
{ RLPF.ar(Saw.ar(110, 0.2), LFNoise2.kr(1,1e4,1e4), LFNoise2.kr(1, 0.2, 0.22)) }.play(s);
|
|
|
|
// modulate phase
|
|
{ SinOsc.ar(800, SinOsc.ar(XLine.kr(20, 8000, 10), 0, 2pi), 0.25) }.play(s);
|
|
|
|
// all harmonics
|
|
{ Blip.ar(200, Line.kr(1, 100, 10), 0.2) }.play(s);
|
|
::
|
|
|
|
subsection:: Subclassing and Internal Methods
|
|
|
|
The following methods are usually not used directly or are called by a primitive. Programmers can still call or override these as needed.
|
|
|
|
method:: scopeOpen
|
|
Returns a link::Classes/Boolean::, whether the scope is open.
|
|
|
|
InstanceMethods::
|
|
|
|
subsection:: Subclassing and Internal Methods
|
|
|
|
The following methods are usually not used directly or are called by a primitive. Programmers can still call or override these as needed.
|
|
|
|
method::window
|
|
Returns the window in which the link::Classes/FreqScopeView:: is placed.
|
|
|
|
method:: scope
|
|
Returns the link::Classes/FreqScopeView::.
|