This is Bram de Jong’s classic s(M)exoscope plug-in with the source code cleaned up, documented, and modernized for JUCE 8.
For years I’ve been using Bram & Sean’s s(M)exoscope to inspect the waveform output of my plug-ins. It’s a very useful debugging tool. Recently I upgraded — finally! — to an ARM-based Mac and could not find a version of s(M)exoscope that runs natively on Apple Silicon.
The parameters
s(M)exoscope has the following parameters:
TIME — How much of the waveform is visible at once. This lets you zoom in/out on the horizontal axis. The number shown below this knob isn’t very intuitive and I never really knew what it meant until I studied the source code. It is the number of pixels per sample!
With the TIME knob at 0%, we get 31.62 pixels per sample. Strange number but oh well. Since the scope is 627 pixels wide, this will fit about 20 sample points, so this is super zoomed in.
At the other extreme, with TIME at 100%, this is 0.0003162 pixels/sample. Put differently, we now get 3162 samples per pixel, meaning the display will fit almost 45 seconds of audio at 44.1 kHz.
The default setting is about 178 samples per pixel for approximately 2.5 seconds of audio. Fun fact: When the TIME knob is at 30%, there is exactly one pixel per sample.
AMP — Applies gain to the input signal for zooming in/out on the vertical axis. Goes from 0.0001 to 1000.0, which means –60 dB to +60 dB. If you boost gain too much, the samples are clipped against the edge of the scope.
TRIGGER TYPE — The trigger determines when the oscilloscope restarts its measurement. In FREE mode it simply loops back to the beginning when it reaches the end of the screen. In RISING and FALLING mode, it checks if the samples have crossed a threshold set by the user. In INTERNAL mode it runs an internal oscillator at a certain speed and triggers after each period.
TRIGGER LEVEL — This is the vertical slider on the left of the window. It becomes active when the trigger type is RISING or FALLING. The height of the slider sets the threshold that must be crossed by the signal in order to trigger the oscilloscope.
RETRIGGER THRES — To avoid a signal from triggering too often, use this knob to set the minimum number of samples that must have passed before the next trigger may hit. This is a value between 1 and 10000 samples.
SYNC REDRAW — If enabled, the screen will not be redrawing constantly but only when the trigger was hit. With this disabled the oscilloscope can show glitches, but this is mostly because there are data races between the audio and UI threads… 😅
FREEZE — If enabled, the plug-in simply ignores any new input and keeps showing what was already on the screen.
DC-KILL — Enables a high-pass filter that removes any DC offset from the input signal. This will center the signal in the scope.
CHANNEL — Whether to read from the left or right input channel when using a stereo input signal.