ScopeView:
Filter:
Classes | GUI > Views

ScopeView : View : QObject : Object

A buffer plotting view.
Source: ScopeView.sc
Subclasses: QScope2, Scope2

Description

ScopeView is mainly intended to support the implementation of Stethoscope (an oscilloscope), FreqScopeView (a basic frequency spectrum plotting view) and FreqScope (a frequency spectrum analyzer tool).

It is optimized to efficiently perform frequent plotting of the contents of a Buffer into which a ScopeOut2 UGen is writing. It will periodically poll the buffer for data and update the plot, as long as the ScopeOut2 UGen is writing into it; the buffer will not be plotted otherwise.

Class Methods

Inherited class methods

Undocumented class methods

ScopeView.qtClass

Instance Methods

.bufnum

.bufnum = buf

The number of the Buffer to plot.

To set up the ScopeView object for plotting, one needs to set a valid buffer number and tell a ScopeOut2 UGen to write to it. Before the view starts periodically plotting the buffer, however, one needs to assign it a Server object and call the -start method on it.

If the ScopeOut2 UGen stops writing or an invalid buffer number is set, the plotting will pause.

Arguments:

buf

An integer.

.server = server

An instance of ScopeView must be assigned to a particular server for it to work.

Arguments:

server

A Server object

.start

Tells the ScopeView object to start plotting.

.stop

Tells the ScopeView object to stop plotting. Plotting can be resumed anytime with the start method.

.style

.style = value

The plotting style:

Arguments:

value

One of the above Integers.

.xZoom

.xZoom = aFloat

The scaling factor on the horizontal axis.

Arguments:

aFloat

A Float.

.yZoom

.yZoom = aFloat

The scaling factor on the vertical axis.

Arguments:

aFloat

A Float.

.x

.x = aFloat

The horizontal offset.

Arguments:

aFloat

A Float.

.y

.y = aFloat

The vertical offset.

Arguments:

aFloat

A Float.

.fill

.fill = aFill

Fill area under scope.

Arguments:

aFill

A Boolean.

.waveColors

.waveColors = aColorArray

The colors used to plot each of the channels.

Arguments:

aColorArray

An Array of Colors, one per channel.

Inherited instance methods

Examples

A step-by-step example

An interactive example with sound

This explains all the options: