# Mathematically derived waveform vs. captured waveform from an analog synthesizer

I was thinking about how the individual parameters on an analog synthesizer could be controlled digitally. What I mean is, instead of using mechanical potentiometers to adjust some quality of the waveform (for example, the frequency of an LFO), use digital potentiometers. This would allow numerical control of waveform synthesis, similar to how CNC machining produces metal parts.

If the analog output signal was then sampled, couldn't this data be analyzed in comparison to the virtual waveform used by the digital control process? And by this I mean one could see how close the analog signal comes to its intended waveform. There inevitably will be some deviation between the virtual and actual waveforms, in the same way that tolerances describe the deviation of machined parts from their intended dimensions.

Could the analysis then be used to subtract one waveform from the other (within some specified tolerance - if a measured value is close enough to the idealized value, that evaluates as being part of the signal), so that any remaining signal (that didn't cancel out during subtraction) would be the unavoidable noise produced by analog circuits?

If so, could this calculated noise floor then be applied to the original to reduce audio artifacts and so enhance the original analog signal? I assume this would be impossible to do in real time (due to propagation delays), but possible if done in post-production. The intent of which would be to blend the qualities of analog that continue to be in demand with the qualities of digital that make it so popular.

So to summarize, use digital technology to tightly control the operation of analog circuits in a musical synthesizer to produce an output signal that matches very precisely the digital waveform modeled from digital simulations, so that a process could be developed (similar to what's used in noise cancelling headphones) which would produce an enhanced (cleaned up) hybrid of analog and digital?

I'm sure that my electro-fantasy falls flat on its face somewhere, but I'm curious to know where, why, and how badly!

I used the synthesizer as an example, because I didn't know what the term for something was, or to describe something so I could demonstrate (and test) my comprehension. That's why the descriptions are rather long winded, but I really wanted to lay everything out to check accuracy.

The adding & subtracting of signals and the whole process is what I was ultimately interested in. And I'm happy I stumbled upon things I was interested in, but didn't know existed: the "distortion analyzer" and how the difference signal [is] (called the "residual").

I wasn't trying to be misleading with the question. It's just that I didn't know what I was describing was already a thing that existed. Sorry to have created a lot of responses on the subject of the double blind test, and how to go about developing the synthesizer I described. My main interest was about restoring or enhancing old recordings. I've always wondered about such a possibility and how much improvement could be made.

So I'm super happy to have gotten the answer that I accepted. Lucky is getting just what I was after without knowing what to ask for :+D

• There is no warmth and subtlety to the analogue world if you subtract a digitally/mathematically derived signal from it. In fact there is no warmth and subtlety to the analogue world period. Sep 26, 2018 at 12:00
• @Andyaka: There is no warmth in this world at all, anywhere. Sep 26, 2018 at 12:14

If the analog output signal was then sampled, couldn't this data be analyzed in comparison to the virtual waveform used by the digital control process? And by this I mean one could see how close the analog signal comes to its intended waveform. There inevitably will be some deviation between the virtual and actual waveforms, in the same way that tolerances describe the deviation of machined parts from their intended dimensions.

Yes, such an instrument has existed for decades (it even predates digital audio) — it's called a "distortion analyzer". Most will provide a real-time output of the difference signal (called the "residual") so that you can analyze further. It consists of a combination of noise and distortion of the original signal.

The problem is to identify which parts of the residual you want to keep and which parts you don't want. This is further complicated by the fact that the nature of the residual will most likely change as the signal changes in level, frequency, etc.

All of the nonlinearities, noise, hum, and other effects associated with analog circuits can and have been replicated with digital processing. You can get plug-ins for all of the popular computer-based audio processing software packages to do exactly that. The output is indistinguishable from analog signals in any proper double-blind test.

You should probably spend time with such software to see whether you can come up with a precise technical definition of what you mean by the "desirable audio qualities of analog signals". If you can, then we can talk about techniques to create them.

• It didn't occur to me that talking about analog in a flattering way would generate as much feedback as it did. I've become accustomed to the musician's bias towards analog. I don't dispute anything said here about digital (I still prefer vintage music, but enjoyment has been tainted by the sound quality). I do contend that in some situations analog has the edge. An example is electric guitar chorus pedals: digital can sound good, but next to a nice analog chorus most musicians favor the analog. I'm not trying to impose an ideal on anyone, but offer another view for consideration. Sep 28, 2018 at 10:02
the individual parameters on an analog synthesizer could be controlled digitally.

OK so far.

instead of using mechanical potentiometers to adjust some quality of the waveform (eg the frequency of a LFO), use digital potentiometers.

It seems you already know what you want the frequency, amplitude, and phase of each component to be in digital form. If you have all digitally, then it doesn't make much sense to convert those back to analog control signals, then produce the components from those. That would introduce significant errors.

Even a modest DSP can generate sines with controllable frequency, amplitude, and phase much more accurately than a analog circuit. Use enough bits, and you can easily exceed the signal to noise ratio of any analog circuit. 16 bits, for example, gives you 96 dB. Analog circuits can do that, but what about 20 bits, or 24 bits? That's just another byte for digital, but takes analog from "quite good" to "impossible".

Olin's point is that this is effectively how analogue systems can be "cloned" into the digital world. The cheap way is just to sample/playback the original instrument, whether it's a traditional one or a synth. But yes, it's possible to model the analogue instrument digitally, and gradually tune the model and add more elements to make it arbitrarily close to an original instrument. You can blend in whatever noise and distortion achieves a particular sound.

The problem is that unless you do a proper double-blind test people continue to report the analogue synth as "warmer", even if the signal is technically indistinguishable.

Another problem is that there may be substantial differences between individual units of analogue synths (the famous 808 defective transistors, for example), and they may also be temperature dependent. So we can clone a particular unit under test, but then it doesn't sound exactly identical to a different unit.

• I was thinking more like using the digitized cloned signal to eliminate almost completely and leave only the noise behind which is present in the original signal. In this way the Sep 26, 2018 at 16:03
• original signal would be modified by an analog signal from a DAC that is out of phase with only the noise and so cancel it out to leave an enhanced analog only signal. I know that this is more like science fiction, but I'm curious about why this can't in principle work. Sep 26, 2018 at 16:15
• If the digital signal was that close then why not use it instead? Sep 26, 2018 at 16:54
• @justWondering you are basically talking about a (negative) feedback system. Sometimes also called "pre-distortion" (where you intentionally add distortion at the start, that will be reversed by the rest of the system). This is 100% possible, but as Transistor says, isn't much point for small scale audio stuff. This definitely does see use in things like radio transmission. Perhaps it also gets used in big (like 5kW+?) audio amplifiers, I don't know... Sep 26, 2018 at 19:18
• @ Transistor You asked, "If the digital signal was that close then why not use it instead?" Answer: because I'm biased. Here's (part of) where it comes from A Fender Rhodes piano has a tuning fork feeding a pick up for each note on the keyboard (and no active electronics) giving it a sound that made me re-evaluate the entire universe the first time I heard it. A theoretically perfect amplifier will boost that signal until it splits open the Death Star and a squared off edge you will never find (on the signal, that is). The best possible digital recording of it will only be an approximation. Sep 28, 2018 at 11:14