104 Barber's Pole

effectsynthpitch-shiftshepardbarbers-poleglissandoscaleoctave-stackpercussion

BARBER'S POLE generates Shepard-Risset tones: the auditory illusion of a pitch that glides forever upward or downward without ever leaving its range. Octave-spaced components slide together through a fixed spectral envelope, each fading in at the bottom and out at the top; because the stack is octave-spaced, sliding it by one whole octave returns it exactly to where it started, so the glide loops seamlessly.

Main sets speed and direction, with a deadzone at noon so the stationary position can be found by feel — anticlockwise descends, clockwise ascends, and CV In 1 is summed in. X sets density, 3 to 11 octave layers, stepped discretely with hysteresis so knob jitter cannot retrigger a change. Y crossfades between two sources: the internal sine bank, and your own signal OCTAVE-STACKED.

The live path transposes whatever is patched into Audio In 1 into N octave-spaced copies, weighted by the same window as the oscillators - so a 220 Hz partial appears at 55, 110, 220 and 440 Hz and each copy rises and fades exactly as an oscillator layer does. The internal voice is octave-stacked sines; this is octave-stacked you. Feed it anything with clear pitch content.

Switch Up is page two: Main quantises the glide to smooth glissando, 12-ET chromatic, major, minor or pentatonic; X sets stereo width; Y sets output level. Snapping is slewed over about 1.4 ms rather than jumped, because twelve oscillators stepping together is audible as a thump.

Switch Down is spring-loaded and toggles FREEZE on each press. Audio In 2 is a HOLD gate doing the same thing - it stops the glide while high and resumes from exactly where it paused, so the glide does not run on underneath. Pulse In 1 is an EVENT rather than a gate: its rising edge advances a scale step in the stepped modes, and because it never holds the glide, stepping and gliding work together - park Main at centre for pure manual stepping, or leave it off-centre and the pulses nudge an already-moving pole. Pulse In 2 reverses the glide while held. CV In 1 and 2 offset speed and density. CV Out 1 is the master phase as a 0-1V ramp - one octave per cycle, so an oscillator tracks the pole in tune - and CV Out 2 is the window level at that phase, so the two together drive a VCA and oscillator as one Shepard layer made external.

ALT-BOOT - HIDDEN BARBER: holding the switch DOWN at power-on makes the pole climb SILENTLY. A trigger on Pulse In 1 voices a ping at whatever pitches the pole has reached, and that ping decays WITHOUT climbing - it is a snapshot, not a window onto the moving stack. Trigger repeatedly and each ping comes from a different point on the pole, building a chord out of one rising structure, so the barber's pole becomes something you play rather than something you listen to. Four voices, oldest stolen. Page-two X sets the decay, 17ms to 1.7s; Main still quantises. Patch Pulse Out 1 back to Pulse In 1 and it strikes itself once per octave. Note that four voices of twelve layers each, with the live input octave-stacked through all of them, is close to what an RP2040 can do at 48kHz - trigger fast enough that all four ring at once, with a long decay and the input mixed in, and the card WILL distort. That is the processor running out of time rather than a fault, and no setting removes it; shorten the decay, use fewer layers, or play a little more sparsely. With Y clockwise the live input is gated by the ping envelope AND transposed to the struck pitches, so your own signal is what rings.

All fixed point: the RP2040 has no FPU, so a float multiply costs ~360ns against a 20.8us per-sample budget. Two economies make a eleven-layer stereo bank affordable — because the layers are exactly an octave apart every layer's increment is layer 0's shifted left by i, so ONE exponential lookup serves all eleven at 1.5kHz rather than 48kHz; and the octave stack's read heads all share one delay buffer, which is the card's single large allocation. The envelope reuses the first half of the sine table rather than needing one of its own, and sums to exactly N/2 at every layer count and phase.

The fixed-point DSP is verified on the host before flashing — window constant-sum, exponential accuracy, quadrature and sideband rejection, scale quantisation across the octave wrap, delay loop stability run at DC, and end-to-end gain. Two of those tests caught real bugs during development: a truncated window lookup that rippled at odd layer counts only, and an output stage running 4dB too hot. A renderer (tools/shepsim.py) runs the same integer engine to WAV so the card can be heard before flashing, and checks the octave wrap for a discontinuity — calibrating itself against a deliberately broken build on each run, so a detector that cannot fire is never mistaken for a pass.

Flash 1.4%, RAM 57%, both from the linker. Measured on hardware, the normal engine has comfortable margin; HIDDEN BARBER at four simultaneous voices with the live input mixed in sits close to the ceiling - see the note above.

Panel

Workshop Computer panelSPEEDDENSITYSOURCEInHoldSpeedDensityStepReverseLeftRightPitchLevelOctave

Controls

Main knob

SPEED
Glide speed and direction. Centre is stationary, with a deadzone so it can be found by feel; anticlockwise descends, clockwise ascends. About 85% of the travel sits inside the illusion - 46 seconds per octave just off centre, down to about one second at 85% - and the last stretch runs out to roughly 8 octaves per second, which reads as a siren rather than a glissando. A Shepard tone only works while the ear cannot track the octave cycle, so the curve is weighted to keep most of the knob below t…

X knob

DENSITY
Number of octave layers, 3 to 11. Higher counts make the illusion smoother and more convincing; lower counts leave the individual octaves audible. Stepped discretely with hysteresis, since adding a layer respaces the whole stack and there is no entering layer to fade. In HIDDEN BARBER it sets the layers in each strike.

Y knob

SOURCE
Crossfades from the internal sine bank (anticlockwise) to the octave-stacked live input (clockwise), at constant power. In HIDDEN BARBER the live input is also gated by the ping envelope, so your own signal is what rings.

Switch

Page 2: Quantise, stereo width and output level - or in HIDDEN BARBER, quantise, ping decay and level. Knobs use PICKUP across a page change: each holds its previous value until moved about 4 degrees, with its LED pulsing until it does, so flicking pages never edits three parameters at once.

Page 1: Speed, density and source mix. The card's normal playing page.

Freeze: Spring-loaded, and a button rather than a third page. Each press toggles FREEZE - the stack stops moving through the envelope but keeps sounding. LED 3 lights while frozen. A gate into Audio In 2 does the same thing, and both resume from exactly where they paused.

Inputs & Outputs

Inputs

Outputs

Inputs

Audio 1

In
Source for the octave stack, and for HIDDEN BARBER's gated voice. Wants clear pitch content - a voice, a synth line, a drone, a chord. Percussion works but smears, since each read head spans a 341 ms window.

Audio 2

Hold
HOLD while high - stops the glide and resumes from exactly where it paused, so releasing never jumps ahead. Works in both modes; in HIDDEN BARBER it holds the invisible pole still, so every strike gives the same chord. Above about 1.2 V holds and below 0.6 V releases, with hysteresis between them because this is an audio input rather than a comparator. Unpatched it does nothing.

CV 1

Speed
Bipolar glide speed, summed with the Main knob. Applied after the knob's deadzone, so CV still drives the glide with Main parked at noon.

CV 2

Density
Bipolar density offset, summed with the X knob on page one.

Pulse 1

Step
An EVENT, never a gate - it does not hold the glide, which is what lets stepping and gliding be used together. In normal boot its rising edge advances one scale degree in the stepped modes, so the pole keeps climbing between steps. In HIDDEN BARBER it is the strike trigger.

Pulse 2

Reverse
Reverses the glide direction while high. Momentary rather than latching, so it is playable against a clock.

Outputs

Audio 1

Left
Left channel. Identical to the right at zero stereo width.

Audio 2

Right
Right channel. Width decorrelates the two by offsetting the window rather than the oscillator phase, so a mono sum stays valid and never cancels.

CV 1

Pitch
Master glide position as a 0-1V ramp - ONE OCTAVE per cycle, so an oscillator patched here climbs in tune with the pole. Calibrated per card rather than scaled by hand.

CV 2

Level
The window level at the master phase - what the bottom layer of the stack is doing. Patch CV Out 1 to an oscillator's V/oct and this to a VCA and you get one Shepard layer made external: rising in pitch while swelling and fading, then beginning again.

Pulse 1

Octave
One trigger per octave wrap - the card's own clock, locked to the glide. Self-patch it to Pulse In 1 to advance a scale step every cycle, or use it to clock something else in time with the illusion.

LEDs

LED 1

Phase (quarter 1)
LEDs 0 to 2 show the master glide position, one lighting per quarter of the octave cycle - so the pole's progress is visible even when the sound gives nothing away. At boot, LEDs 0, 2 and 4 light together for a normal boot and 1, 3 and 5 for the HIDDEN BARBER alt-boot, held for about three quarters of a second after the switch is read.

LED 2

Phase (quarter 2)

LED 3

Phase (quarter 3)

LED 4

Freeze
Lit while the stack is frozen or held.

LED 5

Page 1
Lit on page 1. Pulses instead while a knob is waiting to be picked up after a page change.

LED 6

Page 2

README

BARBER'S POLE

An infinite glissando for the Music Thing Modular Workshop System Computer — a pitch that rises or falls forever without ever leaving its range.

Named for the illusion it borrows from: a striped pole turning on its axis, where every stripe travels upward and none of them ever arrives.

What it does

A Shepard–Risset tone is a stack of components spaced exactly one octave apart, all sliding together through a fixed spectral envelope. Each fades in at the bottom, rises through the envelope, and fades out at the top. Because the stack is octave-spaced, sliding it by one whole octave returns it to exactly where it started — so the slide can loop forever and the ear never catches the seam.

Turn Main clockwise and the pitch climbs and keeps climbing. Turn it anticlockwise and it falls without ever reaching the bottom. Park it at noon and the stack sits still, a drone made of octaves.

The speed range is deliberately wide, and weighted heavily toward the slow end: about 46 seconds per octave just off centre, roughly a second per octave at 85% of the travel, and up to eight octaves per second at the stops.

The card does this two ways at once, and Y crossfades between them:

  • Internal voice - a bank of 3 to 11 sine oscillators.
  • Live audio - incoming audio, octave-stacked: band-passed with every partial transposed into the same octave-spaced layers as the oscillators, gliding forever through the same window.

What to feed it

The internal voice needs nothing patched. It is a complete instrument on its own: the illusion is most obvious with a slow glide and a high layer count.

The live path wants sustained, harmonically rich material — pads, drones, noise, cymbals, feedback, a whole mix. Percussion works but reads as texture rather than as pitch.

Controls

The switch's two stable positions select knob pages. Down is spring-loaded and is a button, not a third page.

Knobs use pickup across a page change. Arriving on a page, each knob holds its previous value until you move it. While a knob is waiting its LED pulses (0=Main, 1=X, 2=Y), so you can see which ones are still to be picked up.

Switch MIDDLE — page 1

Knob Function
Main Speed and direction. Centre is stationary. Anticlockwise descends, clockwise ascends. About 80% of the travel sits inside the illusion (46 s down to ~1 s per octave); the last stretch runs out to a deliberate siren at 0.13 s. Summed with CV In 1.
X Density - 3 to 11 octave layers, stepped discretely with hysteresis. Adding a layer respaces the whole stack, so the change is audible by nature. Summed with CV In 2.
Y Source Mix — fully anticlockwise is the internal voice, fully clockwise is the live-audio shifter, anywhere between is a blend.

Switch UP — page 2

Knob Function
Main Quantise - see the scale table below.
X Stereo width - Shifts the window slightly between channels, which subtly spreads the image.
Y Output level. Counter Clockwise = silent.

Scales

Setting Degrees (semitones from the root)
Smooth none — a continuous glissando
Chromatic 0 1 2 3 4 5 6 7 8 9 10 11
Major 0 2 4 5 7 9 11
Minor 0 2 3 5 7 8 10
Pentatonic 0 2 4 7 9
Diminished 0 2 3 5 6 8 9 11
Whole tone 0 2 4 6 8 10

The scale repeats every octave, so the glide walks the same degrees forever. In a rising glide the chromatic setting is nearly indistinguishable from smooth — every semitone is present either way — so the modal settings are what actually change the character.

The last two are symmetric, and suit a barber-pole unusually well: they repeat below the octave — diminished every minor third, whole tone every whole tone — so the stack is already self-similar at a smaller interval than the wrap, and the climb has no home key to return to.

Switch DOWN — momentary

  • Short press toggles FREEZE: the stack stops moving through the envelope but keeps sounding. Audio In 2 does the same from a gate, and resumes from exactly where it paused rather than jumping ahead.
  • LED 3 lights while frozen; press again to resume.

Jacks

Jack Function
Audio In 1 Source for the octave stack, in both modes
Audio In 2 HOLD while high — stops the glide and resumes from exactly where it paused. Above about 1.2 V holds, below 0.6 V releases; unpatched it does nothing
CV In 1 Bipolar speed offset, summed with Main
CV In 2 Bipolar density offset, summed with X
Pulse In 1 Advances one scale degree in stepped modes; the strike trigger in Hidden Barber. An event, not a gate — it never holds the glide
Pulse In 2 Reverse direction while high
Audio Out 1 / 2 Stereo output
CV Out 1 Master phase — a 0–1 V ramp, one octave per cycle on a V/oct input
CV Out 2 Window level — swells and fades as CV Out 1 rises
Pulse Out 1 One trigger per octave wrap — the card's own clock, locked to the glide

The octave stack

Feed the live audio stack anything with clear pitch content — a voice, a synth line, a drone, a chord. Percussion works too but the transposed copies smear, since each read head spans a 341 ms window.

Stepped modes

With Main on page 2 at anything other then fully counter clockwise, the glide snaps to a scale. The transition is slewed rather than snapped — about 1.4 ms.

Pulse In 1 advances one degree. Glide and stepping work together: park Main at centre for pure manual stepping, or leave it off-centre and the pulses nudge an already-moving glide — the pole keeps climbing between steps.

That combination is why hold lives on Audio In 2 rather than on Pulse In 1. A gate and a step are different gestures, and one jack cannot be both: while Pulse In 1 also froze the glide, stepping it necessarily stopped it, so the interesting half of this never worked.

Pulse Out 1 fires once per octave wrap. Self-patch it to Pulse In 1 and the card advances a scale step every time the stack completes a cycle; or use it to clock something else in time with the illusion.

The CV outputs

CV Out 1 is the master phase as a 0–1 V ramp, one octave per cycle, so an oscillator patched to it climbs in tune with the pole. It is calibrated per card rather than scaled by hand.

CV Out 2 is the window level at that same phase — what the bottom layer of the stack is doing.

Patch both together and you get one Shepard tone layer made external: send CV Out 1 to an oscillator's V/oct and CV Out 2 to a VCA, and it rises in pitch while swelling and fading, then the next cycle begins. Add more voices patched the same way and offset, and you can build the illusion outside the card.

HIDDEN BARBER (alt-boot)

Hold the switch DOWN at power-on.

The pole keeps climbing — but silently, which is where the name comes from: the pole is still there, still turning, but you only see him when you strike hit. A trigger on Pulse In 1 voices a ping at whatever pitches the pole has reached.

Trigger repeatedly and each ping comes from a different point on the pole, building a chord out of one silently-rising structure.

Hold the pole still — a gate into Audio In 2, or a press of the Down switch — and every strike gives the same chord instead. That turns the mode from an arpeggio into a fixed voicing you can play, and releasing lets the pole carry on from where it stopped.

Switch MIDDLE — page 1

Knob Function
Main Pole speed - how fast the invisible climb moves between strikes, and which way
X Density - 3 to 11 layers in each strike
Y Source Mix - internal sines anticlockwise, your own input octave-stacked clockwise

Switch UP — page 2

Knob Function
Main Quantise — smooth, 12-ET, major, minor, pentatonic, diminished, whole tone. Strikes land on scale degrees rather than anywhere on the glide
X Ping decay — 17 ms click to a 1.7 s ring
Y Output level

Page 1 is identical to normal boot. On page 2 only X differs: it is decay here rather than stereo width, and width sits at a fixed modest spread.

Knobs use pickup across a page change — arriving on a page, each knob holds its previous value until moved about 4°, and its LED pulses until it does. Page 2 starts at smooth / shortest decay / full level, so on the first visit the decay knob does nothing until you nudge X.

Four voices, oldest stolen when all are busy, so the newest four strikes are always the ones sounding.

A caveat about fast triggering. Four voices, eleven layers each, with the live input octave-stacked through all of them, is close to what an RP2040 can do at 48 kHz. Trigger fast enough that all four voices are ringing at once — especially with a long decay and Y clockwise — and the card will distort.

Even LEDs (0/2/4) indicate a normal boot, odd LEDs (1/3/5) the alt-boot.

Flashing

Hold BOOTSEL while connecting the Pico, then drag UF2/shepard.uf2 onto the drive that appears. It reboots on its own.

To build from source you need the Pico SDK:

cmake -G Ninja -B build -S .
ninja -C build

FLASHME/shepard.uf2 is refreshed by every build, so it always matches the source you just compiled; UF2/ holds the released binary.

Credits

Built on Chris Johnson's header-only ComputerCard library for the Music Thing Modular Workshop System.

The name is the visual illusion the sound is usually compared to. The tone itself is Roger Shepard's (1964); the continuous glissando form is Jean-Claude Risset's.

License

MIT — see LICENSE.

Verify your download

Confirm the file you downloaded really is that new firmware.

macOS / Linux (Terminal)

shasum -a 256 firmware.uf2

Linux also has sha256sum firmware.uf2.

Windows (PowerShell)

Get-FileHash firmware.uf2 -Algorithm SHA256

Compare the result to the SHA256 on the website — it should match exactly.