Specks — a colorful, dancing spectrum analyzer

Specks is my frequency/spectrum analyzer patch. There are already some frequency analyzer patches on Patchstorage, and they are also good. What makes this one different is a pretty light show (I think), defined by a color mixer (which weighs the probability of what color will be selected randomly when a new color is selected), along with a few different modes of operation, which determine how those pretty lights dance around.

It uh… analyzes your input and displays relatively horizontal bars on the front page corresponding to the strength of the input at that bandwidth. The filters are set ~ an octave apart, spanning from A0 (27.5 Hz) to A7 (3520 Hz). You can change the frequencies using the Center Frequency parameters on the Control (Ctrl) page. The Q factor is set to ~4, which should cause the bandpass filters to focus on frequencies ~half an octave from each frequency center.

Audio passes through the patch in stereo. It is summed to mono for analysis.

There are three MODES of operation, selected via radio buttons on the top row of the Ctrl page:

STOMPSWITCH — press the left stompswitch, colors change

THRESHOLD — when all the bands exceed a certain threshold, colors change (there is a threshold parameter located below the corresponding button)

LFO — when the LFO goes high, colors change (there is a button to tap in a tempo below the corresponding button; the patch also responds to tap tempo via a stompswitch — middle — or via MIDI clock. (MIDI clock will override tap tempo.)

On the control page you’ll also find some additional controls:

GAIN boosts or cuts the gain of the incoming signal, up to +12 dB (and down to -inf dB). A setting of ~.25 is unity gain. This does not affect audio passing through the patch, which is passed directly, in stereo, to the output. (The patch sums the stereo signal for the frequency analysis.)

SMOOTHING sets the rise and fall of the envelope followers. When the rise/fall are too fast, the display can be a bit chaotic. I find a setting of ~.4-.5 makes for a much better experience. (Yes, this distorts the representation of the incoming signal a little, but this is mostly a fun filler patch to make pretty lights when you’re not using ZOIA for some other purpose, so.)

DIRECTION and REFRESH RATE are probably best explained together. Each time a new color is selected, it passes through a shift register. The Refresh Rate defines how quickly the clock controlling the shift register moves. The faster the refresh rate, the more quickly the value corresponding to the change in color passes through the shift register. At maximum, it’s more or less instantaneous. At slower speeds, you can get some interesting effects as multiple colors move through the register at once (and thus also through the UI buttons on the pretty lights page).

The DIRECTION control is a probabilistic control, which sets the chance that those color changes sweep from left to right (0) or right to left (1). Setting it between 0 and 1 sets a probability that’s calculated each time the color changes, so you can have colors chasing one another back and forth across the grid. Good, clean fun.

Finally, there’s the Color Mixer page.

You can select up to 8 different colors and mix the probability of their appearance.

Using the COLOR DEFINE control, you can scroll through all 15 colors available in ZOIA (the UI button above this control will change color to show what color has been defined).

Then, with the COLOR CHANCE contol, you can add or remove weight for the likelihood that that color will be selected the next time the color changes. So, if you wanted to have a display that was mostly blue, but occasionally red or green, you would define those colors on one of the eight channels, then set the color chance for blue high, with red and green low (and then set the color chance to 0 for the other channels).

And that’s the patch. Hopefully, it’s a fun little thing.

I guess there’s one final thought for this one: Regardless of the color set, you may find that sometimes the last UI button illuminated in the column flickers to red. This is just a peculiarity of the UI buttons, when they rapidly change from a value of 0 to something else (I suspect because red is technically part of the 0 value domain, when setting colors for UI buttons). Smoothing can help this some.

Oh, another final thought. So, two. You may hear a clicking as you adjust the center frequencies or the smoothing parameter. That’s the CPU clipping, because the patch uses multi-filters (and the smoothing control affects 16 parameters at once). These are sort of set-and-forget things, so I didn’t worry too much about those being an issue. Find a setting you like, save the patch, done.

Leave a Reply

  • Platform:
  • Category: Other Utility
  • Revision: 0.1
  • License: Creative Commons Attribution Share Alike 4.0
  • Modified: 1 year ago
  • Views: 1185
    Likes: 9
    Downloads: 364
Download
Chat