DSPRelated.com
Forums

Would this approach be possible (for analog modeling)?

Started by Rock Lobster July 30, 2007
Hello,

so far I didn't read anything technical about analog modeling, but I
thought about some very simple and straight-forward approach and I wonder
if that would work (at least to a semi-satisfying level) or if this would
result in a sonic catastrophy :)

How about creating a white-noise sound, which gradually gains volume from
0 to 10 (or maybe to 11? :), and then running this sound through a guitar
amplifier. The amp would be set to a good sounding distorted tone, but the
equalizer should maybe left flat.

Then the whole thing would be recorded and analyzed with FFT. The spectrum
for each volume would be saved in RAM.

Then, a random sound (preferably a guitar signal) would be played and also
FFTed, and the stuff we saved in RAM would be applied to the signal,
meaning that every frequency's volume would be changed according to the
"recorded" sound.

Would that work? The distortion level could then be altered just by
changing the input volume, and an equalizer could be built on top.

What do you think?
Rock Lobster
On 30 Jul, 08:11, "Rock Lobster" <em...@christian-gleinser.de> wrote:
> Hello, > > so far I didn't read anything technical about analog modeling, but I > thought about some very simple and straight-forward approach and I wonder > if that would work (at least to a semi-satisfying level) or if this would > result in a sonic catastrophy :) > > How about creating a white-noise sound, which gradually gains volume from > 0 to 10 (or maybe to 11? :), and then running this sound through a guitar > amplifier. The amp would be set to a good sounding distorted tone, but the > equalizer should maybe left flat. > > Then the whole thing would be recorded and analyzed with FFT. The spectrum > for each volume would be saved in RAM. > > Then, a random sound (preferably a guitar signal) would be played and also > FFTed, and the stuff we saved in RAM would be applied to the signal, > meaning that every frequency's volume would be changed according to the > "recorded" sound. > > Would that work? The distortion level could then be altered just by > changing the input volume, and an equalizer could be built on top.
What do you mean, "work"? Do you ask whether this can be done in practice using guitar amps and recorders? Or do you ask if this would produce a pleasant sound? If you ask about the practical wiring of the experiment, that's a question for technicians who know the type of gear you have available. As for the data processing, you have basically designed a filtering system where you use a random (measured) filter response. I see no principal reason why that won't work. As for sound quality, that's anybody's guess. Rune
Well my question was:

>> I wonder if that would work (at least to a semi-satisfying level) >> or if this would result in a sonic catastrophy :)
So indeed, I already know that this would work from a technical view, because it's just some multiplications. But the question is, would this result in an acceptable sound, or better said, would the processed signal sound at least somehow similar to the same signal run through the amp, or would this sound completely different?
"Rock Lobster" <email@christian-gleinser.de> wrote in message 
news:etKdnem5FZVgHTDbnZ2dnUVZ_hOdnZ2d@giganews.com...
> Hello, > > so far I didn't read anything technical about analog modeling, but I > thought about some very simple and straight-forward approach and I wonder > if that would work (at least to a semi-satisfying level) or if this would > result in a sonic catastrophy :) > > How about creating a white-noise sound, which gradually gains volume from > 0 to 10 (or maybe to 11? :), and then running this sound through a guitar > amplifier. The amp would be set to a good sounding distorted tone, but the > equalizer should maybe left flat. > > Then the whole thing would be recorded and analyzed with FFT. The spectrum > for each volume would be saved in RAM. > > Then, a random sound (preferably a guitar signal) would be played and also > FFTed, and the stuff we saved in RAM would be applied to the signal, > meaning that every frequency's volume would be changed according to the > "recorded" sound. > > Would that work? The distortion level could then be altered just by > changing the input volume, and an equalizer could be built on top. >
There are methods that use white noise to model nonlinear devices but I don't know much about it. I remember finding a pdf about how to do it a long time ago but don't remember to much about it. Essentially because the device doesn't follow the superposition law you cannot decompose a signal into simpiler ones and then put them back together. For example, say you input f(t) = cos(wt) + cos(qt) then its not the same as first inputing cos(wt) and then cos(qt) and then adding the results of the device to get f(t). The reason is because the amplifier is not linear. Now, there was some heavy math in that paper that dealt with what they called volterra kernels and how to use them to model such things approximately using white noise. I'm sure if you google you'll be able to find some more info.
BTW, heres a link

http://en.wikipedia.org/wiki/Volterra_series 


On 30 Jul, 11:31, "Rock Lobster" <em...@christian-gleinser.de> wrote:
> Well my question was: > > >> I wonder if that would work (at least to a semi-satisfying level) > >> or if this would result in a sonic catastrophy :) > > So indeed, I already know that this would work from a technical view, > because it's just some multiplications. But the question is, would this > result in an acceptable sound, or better said, would the processed signal > sound at least somehow similar to the same signal run through the amp, or > would this sound completely different?
Ah. If you have access to matlab or somethind similar (octave or scilab), try to filter a recorded signal with a FIR filter consisting of white nois (i.e. random coefficients.) In matlab, the code would be something like N = 10000; % Number of coefficients in filter x = wavread('sound.wav'); % Fors simplicity, mono sound h = randn(N,1); % Filter consisting of white noise y = filter(h,1,x); and then play the sound y or store it to a .wav file. If that sounds bad, the added guitar amp will probably not improve on things. Rune
Jon Slaughter wrote:
> "Rock Lobster" <email@christian-gleinser.de> wrote in message > news:etKdnem5FZVgHTDbnZ2dnUVZ_hOdnZ2d@giganews.com... >> Hello, >> >> so far I didn't read anything technical about analog modeling, but I >> thought about some very simple and straight-forward approach and I wonder >> if that would work (at least to a semi-satisfying level) or if this would >> result in a sonic catastrophy :) >> >> How about creating a white-noise sound, which gradually gains volume from >> 0 to 10 (or maybe to 11? :), and then running this sound through a guitar >> amplifier. The amp would be set to a good sounding distorted tone, but the >> equalizer should maybe left flat. >> >> Then the whole thing would be recorded and analyzed with FFT. The spectrum >> for each volume would be saved in RAM. >> >> Then, a random sound (preferably a guitar signal) would be played and also >> FFTed, and the stuff we saved in RAM would be applied to the signal, >> meaning that every frequency's volume would be changed according to the >> "recorded" sound. >> >> Would that work? The distortion level could then be altered just by >> changing the input volume, and an equalizer could be built on top. >> > > > There are methods that use white noise to model nonlinear devices but I > don't know much about it. I remember finding a pdf about how to do it a long > time ago but don't remember to much about it. Essentially because the device > doesn't follow the superposition law you cannot decompose a signal into > simpiler ones and then put them back together. > > For example, say you input f(t) = cos(wt) + cos(qt) then its not the same as > first inputing cos(wt) and then cos(qt) and then adding the results of the > device to get f(t). The reason is because the amplifier is not linear. > > Now, there was some heavy math in that paper that dealt with what they > called volterra kernels and how to use them to model such things > approximately using white noise. I'm sure if you google you'll be able to > find some more info. > > >
Another way to put this is that the FFT is a mathematical tool that is handy for analyzing linear systems. Distortion in a guitar amp is a nonlinear phenomenon, so you can't use the FFT directly to analyze distortion. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
Tim Wescott wrote:

> Another way to put this is that the FFT is a mathematical tool that is > handy for analyzing linear systems. Distortion in a guitar amp is a > nonlinear phenomenon, so you can't use the FFT directly to analyze > distortion.
That's odd. I would have thought that FFT is the foremost tool for detecting and analysing non-linearities. Put a sine through your system and look at the spectrum of the output (to compute THD, for example).
Andor wrote:
> Tim Wescott wrote: > >> Another way to put this is that the FFT is a mathematical tool that is >> handy for analyzing linear systems. Distortion in a guitar amp is a >> nonlinear phenomenon, so you can't use the FFT directly to analyze >> distortion. > > That's odd. I would have thought that FFT is the foremost tool for > detecting and analysing non-linearities. Put a sine through your > system and look at the spectrum of the output (to compute THD, for > example). >
You're correct, of course. A stable, linear, time-invariant system will have an output signal who's spectral components are all in the spectrum of the input signal. A stable, linear, time-varying signal will have spectral components that aren't in the input signal, but if the time variation is periodic then the spectral components will be easy to predict and check against. A nonlinear system will, in general, add components to the spectrum of the input signal. So you can, indeed, use this as a test as you described. What I was _thinking_, is that you can make a system model with Fourier analysis (and to some extent numerically with the FFT) for a linear, time invariant system. With a bit more difficulty, you can model linear, time varying systems this way. But without bending over backwards (like, with Volterra series) you can't use Fourier analysis to analyze nonlinear systems. Even _with_ bending over backwards I don't think you could adequately simulate the distortion in a guitar amp this way. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
On 30 Jul, 18:26, Andor <andor.bari...@gmail.com> wrote:
> Tim Wescott wrote: > > Another way to put this is that the FFT is a mathematical tool that is > > handy for analyzing linear systems. Distortion in a guitar amp is a > > nonlinear phenomenon, so you can't use the FFT directly to analyze > > distortion. > > That's odd. I would have thought that FFT is the foremost tool for > detecting and analysing non-linearities. Put a sine through your > system and look at the spectrum of the output (to compute THD, for > example).
You don't use the DFT as such, but use coherence estimates which are computed by means of the FFT. Bendat wrote a book on nonlinear system analysis which gives all the details. Rune