Use the scope~ object to visualize an audio signal using an oscilloscope-style display.
automatic [int] (default: 0)
bgcolor [4 floats]
Sets the background color in RGBA format.
bufsize [atom_long] (default: 128)
Number of samples stored in the buffer
calccount [atom_long] (default: 256)
Sets the number of samples per pixel to display
delay [float] (default: 0.)
Delay between each "trace" of oscilloscope in milliseconds
displaychan [int] (default: 1)
displaysinglechannel [int] (default: 0)
drawstyle [int] (default: 0)
Toggles an alternate drawing style which may make some waveforms more easily visible
fgcolor [4 floats]
Sets the phosphor color in RGBA format. The style color.attribute is mapped to the
gridcolor [4 floats]
Sets the grid color in RGBA format. The gridcolor attribute is mapped to the style color.
inactivealpha [float] (default: 0.3)
Inactive Channel Alpha
range [2 floats] (default: -1. 1.)
Minimum/maximum amplitudes displayed vertically
style [symbol] (default: )7.0.0
trigger [int] (default: 0)
Trigger mode determines when a new waveform trace begins (following the delay ).
sets an upward trigger in which the signal must go from being below the triglevel to being equal to it or above it.
sets a downward trigger in which the signal must go from being above the triglevel level to being equal to it or below it.
The default trigger mode is 0, which does not wait after a non-zero delay period before collecting samples again.
0 = 'None'
1 = 'Up'
2 = 'Down'
triglevel [float] (default: 0.)
Threshold to trip trigger mode. When trigger mode is 1 or 2, the waveform must increase or decrease past this value to trigger a new trace. If you are displaying a periodic waveform, slight changes to the trigger level will shift the waveform to the left or right.
Common Box Attributes
Right inlet: Size of the display buffer. This controls the rate at which scope~ redisplays new information as well as the scaling of that information. If the buffer size is larger, the signal image will stay on the screen longer and be visually compressed. If the buffer size is smaller, the signal image will stay on the screen a shorter time before it is refreshed and will be visually expanded.
It might appear that the samples per display buffer element and the display buffer size controls do the same thing but they have subtly different effects. You may need to experiment with both controls to find the optimum display parameters for your application.
Right inlet: signal to display on the Y axis of the oscilloscope
If signal objects are connected to both the left and right inlets, scope~ operates in X-Y mode, plotting points whose horizontal position corresponds to the value of the signal coming into the left (X) inlet and whose vertical position corresponds to the value of the signal coming into the right (Y) inlet. If the two signals are identical and in phase, a straight line increasing from left to right will be seen. If the two signals are identical and 180 degrees out of phase, a straight line decreasing from left to right will be seen. Other combinations may produce circles, ellipses, and Lissajous figures.
The waveform of the incoming signal is displayed within the oscilloscope display.
|MSP Analysis Tutorial 2: Oscilloscope and Spectroscope||MSP Analysis Tutorial 2: Oscilloscope and Spectroscope|