FreqScopeView:
Filter:
Classes | GUI > Views

FreqScopeView : Object

Frequency analysis view
Source: FreqScope.sc

Description

FreqScopeView shows the frequency spectrum of a specified audio bus.

NOTE: The scope will remain active after a command-period. To turn it off you must use the 'active' method. Very important: You must run kill() when the parent window is closed to avoid problems. It also frees the buffers that the scope allocated and stops the FFT analysis synth. So:

Class Methods

FreqScopeView.new(parent, bounds, server)

Arguments:

parent

The parent view.

bounds

An instance of Rect, or a Point indicating width@height.

server

The server to be shown in scope.

Discussion:

Example:

FreqScopeView.response(parent, bounds, bus1, bus2, freqMode: 1)

Create a scope in a special frequency-response mode. This uses FFT-based spectral division to estimate the frequency response of some effect, on the assumption that the signal to bus1 is transformed to the signal at bus2 by some linear time-invariant process.

Arguments:

parent

The parent view.

bounds

An instance of Rect, or a Point indicating width@height.

bus1

The bus on which the "pre" signal is found.

bus2

The bus on which the "post" signal is found.

freqMode

Linear (0) or log(1) frequency mode. Defaults to 1.

Discussion:

Example:

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.

Inherited class methods

Undocumented class methods

FreqScopeView.initSynthDefs

Instance Methods

.kill

Very important. This must be run when the parent window is closed to avoid problems. It also frees the buffers that the scope allocated and stops the FFT analysis synth.

.active

.active = bool

Turn the scope on or off.

Arguments:

bool

An instance of Boolean.

.freqMode

.freqMode = mode

Arguments:

mode

0 = linear, 1 = logarithmic.

.inBus

.inBus = num

The bus to listen on.

Arguments:

num

An audio Bus number.

.dbRange

.dbRange = db

Get/set the amplitude range.

Arguments:

db

A Number.

.special(defname, extraArgs)

Put the scope into a special mode using a user-specified SynthDef. Note that only very particular SynthDefs should be used, namely ones that are derived from the \freqScope0 or \freqScope1 SynthDefs. Most users will not need to use this method directly, but it can be used to provide a customised analysis shown in the scope.

Arguments:

defname

Name of the SynthDef you wish to use.

extraArgs

Extra arguments that you may wish to pass to the synth.

instance variables

.server

the server that is freqscoped

.synth

the synth running the freqscope analysis

.scope

the scopeview that shows the running analysis

.scopebuf

the buffer used by the scope

Internal Methods

The following methods are usually not used directly or are called by a primitive. Programmers can still call or override these in subclasses as needed.

.initFreqScope(parent, bounds, argServer)

initialize and show on parent view

.doesNotUnderstand(selector ... args)

redirects methods to scope view variable

.start

.allocBuffers

.freeBuffers

.bufSize

.doOnServerQuit

.doOnServerTree

.shmScopeAvailable

.specialSynthArgs

.specialSynthArgs = args

.specialSynthDef

.specialSynthDef = value

Inherited instance methods

Examples