Thanks to the COVID Quarantine, I spent most of Cinco de Mayo building an o-scope! I made a similar one a while back, using meter nodes to analyze the timing when working on my delay-node looper controllers, but I wanted to try one that would allow a range of sweep resolutions.
Oscilliscope Delay Node Based-L-R 80 segment.audulus (1.2 MB)
It was an interesting project. Initially I tried it using unit delays, but I quickly found that adding variable delays became unwieldy and was another processor hog, so, not expecting it to work, I tried creating my delays using delay nodes, calculating the number of samples per segment using the SampleRate node. The big surprise is that the delay node makes a swell sample-accurate delay!
Here’s a segment delay module. There’s one in each of the of the segment drivers (80 of them in each of the two displays.)
Here’s where I tell it how many samples to delay by. Note the calculated method avoids enormous arrays of lines of unit delays!
You’ll note if looking at asymmetrical waveforms such as triggered synth outputs or external audio that this display writes right to left, putting the youngest samples at the right, more like physical oscilloscopes do.
The major components of the patch are two 80-segment displays, a trigger generator module, and a time-base module with adjustable delay.
Displays – these take 1v PP audio signal at the input, adding its delay and passing it along to each segment. The value at each segment is latched into a S/H node by the trigger pulse.
*Note that the input is on the right edge and the output is on the left–you extend the display by adding another module to the left of the first, linking from left edge to right.
The trigger generator uses an external source which can be amplified and filtered, then sampled to create a trigger signal in one of two ways. One method uses a ZeroCross node on the filtered signal. The other method (“Envelope Event” button) applies the envelope of the filtered signal to a comparator having a variable threshold for picking off a trigger. The ZeroCross method works best for continuous sinusoidal signals–the envelope event method is best for signals with a definite starting point, like a kick drum or other sonic hit.
The time base module sets the number of unit delays per segment, provides adjustable delay of either the trigger signal or the audio channel(s. 2 channels max for this patch), and provides features for doing rough time measurements on-screen.
A knob directs delay modules to sweep the (actively written) display forward or backward automatically. Delaying the trigger sweeps the waveform to the left, so you can look at and make time measurements the signal fairly long after from the trigger. Delaying the displayed signals allow you to work with samples well before the trigger.
A reference button lets you set some delay (or advance) position, then sweep to another position and read off an approximate time span (resolution is approx one segment delay). You can measure either direction.
Well, that’s it for now. I love making this sort of stuff. Keeps my brain limber.
Bottom line is that this Audulus thing is AMAZING. It never fails to surprise me!