Author Topic: Digitally controlled analog effects  (Read 1105 times)

Peter Snowberg

Re: Digitally controlled analog effects
« Reply #20 on: May 01, 2019, 06:24:44 AM »
I've never been a fan of PWM in general for some reason which may be simple bias, but when you get towards the extremes of the available range PWM shows where it has a tougher time.

If you look at schematics of 1980 synthesizers such as the Prophets from Sequential Circuits for example, you'll find plenty of DACs driving OTAs or VCAs.
Eschew paradigm obfuscation

ElectricDruid

Re: Digitally controlled analog effects
« Reply #21 on: May 01, 2019, 09:12:54 AM »
I've never been a fan of PWM in general for some reason which may be simple bias, but when you get towards the extremes of the available range PWM shows where it has a tougher time.

Ironically, it's the centre values that are toughest for the filtering. There's more feedthrough of the PWM frequency close to 50% than at the extremes. PDM reverses this, which is another interesting difference between the two techniques.

Quote
If you look at schematics of 1980 synthesizers such as the Prophets from Sequential Circuits for example, you'll find plenty of DACs driving OTAs or VCAs.

You will indeed. Or at least, plenty of DAC outputs - often there's a single DAC and a lot of demultiplexing to sample-and-hold stages. Lots to be learned from those old schematics. And Stanley Junglieb's service manuals are some of the clearest. I owe that guy a lot.

ElectricDruid

Re: Digitally controlled analog effects
« Reply #22 on: May 01, 2019, 09:26:58 AM »
You're re-inventing the earliest multi fx units, like the Boss ME-5, which used multiplexers to switch resistors

Hey, it makes a change from re-inventing the earliest fuzz pedals! :)


Fancy Lime

Re: Digitally controlled analog effects
« Reply #23 on: May 02, 2019, 02:17:16 PM »
You're re-inventing the earliest multi fx units, like the Boss ME-5, which used multiplexers to switch resistors

Hey, it makes a change from re-inventing the earliest fuzz pedals! :)

@ roseblood11
Well, yes and no. Sure, the basic techniques are nothing new. Show of hands, who here invented something actually new that isn't based on principles that have been around since the 60s? Some people on this forum have, actually, but that is not my ambition for this project. The point is to build something where the hardware is generic enough (and possibly modular) so that a large variability can be achieved by simple reprogramming. PICs provide fairly generic inputs so we can use all kinds of things as control signals for all kinds of effects and even couple effects (or modules) together in more elaborate ways than (hardware) multi effects usually can. Sure, you can do just about anything digitally, but we like analog audio paths, don't we? Another important point is that I want to learn something, not just have a device that no-one else has.

@ Tom
No no no! My fuzz uses two transistors to amplify and distort a guitar in an absolutely new way that no-one has ever thought of before. And it has eight ultra high precision resistors in a circle around both transistors to shield the circuit from ambient bad vibrations and is connected to an orgon accumulator to counteract the unmusical harmonics of chemtrails. So now it sounds EXACTLY like Hendrix. Completely revolutionary, you see.


Andy
Sound is like a complex number. It consists of a real and an imaginary part but that does not mean that the imaginary part does not exist. The unit for measuring the imaginary part is called 'mojo'.

Mark Hammer

Re: Digitally controlled analog effects
« Reply #24 on: May 02, 2019, 03:25:51 PM »
It has been MANY a year since I've heard anyone refer to Wilhelm Reich in any capacity.  Boy, does that take me back!  I was reminded of the oddball film "WR: Mysteries of the Organism", which in turn reminded me of the Kate Bush video for "Cloudbusting" in which Donald Sutherland plays Reich, and Bush plays his son, dragging an orgone accumulator up a hill.

Fancy Lime

Re: Digitally controlled analog effects
« Reply #25 on: May 02, 2019, 03:53:25 PM »
The Orgone Accumulator, Ancient Aliens or Hitler riding Velociraptors in the Hollow Earth (entrance at the South Pole) may be relatively harmless examples, but all sorts of hokum from these murky depths is making a major comeback recently. And now children die of the measles again. Does take me back all right but not in a good way. Sorry, off topic, I'll stop rambling.
Sound is like a complex number. It consists of a real and an imaginary part but that does not mean that the imaginary part does not exist. The unit for measuring the imaginary part is called 'mojo'.

ElectricDruid

Re: Digitally controlled analog effects
« Reply #26 on: May 12, 2019, 03:33:32 PM »
This thread made me go and read the Boss ME-5 schematics. It's an interesting "transitional" design, if we're being charitable. It's a mish-mash of various digital and analog techniques if we're not.

As far as the "digital control of analog" goes, it uses some odd chips which are basic early digital pots (with only 13 steps) and some VCAs controlled by digital-to-analog convertors, and then some multiplexers (4051's, so eight options) switching in different resistor values. Plus a smattering of other analog switches and FETs for routing duties.

So...it's a mixture, and it uses most of the techniques we mentioned above.

garcho

Re: Digitally controlled analog effects
« Reply #27 on: May 12, 2019, 04:19:49 PM »
i love the idea of having more than one function per pot
"...and weird on top!"

ElectricDruid

Re: Digitally controlled analog effects
« Reply #28 on: May 12, 2019, 06:19:10 PM »
I agree, as long as that doesn't come at the cost of usability.

It's *far too easy* when designing a digitally-controlled device to fall into the trap of adding more features and saying something like "Well, we'll just have this button you press that selects the mode.." and before you know it you've got an interface where what everything does depends on the settings of everything else. It's ok when you use it all the time, but if you forget about it for a couple of months, you can't operate the bloody thing when you go back to it.

There's a clear risk. But that said, being able to keep the interface simple and still have the features, without having to build a knob-encrusted monstrosity is also good. It's just that it requires some actual good design, not just chucking it together.

Incidentally, the ME-5 doesn't include any pots at all. Since the parameter ranges are so limited (13 steps is a lot on this unit) there isn't much point, so it's all done with buttons. Very 80's.


garcho

Re: Digitally controlled analog effects
« Reply #29 on: May 12, 2019, 07:17:44 PM »
^ yeah, i agree, was thinking more along the lines of replacing concentric pots with digi stuff, maybe 3, 4 functions max, more like 2 and then a pushbutton pot to select which function you're adjusting, no need for extra push buttons. For 1U units and pedals cutting the pots in half could help a lot!
"...and weird on top!"

amptramp

Re: Digitally controlled analog effects
« Reply #30 on: May 13, 2019, 09:34:45 AM »
If you do have one pot or input device controlling more than one function, you may need to add displays that show what the parameters are for all the functions you can select from that one input device.

A modern car radio uses shaft encoders (which I recommend but I don't think have been mentioned yet) and the display can be set to show whether you are currently controlling volume, bass or treble and this shows on the display for the mode you have currently selected.  For a stompbox, you would have to have displays showing all the parameters, even the ones you are not currently controlling and an indicator LED showing what parameter the input device is currently controlling.  For example, you may have one control to set both tremolo speed and depth.  If you turn that control, you had better know which parameter you are changing.  You may also want to initialize the settings to either zero or the last position you had set since the shaft encoder does not remember absolute settings, just whether the setting has increased or decreased.  If you are controlling a multiplying DAC like a DAC0808 or DAC1208, you could have hexadecimal displays reading the stored setting for each DAC.  You could have a radio button selector where there is a button above each display and as soon as you push it, the control changes to that parameter and there is a LED showing what parameter you are going to control.

You may want to group the settings so you an just step through preset values for all parameters as you proceed through your playlist at a gig.  You would have settings 1, 2, 3... which you would switch to as you came to another song or even in the middle of a song and the steps would be sequential (with a capability to step backwards if you overshoot a setting).  This would set all parameters to a value from memory and make it as simple as possible to get through a gig - just add the setting to the playlist.  This works best if you never change the order of the songs and never get an encore.

Ripthorn

Re: Digitally controlled analog effects
« Reply #31 on: May 13, 2019, 05:51:37 PM »
I'm working on a project that uses a mini OLED display to display the different parameters for presets. This type of stuff is so cheap now, that we can start to rethink the DIY and single stompbox UI. Nothing wrong with the old ways, but if you want deep editing and larger feature sets, you need to go beyond the 60's. I also have more digi pots, encoders, and uC units to play with.
Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

Sooner Boomer

Re: Digitally controlled analog effects
« Reply #32 on: May 13, 2019, 06:37:51 PM »
A straightforward way to control analog with digital is the R/2R resistance ladder.  You can use your favorite digital switching method to apply a variable voltage (between two values, or between V+ and ground), attenuate an analog signal, or apply a control resistance.

A ladder with 8 elements (1 in 256) gives an acceptable adjustment range, but it's easily expanded because each element is repeated.
Dan of 9 Toes
I'm not getting older, I'm getting "vintage"

amptramp

Re: Digitally controlled analog effects
« Reply #33 on: May 13, 2019, 07:46:15 PM »
A straightforward way to control analog with digital is the R/2R resistance ladder.  You can use your favorite digital switching method to apply a variable voltage (between two values, or between V+ and ground), attenuate an analog signal, or apply a control resistance.

A ladder with 8 elements (1 in 256) gives an acceptable adjustment range, but it's easily expanded because each element is repeated.

Your wish is my command:

http://www.ti.com/lit/ds/symlink/dac0808.pdf

Figure 9 shows a programmable gain attenuator using a DAC0808 which has an R/2R resistance ladder and 8 elements giving a 256 element range.

ElectricDruid

Re: Digitally controlled analog effects
« Reply #34 on: May 14, 2019, 09:20:05 AM »
A straightforward way to control analog with digital is the R/2R resistance ladder.  You can use your favorite digital switching method to apply a variable voltage (between two values, or between V+ and ground), attenuate an analog signal, or apply a control resistance.

A ladder with 8 elements (1 in 256) gives an acceptable adjustment range, but it's easily expanded because each element is repeated.

Agree, but it's worth pointing out that you need to start worrying about the tolerance of the resistors. 1% resistors aren't really close enough for an 8-bit network. You should go to 0.1%. More details/theory here:

https://forums.parallax.com/discussion/download/81061/LADDERNETWORKS.pdf

For this reason, resistor-string or R-2R DACs are a good option, since they've already done this work for you.

(Or sometimes not - MCP4822 is a 12-bit resistor string DAC, but the resistor tolerance is such that the nonlinearity is +/-4LSB or something.)
« Last Edit: May 14, 2019, 09:21:59 AM by ElectricDruid »

Sooner Boomer

Re: Digitally controlled analog effects
« Reply #35 on: May 15, 2019, 03:11:05 AM »
I have to respectfully disagree that precision resistors are needed in this case.  We're trying to emulate a potentiometer in a distortion effect (or sommat).  If this were a case of measurement and control for an industrial system, you would need them.  For just music, not so much.
Dan of 9 Toes
I'm not getting older, I'm getting "vintage"

ElectricDruid

Re: Digitally controlled analog effects
« Reply #36 on: May 15, 2019, 05:14:17 AM »
It's not a question of accurate control. If it was, I'd agree. With a R-2R DAC, if the resistor accuracy isn't good enough, you get uneven jumps in the value, with the biggest problems caused when the most significant bits switch. That makes the kind of digital stepping that everyone hates.
Resistor strings don't have this problem, since the resistors aren't weighted, so although the steps might vary a bit, they always increase as expected ("guaranteed monotonicity" - https://www.analogictips.com/what-is-monotonicity-and-why-is-it-important/ ).

It might be just music, but we still want smooth controls.

MetalGuy

Re: Digitally controlled analog effects
« Reply #37 on: May 15, 2019, 04:07:01 PM »
0.1% resistors are a MAJOR OVERKILL especially for guitar effects. Also smooth controls are not a must. For practical purposes 20-30 values would be enough. Imagine a pot labeled from 0 to 10 and what is the actual resolution. If you still want smooth, no problem - go for it.
There are many projects for volume controls using relays (or SSRs) and resistor ladders so as usual there's no need to discover the wheel here.
« Last Edit: May 16, 2019, 03:15:22 PM by MetalGuy »

ElectricDruid

Re: Digitally controlled analog effects
« Reply #38 on: May 16, 2019, 09:25:40 AM »
0.1% resistors are a MAJOR OVERKILL especially for guitar effects.
Yes, complete overkill in virtually all situations. Building a R-2R DAC from discrete components is a pretty specific use, and not one that comes up that often in guitar effects in general. If you want to make sure that the voltage you get out of your R-2R DAC for the value "128" is definitely bigger than the value you get out for the value "127" you *need* 0.1%. With even 1% resistors, the value can actually go *down* not up! So 0.1% resistors are *required* to solve specific problems, and a complete waste of money everywhere else!

Quote
Also smooth controls are not a must. For practical purposes 20-30 values would be enough. Imagine labeled from 0 to 10 and what is the actual resolution. If you still want smooth, no problem - go for it.
Agree, imagine how accurately you can set the position of a pot repeatably - it's probably a little better than "on the 0 to 10 marks or half way between them" (e.g. about 20 positions) - but not by much.
Certainly 8-bit resolution is more than adequate, and even 6-bit or 5-bit would be enough (and a R-2R with standard 1% resistor *is* possible at that level). At 4-bit (16 settings) people might start to complain a bit about the limited resolution, but in reality everyone would be able to find a setting they liked - we don't really *need* as much detail as we often get. No-one's knocking the ME-5 for only having 0-7 ranges on a lot of its parameters.

Quote
There are many projects for volume controls using relays (or SSRs) and resistor ladders so as usual there's no need to discover the wheel here.
Absolutely. And there are specific chips for a lot of this stuff nowadays in a way that there weren't when the Boss engineers were working on some of these designs we've been discussing.

Sooner Boomer

Re: Digitally controlled analog effects
« Reply #39 on: May 18, 2019, 12:01:56 AM »
While you *can* buy resistor ladder arrays in chips, you're stuck with whatever value(s) the mfgr wants you to have.  I think that kinda goes against the grain of a DIY Stompbox.  And there's no real reason to spend a pot of money on precision resistors.  Just like people do with many other components, one can buy in bulk and ohm-out the resistors into matched values. 
Dan of 9 Toes
I'm not getting older, I'm getting "vintage"