Bissell Envelope Follower

Started by R.G., February 02, 2021, 03:00:45 PM

Previous topic - Next topic

R.G.

I've always admired Harry Bissell's Envelope Follower, the one with three peak/hold sections reset by a counter to give both fast response and low ripple. I have tried repeatedly to design that thing into pedals and always run up against the complexity wall. It requires four dual opamps, lots of diodes, and a 16 pin CMOS chip. That's more circuitry that most pedals have inside. I've done a few layouts of it in the past and it rapidly gets to be a whole pedal-sized circuit board all by itself.

I took a break from some other debugging/packaging work I'm doing for my day job, and looked at it again. It still needs four dual opamps, but the CMOS at least can be replaced by an 8-pin PIC, saving some space, and at about the same price. And by going to SMT, the physical size can be halved. So I looked at how to do a single peak/hold section in SMT, then copied that two more times, put the PIC on board, added a three terminal 5V regulator... (smoke, sparks, lights dim....)

I got it down to 1" by 1.625" finally. The idea is to put the I/Os on header pins like Arduino add-ons. This takes six pins: input, ground, output , ground, power, ground. Yeah, sure, one ground would probably work, but three grounds makes the chance of interference a lot smaller. And putting it on header pins makes it a separate component that can be placed on a board with other circuitry under it on the main PCB, fitting it as a daughter card that only hits the main pedal PCB with six holes in a row on 0.1" centers.

Mark, if you're listening, does that seem like a useful "component" for further integration? I thought maybe it could be used as a retrofit to other pedals by using flying wires as well.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Mark Hammer

Just back from buying a 2nd hand budget Bigsby B5 replacement.  Thirty bucks.  Couldn't resist.

I think the question to ask, particularly for someone like yourself, with your skills, is whether what Harry's excellent envelope follower was able to do in analog form, is easily done in a smaller form factor in the digital domain with a PIC.

Tom, if YOU'RE listening in, is a PIC-based envelope follower module something you've ever contemplated?

R.G.

Good question, Mark. I'll be interested in what Tom says. My only problem with that is the ADC and DAC speeds and resolutions.
The cheaper PICs have 10 bit ADCs, which is probably good enough for an envelope follower, but only 5 bit DACs. Maaaayyyybe.
I wonder whether the sampling rate can get up to fast enough, though. I doubt (but have not computed recently) that the sub-$1 PICs can do the sampling, computation, then outputs fast enough. Maybe. I did a lot of work trying dirty tricks to make the cheap (i.e. non-DSPic) ones do audio sampling a ways back, and concluded it needed a better software wizard than I am to make it work. But for an envelope follower? It's not 44kHz 16 bit sampling, for sure.

Hmmmm. Maybe a PIC could do it if it only sampled at the peaks of repetitive waveforms. Those could well be a few kHz, maybe enough time if helped by a "sample it now, quick!!" analog circuit. Maybe even with the opamps in side some PICs.

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

ElectricDruid

Quote from: Mark Hammer on February 02, 2021, 05:35:50 PM
Tom, if YOU'RE listening in, is a PIC-based envelope follower module something you've ever contemplated?

I was keeping quiet because I thought there should be at least one thread I don't hijack talking about PICs! ;)

But now you come to mention it...yes, I've had exactly this idea, and I did use Harry Bissel's envelope follower design as the basis for it, since it's highly thought of. It's a pretty demanding application for a PIC, since it's basically audio-rate processing.

What I did was: sample the input at 9-bit, 25KHz. I wanted 30KHz but couldn't get it - too much else to do. The input only needs a couple of resistors to get a midpoint bias, and a capacitor to feed the input signal in. Then do a naive rectification of the input to get a 8-bit signal. Then it goes to the peak detectors. The output of that process is then fed to IIR filters for smoothing. Output is via PDM with 14-bit resolution, which makes sense since the filters produce a hi-res output. Pretty much directly the Bissel "three peaks" algorithm done in firmware.

One tricky part was finding time to also read the controls. I had pots for the attack and decay filters, and the peak detector reset rate (although that could be fixed easily enough). The only thing Harry had that I didn't yet manage to include is when the output drops sharply, his output filtering is reduced so the smoothed output can follow abrupt muting of the input.

The other hard part was calculating decent IIR filters on a chip with no multiply instruction! The trick there is to make sure that as much as possible is done with bit shifts. Shifting coefficients gives you *roughly* octave cutoff frequencies (it doesn't, but it's close enough over a certain range), and then if you limit yourself to 8 or 16 steps per-octave, you get something that seems like a good range of filter frequencies with the minimum calculation overhead.

I had it running on the 16F18313 which is the same 8-pin chip I used for the StompLFO. It's become a favourite chip since it packs a lot into a small form factor - even smaller if you get a SOIC version!

Perhaps it'll see the light of day sooner or later. I'd like to get it out there.

PRR

  • SUPPORTER

Mark Hammer

In 2003, Harry came up from the Detroit area to Ottawa for a mini "synth summit" in my basement, attended by several other enthusiasts, including Osamu Hoshuyama, who was in town that year as a visiting scientist from Tokyo, and former forum member Mike Irwin. Harry brought his all-analog guitar synth, using a hex pickup installed in an Ibanez shredder, that I got to try.  It was remarkably responsive to pick attack, with none of the lag that guitar synths based on MIDI experienced.  Made me a believer in his envelope-follower circuit.  Not that it couldn't be improved in any way, but it was as good as could be achieved at that time.

ElectricDruid

Wow! That's quite a collection of people to get together. I've exchanged the odd email with Harry (asking about his env follower when I was working on it, for example) and I know of Osama Hoshuyama from the Synth-DIY list and his excellent work online, and similarly Mike Irwin (who made have become immortal as a result of his linearisation scheme for the SSM2164! *) but I've never had the chance to meet them. I'm sure you all had a great chinwag!

And yes, I reckon Harry's envelope follower is still currently the state-of-the-art for an analog solution. Clearly for digital designs, other approaches are possible and I've seen some papers about crazy stuff that I barely understand, but understand well enough to know that I'm never going to be able to do it on a $1 PIC!! Ok, if you've got a 32-bit STM F4 in your design you have more possibilities and that's not exactly uncommon these days for commercial pedal designs. But that's never been where I'm at. I *know* you can solve the problem by throwing large amounts of computing power at it, but the interest for me is *how close can you get with very little?*. And the answer is often "close enough" or "95% of the way there", which is many times all you need. We waste MIPS like they're going out of fashion (hint: they're not!).

Tom

*More homework for those that haven't seen it:http://www.sdiy.org/philgallo/EDN-072402.pdf

Mark Hammer

I haven't been able to get in touch with Mike for a number of years, despite trying.  I'm assuming he moved.  If anyone has contact information, I'd be appreciative.  On a related note, someone on the Muffwiggler site indicated recently corresponding with Paul Perry, so we know he's alive.

R.G.

I did some more thinking about the Bissell follower. The essence seems to be that you do peak detection, using that for the output, and reset the peak detection after a short time to eliminate long decay times.

Tom implemented this on a PIC, within the limits of a PIC's ability to run at audio speed - and this may well be enough.

I got to thinking that you might be able to get better operation with a PIC doing the sample/hold part of the operation by adding some analog timing to the circuit. The Bissell peak detector is the straightforward two-diodes and feedback version. There is a speed-up variant of the peak detect that uses an NPN emitter follower after the first opamp to speed up the process of charging the hold capacitor. It occurred to me that there is a current running through the collector of the NPN in this form that can be reflected back down to ground by putting a PNP current mirror above the NPN follower. This could cause a positive-going signal from ground up during only the time that the NPN is conducting.

If you used this signal to tell the PIC to sample the cap voltage NOW, the PIC is relieved from continuous sampling, and has some milliseconds to do the sampling and software overhead. There is naturally a tens-of-milliseconds time before the peak needs sampled again. The Bissell version does this with the timing counter clicking to reset one of the peak detects. With a PIC being told when the sample is valid, you only need one peak detector, so the circuit complexity goes down.

I think I'll poke on this design approach a bit more. Comments, Mark and Tom? Help me out here.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

ElectricDruid

Hi RG,

Where does the "10s of msecs" come from? The peak detectors in Harry's design are scanned faster than that, aren't they?

If I'm remembering it right, you basically need at least one of the peak detectors to hold the voltage until the next peak comes along. There are three detectors, so the round-robin reset-the-next-peak-detector rate can be three times whatever the lowest frequency you want to detect is. Say it's a 40Hz bass note. That gives us a reset rate of around 120Hz, a shade under 10msecs. Definitely nots *tens* of milliseconds.

I did wonder about trying to do various parts of the envelope detection in analog ahead of the PIC to reduce the load on the poor chip, but ultimately the real excitement is getting everything onto one chip and a hybrid solution just isn't as appealing! I'm probably willing to accept some compromises to make that possible. You may feel differently, of course.