Module to create triggers every time an audio signal passes zero?

Hello, I am trying to find a module, or figure out a setup that will send out a pulse every time a wave crosses 0V (or another set voltage). I know comparators send out signals when a signal is above or below, but I am specifically looking for a trigger at a given voltage, regardless of direction of travel. I haven’t been able to make a comparator-logic setup that actually works at high audio rates yet, the comparators tend to just freeze on one output before the frequency gets very high, even if I bump up the sample rate…

You could probably build one with a Submarine AO-106


I don’t know exactly how you want to use a zero-crossing detector, but I wasn’t able able to find one for switching audio without clicks. Instead, I came up with a work-around.

I used a slew limiter (maybe Bogaudio’s SLEW?), set to a very short time, to control a fader. I think the fader module was either Bogaudio’s XFADE or MSM’s FADE. It wasn’t instantaneous, but it sounded as good as instantaneous.

Ooh, that looks interesting. [Added to Favorites]

I’m gonna save that puppy for later.

1 Like

I’m not sure there’s one module that does this on it’s own but on way to find the direction of a signal is to use a small signal delay to compare a signal with itself from slightly before.

edit: also I think Hetrick delta does this but I’ve never really got it sorted out.

Wait, do you mean when it crosses in one direction? Or both?

Count Modula’s Slope Detector does this, but it does not care about zero-crossing.

There’s also NYSTHI’s Slope Detector. I’ve never used it, so it’s unclear to me what the “SENSE” knob does.

1 Like

That module looks really useful, though I’d want it to be polyphonic for my purposes. The SENSE knob seems to effect how much time the steady output is triggered.

A comparator plus a slope detector will give you what you want. Use the Comparator to set the crossing voltage you are interested in.

Here are two possible solutions. The Count Modula slope detector has a Moving output that directly gives the result you want. The Nysthi slope detector only has the steady output, so you need a logical NOT gate to get the moving gate.

The Count Modula Response and Nysthi Sense serve the same purpose, but they are inverted from each other. It controls both the maximum rate of crossing that it can detect, and also controls the length of the output gate.

The Count Modula Response should be turned fully counter clockwise to be able to respond to the fastest rate of crossing. This also gives the shortest gate possible. It really only works at LFO rates - anything above ~40.5 Hz results in a constant high state.

The Nysthi Sense should be turned fully clockwise to be able to respond to the fastest rate of crossing. It can handle very fast audio rates. Turning counter-clockwise lengthens the gate, but going too far can result in a constant high gate, depending on the rate of crossing.

Threshold Crossing Detector.vcvs (5.3 KB)


Using an op-amp with a zero reference, and then a slope detector should give you a pulse when crossing zero.

Sorry that’s what Dave just said.

@puutelias : It might help to have some better idea of your ultimate goal here. Since getting a zero-crossing detector to work at typical audio frequencies is a challenge, maybe another approach will be easier.

For instance, what were you hoping to do with the trigger/pulse?

A comparator coupled with the Nysthi Slope Detector works exceptionally well, reliably detecting crossings at rates into the thousands of Hz

I don’t have an electronics background, so terminology doesn’t stick, and I always forget to look for (your) op amps when looking for a comparator. I think even better than one of your op amps is either of your schmitt trigger line drivers, because then you can adjust the hysteresis to screen out noise. But then you lose CV control over the cutoff (central threshold) voltage.

Here is my new favorite compact solution combining Submarine Schmitt Trigger and Not Gate with Nysthi Slope Detector. On the Schmitt Detector, use the C (cutoff) knob to set the crossing voltage, and the W (hysteresis) knob to non-zero to control for noise. If W is at 0, then all crossings are detected. But say W is at 0.1V, then if starting low, then the input must reach 0.1V to go high, and if starting high then the input must fall to -0.1V to go low.

I’ve added a 3 sample delay to the raw signal being fed to the scope so the signal and the crossings are perfectly in sync at the scope.

Compact Threshold Crossing Detector.vcv (1.3 KB)

If you need CV control of the crossing voltage, then swap in the Submarine OA-103 Op Amp to replace the LD-103 Schmitt Trigger.


Thank you for all the suggestions. My intent is to try and turn speech into a series of triggers for another audio source, inspired by something I had heard in a John Lilly lecture, specifically mentioning reducing speech into pulses using zero crossing points. Perhaps this is ultimately best left to a program like Audacity, but I really want to see what I can do in Rack. I have very little experience in audio or electronics overall, so obvious things probably slipped by me.

By golly, yer right. :astonished:

I had not tried it with the NSYTHI Slope Detector before, only Count Modulo’s. It appears to work at up to at least 16,744 Hz, which is the max from Bogaudio’s LVCO.

Oh. :thinking: Something like a pulse-width modulation scheme? Using maybe an accumulator, or slew limiters or some such, to demodulate the signal back into speech?

1 Like


So you want to have speech triggering other modules? And you want it to happen at audio rates?

1 Like

I wanted to get triggers when I plucked a string on the guitar, so I did this.

Guitar Trigger.vcvs (3.1 KB)

You just need the Follower, CMP, and G->T. The audio going into the Follower comes from wherever you want. In this case it came from my guitar via the mixer (with a wee bit of inherent latency), then a bit of added gain from baR to get the audio up to a good level to make it work reliably. The B knob on CMP sets the threshold for creating a gate that is used by Gate to Trigger to create triggers @ start, end, etc. It has a nice organic quality because the triggers are only created when the audio passes the threshold. It should work well for speech. Adjust the threshold to taste based on the audio you’re using. If I just keeping playing the guitar continuously, there will be no triggers created because the audio doesn’t drop below the threshold. When I mute the strings I get the end gate. Also be sure to use the V/Oct out of Follower for all kinds of sonic goodness.

1 Like

You mean stuff as referenced below?

John C Lilly’s research into marine mammal (dolphin) sound generation/vocalization (using clicks/pulses, audio and ultrasound frequencies) and human speech (and more general sound and vocalization).


Are you ready for a wet live-in

Explorations into listening

I haven’t read all of these hundreds of pages…but scaning through based on some basic search terms, it seems there might be some usefull theoretic background info in there…

Using Submarine modules then seems appriopriate :wink:


@Omri_Cohen That is the gist of it, the way it was described in the lecture I heard it from specifically mentioned zero-crossing points. I don’t know if I actually need to trigger other modules with it once I have a series of pulses/triggers, but I figure I’d experiment with that.

On relistening to the video, the direction of the pulse is actually related to the direction of the wave travel (pulse up for positive slope crossing zero, pulse down for negative slope crossing zero), but I imagine a switch could easily(?) be used to that effect when I actually have the triggers.

@john_rose I was thinking of seeing what could be done to return a series of pulses back into something resembling the original speech too, yes. But again, I have little experience, so I have no idea what’s actually possible.

@kwurqx Thanks for the material, I’ve been searching the past couple of days for more material on the program he described, but hadn’t had much luck aside from blog posts.

I’ll try to find the video timestamp for what I’m talking about later today.

1 Like

On using pulses to encode/represent a signal…

I guess PWM is always a viable option for any signal generator that can only switch ON and OFF (thus generating pulsetrains of various widths). E.g. where the width per encoded “sample” corresponds with the “amplitude” of a source sample (see Wikipedia on PWM below).

Some of us ‘oldies’ may remember the days of yesteryear (before the audio interfaces like the ‘Soundblaster’ became more common) where the humble piezo tweeter in a PC could actually produce music and/or speech (of terrible quality) using PWM.

So, not just those annoying BEEPs (ASCII 7 BELL) to tell you you did something ‘wrong’ (again).

But I guess the “samplerate” per “pulse” (of some width) needed for any sort of intelligeable / representative result would require actual samplerates way above the signal it should represent (pretty much above audiorate/Nyquist). Since you would need a multiple of the samplerate to represent the required width(s) for the amplitude of a single sample.

But…maybe it’s worth an experiment anyway…

Sometime ago, I actually tried how various modules would react to audio rate PWM modulation and audiorate sample&hold (which could be a crude approach). Some modules evaluate the modulation input way more precise (‘faster’) then others.

Anyway…on PWM:

Pulse-width modulation - Wikipedia.

1 Like