DSPRelated.com
Forums

using DSP to duplicate an analong systems response

Started by Mook Johnson June 10, 2005
I'd like to copy the sonic signiture of some analog distortion circuits
(guitar effects) and have them all avaliable in a DSP so they can be
selected, mixed, modified (filtered) etc.

I'd like for the DSP to take in the "clean" signal fron a guitar and
output a signal distorted the same way the modeled circuit would have.

How would I go about modeling the analog response into something I can
used the DSP to duplicate?

Tricky part is that the distortion products will be dependant on
amplitude.

Let say you want a DSP to model the output of a saturating transformer.
 at low amplitudes, its linear but near and in saturation, it adds
harmonics to the output.

I do have experience with FIR, IIR, FFT and IFFT design work.

I wonder if some kind of kermal could be created from the circuits
impulse response to covolve with the input signal, similar to an FIR
filter?  To do the amplitude dependance, a family of coefficents would
be need and selected dependant on the signal amplitude.  sounds brute
force to me. 

any ideas?

Mook Johnson wrote:

   ...

> I wonder if some kind of kermal could be created from the circuits > impulse response to covolve with the input signal, similar to an FIR > filter? To do the amplitude dependance, a family of coefficents would > be need and selected dependant on the signal amplitude. sounds brute > force to me.
Non-linear circuits don't have impulse responses as such. They do have transfer functions, more easily expressed as curves than with equations. Usually, there is a "good enough" equation, such as arctan() or arcsinh(). to approximate it. If not, use a LUT with interpolation. You can filter before or after the distorter. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:
> Mook Johnson wrote: > > ... > > > I wonder if some kind of kermal could be created from the circuits > > impulse response to covolve with the input signal, similar to an FIR > > filter? To do the amplitude dependance, a family of coefficents would > > be need and selected dependant on the signal amplitude. sounds brute > > force to me. > > Non-linear circuits don't have impulse responses as such.
You might find this interesting: http://www.sintefex.com/docs/appnotes/dynaconv.PDF Regards, Andor
The problem just got easier.

It does not have to model the non linear behavior of an over-driven
signal ony the harmonic content of the black box.  The harmonicc
realationship remains the same with amplitude.

Ideas?



Mook Johnson wrote:
> I'd like to copy the sonic signiture of some analog distortion circuits > (guitar effects) and have them all avaliable in a DSP so they can be > selected, mixed, modified (filtered) etc. > > I'd like for the DSP to take in the "clean" signal fron a guitar and > output a signal distorted the same way the modeled circuit would have. > > How would I go about modeling the analog response into something I can > used the DSP to duplicate? > > Tricky part is that the distortion products will be dependant on > amplitude. > > Let say you want a DSP to model the output of a saturating transformer. > at low amplitudes, its linear but near and in saturation, it adds > harmonics to the output. > > I do have experience with FIR, IIR, FFT and IFFT design work. > > I wonder if some kind of kermal could be created from the circuits > impulse response to covolve with the input signal, similar to an FIR > filter? To do the amplitude dependance, a family of coefficents would > be need and selected dependant on the signal amplitude. sounds brute > force to me. > > any ideas?
Mook Johnson wrote:
> The problem just got easier. > > It does not have to model the non linear behavior of an over-driven > signal ony the harmonic content of the black box. The harmonicc > realationship remains the same with amplitude. > > Ideas?
Distortion creates harmonics. Distortion depends on amplitude. With distortion, harmonic relationship does _not_ remain the same with amplitude. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins <jya@ieee.org> wrote in news:9YidnTuwzISqJjTfRVn-tw@rcn.net:

> Mook Johnson wrote: >> The problem just got easier. >> >> It does not have to model the non linear behavior of an over-driven >> signal ony the harmonic content of the black box. The harmonicc >> realationship remains the same with amplitude. >> >> Ideas? > > Distortion creates harmonics. Distortion depends on amplitude. With > distortion, harmonic relationship does _not_ remain the same with > amplitude. > > Jerry
One of the differences between a sampled signal and an analog signal is that in a digital signal can suffer from harmonic aliasing. For example: Assume that we just wanted to clip a 880 Hz note (an A) to emulate a fuzz box. Also assume that the sample rate was 8000 Hz. In the analog world, you would have harmonics of 2640 Hz (3rd harmonic) and 4400 Hz (5th Harmonic), and higher ones as well. In the digital world, lets assume that we have anti-imaging filters with a passband a little less than 4000 Hz. The third harmonic is still 2640 Hz but the fifth harmonic is going to fold around 4000 Hz (8000/2). This will alias to 8000 - 4400 = 3600 Hz. The 4400Hz component is removed by the anti-imaging filter. The 3600 Hz component is not harmonically related to the fundamental (880 Hz). It doesn't exist in the analog version. You can repeat this exercise with higher harmonics if you like. You can minimize the effect of harmonic aliasing by sampling at a much higher sample rate. Non linear signal processing in the digital domain is certainly doable but you have to account for different issues. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
Thanks,

I definately plan to sample at at least 44kHz with antialias filters to
minimize aliasing.

According to the musician the way he sets it up his black box it sounds
"grundgy" at low and high volumes.

I've been reading the sicentist and engineers guide to DSP and section
5 on decomposition and superposition seem closely related to what i'm
trying to do.

Any idea for measuring the black box impulse response in the lab.
input a step and take the derivative (AC couple) the output?

"Mook Johnson" <love2tha9s@yahoo.com> wrote in message
news:1118432613.192860.298810@o13g2000cwo.googlegroups.com...
> Thanks, > > I definately plan to sample at at least 44kHz with antialias filters to > minimize aliasing. > > According to the musician the way he sets it up his black box it sounds > "grundgy" at low and high volumes. > > I've been reading the sicentist and engineers guide to DSP and section > 5 on decomposition and superposition seem closely related to what i'm > trying to do. > > Any idea for measuring the black box impulse response in the lab. > input a step and take the derivative (AC couple) the output?
As Jerry mentioned earlier, for a non-linear device, the impluse response doesn't fully characterize it. I'm assuming your blackbox is non-linear based on that fact that it adds distortion.
"Mook Johnson" <love2tha9s@yahoo.com> wrote in 
news:1118432613.192860.298810@o13g2000cwo.googlegroups.com:

> Thanks, > > I definately plan to sample at at least 44kHz with antialias filters to > minimize aliasing. > > According to the musician the way he sets it up his black box it sounds > "grundgy" at low and high volumes. > > I've been reading the sicentist and engineers guide to DSP and section > 5 on decomposition and superposition seem closely related to what i'm > trying to do. > > Any idea for measuring the black box impulse response in the lab. > input a step and take the derivative (AC couple) the output? >
Mook, The harmonic aliasing I mentioned earlier will occur even with antialiasing filters since the non linear function that creates the aliased components are generated after the ADC conversion. 44.1 k sampling may be adequate since most of the aliased components will happen at very high frequencies. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
Al Clark wrote:

   ...

> Mook, > > The harmonic aliasing I mentioned earlier will occur even with antialiasing > filters since the non linear function that creates the aliased components > are generated after the ADC conversion. > > 44.1 k sampling may be adequate since most of the aliased components will > happen at very high frequencies.
Harmonic aliasing is minimized by filtering immediately after the non-linear operation. (Analog voice radio transmitters often use peak clippers to allow higher sideband energy without over modulating. A low-pass filter is needed after the clipper to avoid splatter i.e., out-of-band transmission.) Upsampling helps with digital non-linear processing. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;