Thoughts on controlling six state variable filters at once (user friendly)

Started by HD Evans, April 19, 2013, 12:34:49 PM

Previous topic - Next topic

HD Evans

My pickup voicing project is progressing nicely, and I know well enough with development projects that planning a few step ahead is often essential to maintain momentum.  For anyone who hasn't been following along, here's what I'm up to:

Otherwise traditional pickup designs are being wound to low-z specs using heavy magnet wire in order to shift the resonant frequency well beyond the human auditory range.  Other more exotic types will likely be used as well, but to start off these will look like normal single coils and humbuckers...  Wire gauges are even being selected to maintain normal coil geometry, effectively just winding to fill the bobbin.  All other factors aside (cables, amps, speakers, etc.) their response curves will be flat.  Each coil will be connected to a state variable filter, built with extremely low noise op-amps, where gain, resonant frequency, and Q can be set for each individual coil (this may optional on humbuckers.)  This is where things get interesting.  Our prototype is a floor unit with five SVFs on board and will have at least 15 knobs, which is simply not an option when a miniaturized version is created that will fit inside a guitar.  To cover the broadest set of needs, we most likely will have a "Pro" version: covered in knobs, for players who demand absolute control over every nuance of their tone, and available as a floor unit and or rackmount.  The "Pro" incarnation will likely be easier to implement, but not everyone likes complexity.  More than a few players will likely want something that is simple to set up and easy to use...  As in, flip a switch and your other tone is ready to go.

While the signal chain will be entirely analog, I think analog control of the system will lead to excessive complexity, limited flexibility, and higher cost.  Digital control makes all kinds of sense for this application.  Midi triggering of presets could be a very nice touch, whether it is a standard feature or not.  A nice, and reasonably priced, option for the "Pro" system might be the integration of a raspberry pi.  For the onboard system, I've toyed with ideas ranging from jumper settings with recommended voicings for popular pickup types, LDRs, arduino, etc.  It's easy enough to set up such a guitar to bypass its own electronics if a player upgrades to the "Pro" system.  The important point is that I need ideas to make it as simple as possible and no simpler.

There's no shortage of knowledge and experience around here, so I hope a few useful thoughts arise from this discussion.  In the interest of full disclosure:  my company, Davis Evans Industries, will be using these designs in commercial products.  My co-founder and I are strong supporters of open-source, DIY, hacking, and modding...  Our products will reflect this by incorporating extra soldering pads, pins, etc., to allow easy access to many unused features.  While a specific license has not been selected yet, our intention is to foster a good relationship with communities such as this.  Your input is invaluable, and in my opinion it would be a slap in the face to not let development and tinkering push things forward by covering the circuit in epoxy. 

Thanks!  This should be fun, as usual.

John Lyons

Basic Audio Pedals
www.basicaudio.net/

Mark Hammer

Given that state-variables demand adjustment of two resistances at once, and dual-ganged pots are pain in the rear even one at a time, perhaps the optimal solution is to use PWM, like MXR did for the Envelope Filter, and the Commande-series phaser.

In such an application, one uses high-frequency switching of CMOS switches like the 4016 or 4066, in series with a fixed resistor of some given value, and varies the duty-cycle (on-vs-off time) of the clock doing the switching to produce an "average" resistance that can be changed with precision and wonderful synchrony.  Buffer the master clock controlling it all, get a matched pair of caps and resistors for each filter, and there's no reason why you couldn't PWM switch a dozen different resistances (2 per SVF).

Steve Giles can tell you all about that.  :icon_wink:

HD Evans

Interesting responses so far.  I've toyed with the idea of VCAs, such as the LM13700, because it would be super easy to implement.  The obvious downside is noise, but there's nothing preventing a hybrid design using two op-amp stages and two VCAs and that could be a reasonable compromise.  CMOS switching was not even on my radar, so I'm looking into it.  Vactrols are still on the table, basically as my fallback option.  They're pricey, and will likely require a little extra work, but they can do the job. 

I'm still crossing my fingers for a solution that will cause my palm to spontaneously slap my forehead...  But I anticipate this will just be a pain.  Anyone else get jealous of the DSP guys at times like this?  For the time being at least I can enjoy the simplicity of a crazy, esoteric looking floorboard with a huge number of pots.  I haven't decided how exactly to handle switching in that design yet...  But there's so much real estate to work with and no concern over power consumption, that just about anything can be used.  I could even just build two complete circuits and switch between them.  Who knows, a mixed mode might have some amazing tonal possibilities.  I've never known a guitarist to turn down extra features.

gritz

All roads (at least those that aren't paved with noise and insanity-inducing birds' nests of wiring, unreliable and bulky mechanical switches, or temperature dependant non-linear functions) lead to microcontrollers and digital potentiometers, or microcontrollers and VCAs as VCF's, or microcontrollers and vactrols.

Digital pots: Good for selecting discrete values. No offboard wiring. Small and compact board layout. Not so good if wanting continuous control over ten octaves of filter frequency, but I imagine your voicings are over a much narrower range than that. I have a couple of digital pots still in their packaging, but haven't got round to futzing with them yet (I'm old school... and just plain old).

VCAs: Good for continuous control over a wide frequency range, but overkill for discrete presets. Chips with logarithmic response control ports ( e.g. THAT chips, Coolaudio V2164) are really easy to use re, getting the frequency you want. Noise performance of these chips is benerally very good if due attention is paid to board layout etc. but it might be noticeable in front of a high gain setup, so all in all this probably isn't your ideal choice.

Vactrols. Low noise, lowish (mainly third harmonic) distortion. Expensive? I get NSL-32SR3 in small quantities for less than the price of a pint of beer and have used them in state variables to good effect. Non-linear and somewhat temperature dependant response, but this can be compensated for. Possibly the mojo hound's choice, but they will take up more room than a couple of digital pots as they will need some supporting circuitry. In a switched application using a third vactrol in a servo loop would work well (with the microcontroller barfing out a reference voltage that corresponds to the desired frequency), but overall they can be fiddly and the main reason I use vactrols is the way that their response with regard to time can be tweaked by hitting them with different amounts of current. They are almost organic, but this quality won't be much use to you.

So, digital pots. Your heart will probably sink at the mention of microcontrollers, eeproms, SPI interfaces and the like, but I can't really see another way of physically making it all fit a guitar cavity, as well as being reliable, configurable / flexible and suitable for any kind of volume manufacture. Using a microcontroller means that you can program presets to your customer's requirements. They could even do it themselves via a MIDI port (using MIDI System Exclusive messages), or even via USB (which would be a bit more of an advanced project).

One of our fellow forumites adapted a Tubescreamer clone to use digital pots controlled by MIDI:

http://m0xpd.blogspot.co.uk/2013/01/midified-tube-screamer.html

Perhaps the least painful way to start would be to get an Arduino microcontroller and a digi pot talking to each other:

http://arduino.cc/en/Tutorial/SPIDigitalPot

There's a "Digital" section to this forum too.

Sorry I can't be more help.


HD Evans

Actually, you've been quite helpful.  Your summary of viable technologies likely saved me several hours of study, and confirmed much of what I have anticipated.  The good news is that my plans have called for digital integration ever since I had the *brilliant* idea that switching between voicings would be more useful than setting one tone.  Anyways, locking in a single tone would be wasting an awful lot of electronic horsepower.  Since my research on digital pots has been limited thus far, I'm delighted that individual ICs have so many resistors on board.  The only modification I see immediately will be the resistance values used to control Q, and it's a damn good thing it's the only block in the entire circuit that doesn't require specific values to work properly.  One chip per filter is not a bad sounding proposition at all.  I considered posting to the digital forum at first, but decided to put it here simply because I want to place as much emphasis on the analog signal chain as possible.  Now that I have more of a direction to pursue I will certainly seek out further input from the dark side. 

I've worked with arduino, raspberry pi, and various microcontrollers to some extent, and have friends with tons of programming experience who will be able to preserve some of my remaining fragments of sanity by handling most of the code.  Arduino is the most likely choice for this project, and with available shields and existing open source code it is very likely that presets will simply be stored in a file on a MMC.  Since every other electronic device has a MMC slot these days, perhaps it's the guitar's turn now. 

I'm not sure how soon work on the digital controls will begin, but the giant floor-dwelling prototype should be coming to life within the next few weeks...  and I can't wait to show it off.  The soldering has already begun.

earthtonesaudio

Is this going to be battery powered?  If so it would be prudent to consider options that allow your controller to go into a low-power state when not changing some filter parameter.

In my mind this aspect would steer you away from PWM, and toward digipots or something else which can be set and forgotten.

The bandwidth of your pickups has potential for both good and bad in terms of design.  Bad: more RF/HF noise will get into your system.  Good: you could do like TC electronic did with their TonePrint line and make a smartphone app for advanced tweaking of your system.  TC had to make due with a relatively low baud rate (in part due to bandwidth limitations of guitar pickups) but you are much less restricted in this.  Outsourcing the extra knobs to the smartphone could be really good.

HD Evans

High sound quality and reliability have been the main guiding factors for part selection, so the assumption has been that its running on batteries will be a perk if it turns out to be feasible.  As of right now, it can't be ruled out.  I already have a very nice clean extrernal power supply designed to work using a 1/4" stereo connection.  In the deepest sleep mode, arduino mini boards draw less than 5uA.  It only needs to be running at full power for a fraction of a second to wake up, set the digital pots, and return to deep sleep.

The question of creating pickup voicings/pre-sets needs to be worked out.  I would definitely prefer to avoid developing an app for the task (despite the fact that it is pretty cool.)  For anyone who wants maximum tweakability, the Pro version will definitely be the way to go.  It will most likely be available as a rack and/or floor unit with at least two sets of knobs.  The best way to handle editing/saving a patch will likely involve the knobs being translated by the processor for the digital pots.  At the moment, I suspect a raspberry pi coupled with a nice bright little LCD and a basic data entry system for labeling will be about the cleanest solution.  There's plenty of time to figure out the best way to implement the whole thing.  For the on board system I'm much less certain.  It could be limited to pulling presets from a MMC.  It would be really cool if at least three pots were on the instrument.  My plan has been to place a toggle switch that will go between at least two tones... A rotary switch could handle even more but I'm inclined to reserve large numbers of preset voicings for the Pro setup.  Perhaps the most crude concept I've had was to sell sets of resistors that would plug in to program the voicing and remain attached.  Part of my logic is that a full set on a small board might only cost $10 to essentially change all the pickups in your guitar.  Who would complain about that?  For most players, having two distinct voicings will be far beyond what they have traditionally had.  And there would be no learning curve.

Obviously, there is no shortage of details to work out.  Ideas are welcome as always.

WaveshapeIllusions

UAF42. Texas Instruments makes a single IC State Variable Filter. Look it up, I think it could save you some trouble.

I was going to suggest using PWM as well for control. A few people have used it for phasers with good results. It's easily controllable, all you have to do is vary the input voltage on a comparator. It's compact, just one of those CMOS SPDT ICs, which has a few switches per chip. It has a good range of variability. Shoot, combine that with the UAF42 I mentioned earlier and it'd be a relative cakewalk. If you can get everything in SMD it might all even fit in a guitar cavity.

Of course, as Earthtones mentioned, it's a bit power hungry. So battery power wouldn't probsbly be feasible. However, (I don't know if you already mentioned it) phantom power would solve that problem. You could go with the standard XLR set up or even just run V+ down the ring contact of a stereo cable like a few others have. Most guitarists don't use active systems, much less phantom power, but if you're going for innovation you might as well throw in as much as possible, right?

Hopefully something in there is of some use to you. Good luck, I like the idea behind what you're doing.


Side note: Have you considered any other filter topologies?

HD Evans

I'm familiar with the UAF42, and while it's a neat chip I'm not certain that it will make implementation that much easier in my case.  The spare op-amp will be needed for my Q control, while the resistors and capacitors cost no more than a few cents each.  Even in bulk I think ppu is $12.50, and close to $20 for small numbers required for prototyping.  If it cost $5 per unit...  Yeah, it would probably be a major contender.  Even the prototype boards that I'm modding for my circuit are easy to assemble and will scale down to a very small size.  Assuming a switch to surface mount in the final incarnation, there will be no challenge fitting a board under each pickup coil or pickup depending on the model.  It has a fighting chance of fitting with a through hole design.  take a look at this picture of my first prototype board in progress (big thanks again to a soBer Newt for helping out!):



That's a 2"x2" board (technicall, I think it's 5cm x 5cm) and it's almost fully populated.  I think it's down to two capacitors and a few wires for the pots and it will be ready for a smoke test.

The simplest version of the retrofit kit will most likely not have digital pots, just inexpensive arrays of resistors that will plug in and allow for a player to switch between two tones.  The next step up for on-board electronics will be available on my guitars and have a special cavity to live in.  This will likely be available as well for upgrades, but will almost certainly require a decent amount of routing to make room.  Then there's the big Pro unit which is it's own thing.  As a backup (I don't know a single gigging musician who doesn't like backups) the same system that includes two hard wired voicings will be used and bypassed during normal operation with the Pro system, only the front end input pre-amp will be used before sending the signal to processing. 

I do appreciate your input, and it's too early in the development cycle to absolutely rule anything out, but I strongly doubt the UAF42 will be used.  I'm also not particularly favoring the CMOS approach, although it is being explored.  Most likely, the system will use digital pots.  If a truly compelling argument comes forward for CMOS it could be used.  My primary concern is doing this the best way possible.  If enough people are interested that they want to buy a kit while development is ongoing, it might be the best way to verify the best solutions.

As far active electronics go.  Part of my inspiration for this project came from my friends in the melodic death metal band Allegaeon, who play 8-string guitars almost exclusively at this point.  These aren't guys who use extended range just because they want to play really low power chords, one of their guitarists is a good friend of mine from music school...  Where we both studied classical guitar performance.  If you're playing a 8-string you're basically stuck with EMG, and a blisteringly hot output.  I mentioned that I could do something much better (and happen to be developing custom signature guitar models for everyone in the band) and I finally had my excuse to start really working on this project...  I've actually be planning it sporadically for the past decade or so.

I'm certain this will be a great product.  Is it for everyone? No.  But I expect extremely high appeal amongst active gigging guitarists.  While the tonal range can be adjusted to sound like a typical high output active pickup, the emphasis is being placed on replicating classic passive tones.  On average, most of the players I know have two guitars on stage.  Unless it's a dramatically different kind of guitar, and the real reason is 90% due to a different set of pickups it's a lot easier to flip a switch or stomp on a pedal to move on and sound awesome.  This seems like one of the most obvious solutions in the history of the electric guitar, which is why I've disappointed no one else thought of this 20 years ago...  The required technology existed back then.  But I'm also grateful that I will be the one who brings it to the world.

HD Evans

I just had my "aha!" moment about an hour ago.  There has been so much focus on arduino and raspberry pi in recent years that a great option completely slipped my mind:  the MSP430 family.  Power consumption doesn't get much lower, and it can still go into a deep sleep mode that uses even less while being able to restore full operation in under 1us.  On top of that, the launchpad development board looks like tons of fun for only $10.  It is a definite goal now to have a very flexible on board system including digital pots controlled by a MSP430. 

Back to work, now.  I'm really excited!  This really has potential to operate with internal batteries.