WaveWarp 2.0 Component
      

MATLAB:
MATLAB Audio Oscilloscope
|
Functional Description
Real-time (mono or stereo) audio oscilloscope implemented as a MATLAB GUI.
Features include: flexible zoom capability; choice of multiple triggering methods;
long record data capture.
The overall time-base of the scope can be adjusted by changing the WaveWarp-MATLAB data buffer
length via the "Communication" button. Once set, this establishes the maximum time-base for the frame
(i.e. corresponding to the set length). The time-base can then be reduced arbitrarily from this
level using the "Zoom X" functionality
described below.
NOTE: This component requires MATLAB (v5.3 or later), available separately from The MathWorks, Inc. (www.mathworks.com)
| Parameter | Purpose |
| Channel mode selector |
Selects the desired display mode (applicable to stereo scopes only). The options are "left" (when only the left channel is displayed full-size),
"right" (when only the right channel is displayed full-size), or "both" (when both channels are displayed
simultaneously, each occupying half of the split-screen plot window).
|
| "Zoom Y" button |
Toggles the zoom state of the scope Y-axis. If selected, the scope background color changes to yellow,
and the Y-axis can then be zoomed to an arbitrary level using the mouse. The zoom functionality
is built around the MATLAB "zoom" function (type "help zoom" at the MATLAB prompt for more information).
Accordingly, it works as follows: when zoom is on, click the left mouse button to zoom in on the
point under the mouse. Click the right mouse button to zoom out.
Each time you click, the Y-axis limit will be changed by a factor of two (in or out). You can also
click and drag to zoom into an area. Double clicking zooms out to
the original (un-zoomed) setting.
Note: for stereo scopes in "both" mode (i.e. split screen display), the zoom functionality only affects the
the "active" scope (i.e. either the left or the right -- not both). To make either the left or right scope the "active" one,
double click on it when zoom is NOT activated.
|
| "Zoom X,Y" button |
Toggles the zoom state of the scope X- and Y-axes simultaneously. Functionality is the same as for the
"Zoom Y" button except both
X- and Y-axes are affected by the actions.
|
| "Zoom X" button |
Toggles the zoom state of the scope X-axis. Functionality is the same as for the
"Zoom Y" button except that the
X- (rather than the Y- ) axis is affected by the actions.
|
| "Zoom Out" button |
Restores the scope to the un-zoomed state, though leaving the zoom button(s) activated.
|
| "Zoom Out" button |
Restores the scope to the un-zoomed state and de-activates all zoom buttons.
|
| "Ymax:" and "Ymin:" popups and data entry dialogs |
Enable adjustment of the overall Y-axes limits. The popups contain convenient presets
which are automatically mirrored across the X-axis (i.e. the Ymin value is
automatically set to the negative of the Ymax selection, and vice versa). The data entry dialogs
can be used to override the popup presets with arbitrary values and without
enforcing symmetry across the X-axis.
|
| The "Trigger" control panel |
Enables the scope(s) to be triggered based on the input signal level. The available choices of triggering method are as
follows:
- Off (Free Run): triggering is de-activated. The data simply flows continuously from WaveWarp to MATLAB.
- Every frame: triggering is applied to every frame of data. Specifically, data
transmission for a given frame is only activated once the absolute value of the input signal amplitude exceeds the level
set in the "Threshold" popup selector. This "test" is applied before starting each frame.
- 1st Frame: triggering is applied to the first frame of data only. Specifically, data
transmission for the first frame is only activated once the the absolute value of the input signal amplitude exceeds the level
set in the "Threshold" popup selector. Thereafter, the data flows continuously as if in "Free Run" mode.
- Manual Arm: triggering is applied to every frame of data. Moreover, the trigger must be
manually "armed" each time by
pushing the green "Arm" button which automatically appears when this option has been selected.
After the trigger has been armed,
the data
transmission for a given frame is only activated once the the absolute value of the input signal amplitude exceeds the level
set in the "Threshold" popup selector. This "test" is applied after the manual arming of each frame.
- 1st Manual Arm: triggering is applied to the first frame of data only. Moreover, the trigger must be
manually "armed" by
pushing the green "Arm" button which automatically appears when this option has been selected.
After the trigger has been armed,
the data
transmission is only activated once the the absolute value of the input signal amplitude exceeds the level
set in the "Threshold" popup selector. Thereafter, the data flows continuously as if in "Free Run" mode.
Note: for stereo scopes, the reference input signal used in the trigger "test" depends which display mode is selected.
Specifically, if "left channel" or "right channel" display mode is active, then the respective
left or right channel signal is used. If "both channels" are selected, the average of the absolute values of the left
and right signals are used.
|
| The "Record capture" control panel |
If activated (by selecting the associated checkbox when the DrawingBoard is stopped), the long-term data capture feature is enabled, whereby
arbitrarily long sequences of data may be stored by the scope then delivered to the MATLAB workspace
under the name assigned in the "Workspace export: name of variable:" dialog. The length of the capture (measured in
numbers of frames, and displayed in seconds) is
adjustable via the "Length (frames):" popup selector and data entry dialog (the data entry dialog
overrides the value selected in the popup). Once the capture is completed, the data is automatically sent to the workspace.
If the Drawing Board is still running thereafter, the "New capture ?" button is enabled, allowing a new capture
to be initiated. Caution: if a new capture is initiated, the results of the previous capture will be overwritten in the
workspace unless a different variable name is selected.
Note: the long-term capture fully respects the triggering action i.e., it will be interrupted whenever the
trigger test is not met. This will lead to discontinuous captures when triggering is enabled.
|
| "Bypass" button | If selected, stops the transmission of data from WaveWarp to MATLAB.
All scope functionality (including graphical output and data record capture) is suspended. This is
particularly useful for
temporarily disabling the scope in order to alleviate the CPU burden (without having to disconnect the
component).
|
Algorithm
For efficiency, the scope visual displays use the MATLAB "xor" setting for "EraseMode" of the real-time traces.
This can lead to a fictitiously "noisy" appearance of the displayed signals. However, the long-term data capture is entirely
unaffected by this and is therefore "clean" to within the 32-bit floating-point precision of WaveWarp.
Signal Implementations
| Audio signals | Control signals | Description |
| Single input mono | n/a | Single MATLAB plot displays mono signal. |
| Single input stereo | n/a | Dual MATLAB plots display each respective channel of stereo signal. |
Related components:
Example DrawingBoards illustrating usage:

      
|