[music-dsp] RE: [vst-plugins] Tube Amp Modeling

Rob Coker PythagDevpt at starband.net
Tue Jan 29 00:18:35 EST 2002


What they did that was considered by the patent office to be inventive was
put the upsampling/dnsampling immediately around the non-linear unit and not
do "all" the processing at the higher frequency.

I read their claims though.  They claimed the whole world and it would never
hold up in court as evidenced by the fact that half a dozen other companies
have modelling combo amps (which was one of their claims).

Rob Coker
Pythagorean Development, Inc

-----Original Message-----
From: owner-music-dsp at shoko.calarts.edu
[mailto:owner-music-dsp at shoko.calarts.edu]On Behalf Of Sean Costello
Sent: Monday, January 28, 2002 5:30 PM
To: music-dsp at shoko.calarts.edu
Subject: [music-dsp] RE: [vst-plugins] Tube Amp Modeling


Hi:

Just thought I'd mention that the upsampling/nonlinear
processing/decimation process that Line 6 performs was also descibed in Hal
Chamberlin's Musical Applications of Microprocessors (1985 edition), pg.
120:

"One modification technique that does not always work well when done
digitally is nonlinear waveshaping. Since clipping and other waveshape
distortions are likely to generate strong high-frequency harmonics, alias
distortion can become a problem. If necessary, the distortion operation can
be done at a much higher sample rate at which the alias distortion is less
of a problem, then digitally low-pass filtered to less than half of the
system sample rate, and finally resampled."

There you have it: evidence of Prior Art for
upsampling/distortion/filtering/resampling.

Sean Costello

> Date: Mon, 28 Jan 2002 13:37:16 -0600
> From: "Rob Coker" <PythagDevpt at starband.net>
> Subject: [music-dsp] RE: [vst-plugins] Tube Amp Modeling
>
> I don't think you realize how difficult a problem this is.  I did my
Masters
> thesis in EE on this - just trying to model one setting of an existing
amp -
> and didn't get what I consider to be a satisfactory answer.
>
> With that said, it all depends on how exact you want to be.  Your first
> function is fine, but is simplistic in terms of a real tube - any
> non-frequency dependent transfer function is.  Any non-linear function
> though will generate harmonics which will alias.  How to deal with that is
> not easy.  Line 6 (a guitar processor mfg) upsamples, does the non-linear
> processing, then decimation filters.  You can read their patent for the
> details.  They do, though, have a patent for the "process."
>
> The long and the short of it is that there is no simple answer to what you
> are asking, if you want really good results.
>
> Rob Coker
> Pythagorean Development, Inc
>
> - -----Original Message-----
> From: VST PlugIns [mailto:vst-plugins at lists.steinberg.net]On Behalf Of
> Bojidar Todorov
> Sent: Monday, January 28, 2002 12:28 PM
> To: VST PlugIns
> Subject: [vst-plugins] Tube Amp Modeling
>
>
> Hello,
>
> I was wondering which is the best way to implement a
> software based model of a tube amplifier.
> I have currently three models in mind:
>
> 1. Use a nonlinear function (wave shaper) to model the
> amp (my current model uses f(x) =
> (1+k)*x/(1+k*abs(x)), followed by
>  an 3-band equalizer followed by a low-pass filter to
> model the speaker(s):
>
>
>  --> Non-linear block -> 3-badn EQ --> LP filter
>
>
> 2. Use separate modules to emulate the pre-amp and the
> power amp:
>
>
> - -> preamp (non-linear block) --> 3-band EQ --> power
> amp (non-linear) --> speaker(s) (LP filter)
>
>
> 3. Use a very granular model (like to emulate each
> tube separately):
>
>
> - --> preamp tube 1 --> preamp tube 2 --> preamp tube N
> - --> 3-band EQ --> power tube 1 --> power tube 2 -->
> power tube M -->
> speaker (LP filter)
>
>
> This one will take a long time to implement and I am
> not sure such a granulation is needed.
>
>
> My second problem is how to avoid the aliasing caused
> by the non-linear modules.
>
>
> Your input will be appreciated.
>
> Thanks,
> Bojidar
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Great stuff seeking new owners in Yahoo! Auctions!
> http://auctions.yahoo.com
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list <vst-plugins at lists.steinberg.net>.
> To unsubscribe, E-mail to: <vst-plugins-off at lists.steinberg.net>
> To switch to the DIGEST mode, E-mail to
> <vst-plugins-digest at lists.steinberg.net>
> To switch to the INDEX mode, E-mail to
> <vst-plugins-index at lists.steinberg.net>
> Send administrative queries to  postmaster at steinberg.de
>
>
> dupswapdrop -- the music-dsp mailing list and website: subscription info,
> FAQ, source code archive, list archive, book reviews, dsp links
> http://shoko.calarts.edu/musicdsp/
>
> ------------------------------
>
> Date: Mon, 28 Jan 2002 12:15:47 -0800
> From: "koen vos" <koen.vos at globalipsound.com>
> Subject: RE: [music-dsp] Generating a sine waveform
>
> Tomas,
> the problem comes from not adding dither to your sine wave before going to
> fixed-point.
> If you look at the spectrum of your output signal, you'll see that it
> contains a lot of other tones besides your main peak. These other
sinewaves
> sit at frequencies not harmonically related to your sinewave (except for
> integer wavelength), and are maybe 40-50 dB lower in level. Dithering
> replaces these tones by a pleasant-sounding noise floor.
> koen.
>
>
>
> > -----Original Message-----
> > I know this sounds ridiculous, but I have problems generating a GOOD
> > sounding sinewave. The distortion is well heard especially in case of
> > low volume and I don't think this is (completely) caused by low bit
> > resolution for soft sounds. It also seems to me that sounds at
frequencies
> > that produce waveforms with integer wavelength are OK (f =
> > 260.94674556213017751479289940828 for instance) and the others (261.6)
> > are very distorted. Here is the code I used:
> >
> >                 dout = sinl(((long double)i)*tune)*35.0;
> >                 out = (__int16)dout;
>
>
> dupswapdrop -- the music-dsp mailing list and website: subscription info,
> FAQ, source code archive, list archive, book reviews, dsp links
> http://shoko.calarts.edu/musicdsp/
>
> ------------------------------
>
> Date: Mon, 28 Jan 2002 12:36:51 -0800
> From: "Jon Watte" <hplus at mindcontrol.org>
> Subject: RE: [music-dsp] Generating a sine waveform
>
>
> >                 dout = sinl(((long double)i)*tune)*35.0;
> >                 out = (__int16)dout;
>
> 1) Some math libraries do less well when your phase is (much)
> beyond -pi to pi (or -2pi to 2pi). You might instead want
> to keep a phase accumulator and subtract 2pi everytime you
> go above pi.
>
> 2) The bit resolution with a swing of 35 (out of 32768) is
> about 6 bits, or down at -60 dB. If you amplify this so that
> you can clearly hear it, your quantization noise is going to
> be pretty horrible (worse than an 8-bit full-swing sample).
>
> Try calibrating your output so that a full-swing sample plays
> at your preferred full listening level, and then generate the
> low-volume sine and listen to it at the same volume setting,
> which will eliminate quantization noise from a comparision
> (or, rather, make it play on a level field).
>
> Cheers,
>
> 			/ h+
>
>
> dupswapdrop -- the music-dsp mailing list and website: subscription info,
> FAQ, source code archive, list archive, book reviews, dsp links
> http://shoko.calarts.edu/musicdsp/
>
> ------------------------------
>
> Date: Mon, 28 Jan 2002 12:36:51 -0800
> From: "Jon Watte" <hplus at mindcontrol.org>
> Subject: RE: [music-dsp] VST Default User Interface
>
> Note that dbToString will give you "-inf" db for the value 0.0,
> and "0 db" for the value 1.0, because it treats the input as a
> scaler. The value that actually gets passed to your setParameter
> is in the range [0,1]. If you want a different display, change
> the getParameterDisplay() function.
>
> You can easily verify this by putting a breakpoing inside
> setParameter() and getParameterDisplay() and inspecting the
> arguments and values in the debugger.
>
> Cheers,
>
> 			/ h+
>
>
> > -----Original Message-----
> > From: owner-music-dsp at shoko.calarts.edu
> > [mailto:owner-music-dsp at shoko.calarts.edu]On Behalf Of Chris H
> > Sent: Sunday, January 27, 2002 3:13 PM
> > To: music-dsp at shoko.calarts.edu
> > Subject: [music-dsp] VST Default User Interface
> >
> >
> > Hi Guys,
> >
> > I've implemented my plugin (with gratuitous thanks to
> > Bram) but I've got a problem.
> >
> > When I call up the plugin I want the values that are
> > displayed for the threshold to be from 1 to 100.  I
> > thought this would be consist with the fact that
> > values are sweep from 0.0 to 1.0.  However I've found
> > that the values go from -infinity to 0.
> >
> > Is there anyway I can get them to go from 1 to 100?
> >
> > Here are the get and set parameter statements
> >
> > ---
> >
> > void Grunge::setParameter(long index, float value)
> > {
> > 	fThreshold = value;
> >
> > }
> >
> > void Grunge::getParameter(long index)
> > {
> > 	return fThreshold;
> > }
> >
> >
> > void Grunge::getParameterName(long index, char *label)
> > {
> > 	strcpy(label, "  Threshold  ");
> > }
> >
> > void Grunge::getParameterDisplay(long index, char
> > *text)
> > {
> > 	dB2string(fThreshold, text);
> > }
> >
> > void Grunge::getParameterLabel(long index, char
> > *label)
> > {
> > 	strcpy(label, "      ");
> > }
> >
> > ---
> >
> > Is there anyway of having a specified range as in the
> > Cakewalk DX Wizard?
> >
> > Chris
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Great stuff seeking new owners in Yahoo! Auctions!
> > http://auctions.yahoo.com
> >
> > dupswapdrop -- the music-dsp mailing list and website: subscription
info,
> > FAQ, source code archive, list archive, book reviews, dsp links
> > http://shoko.calarts.edu/musicdsp/
> >
>
> dupswapdrop -- the music-dsp mailing list and website: subscription info,
> FAQ, source code archive, list archive, book reviews, dsp links
> http://shoko.calarts.edu/musicdsp/
>
> ------------------------------
>
> Date: Mon, 28 Jan 2002 12:36:50 -0800
> From: "Jon Watte" <hplus at mindcontrol.org>
> Subject: RE: [music-dsp] applying an FIR filter
>
> Obviously not. I drew the conclusion from the question that the
> requester really wanted to know about processing latency, rather
> than the rather obvious observation that you can't run a filter
> on a single sample in isolation. Sorry if I confused the issue.
>
> Cheers,
>
> 			/ h+
>
> > where the input is not known ahead of time, no one of them got
> > filtered alone.
>
>
> dupswapdrop -- the music-dsp mailing list and website: subscription info,
> FAQ, source code archive, list archive, book reviews, dsp links
> http://shoko.calarts.edu/musicdsp/
>
> ------------------------------
>
> Date: Mon, 28 Jan 2002 21:59:31 +0100
> From: Tomas Kubec <sales at klicek.cz>
> Subject: RE: [music-dsp] Generating a sine waveform
>
> Hi!
> > There's your problem. The sin function returns values in the range [-1,
1],
> > you multiply that by 35.0 and then write it out as a 16 bit integer
value.
> >
> > You maximum output value is 35 which is slightly larger than 32 which is
> > 5 bits. So you are only using 6 of the available 16 bits.
> >
> > Try replacing the 35.0 with 32000.0. This will result in a much louder
> > signal but the noise and distortion will be much lower.
>
> I'm not sure. I know it would be easier with loud wave, but I also
> need soft ones. Decent sounding low volume sines can be generated  - I've
> heard them and seen the sample (looked alike mine, but sounded much
> better:-( ). Maybe it is caused
> by some dithering or so. But even if this would be needed why sines
> with integer wavelength sound good and sines with fractional
> wavelength don't? In other words why low bit resolution distortion would
affect
> only some frequencies? This doesn't make sense to me. I also tried to
> implement rounding and something like dithering (or spreading the
> round-off error) and it didn't (much) help. Does anybody know, what
> I'm doing wrong? Please help!
>
>
> >>From a quick look at your code, I think your main problem is that your
phase
> > value is outside the range [-2*PI,+2*PI]. If you are using a
floating-point
> > phase value, this will result in loss of precision as the phase value
> > travels away from 0
>
> I tried this and it perhaps helped a bit, but the main portion of
> distortion remains  :-(.
>
> Tomas
>
>
>
> dupswapdrop -- the music-dsp mailing list and website: subscription info,
> FAQ, source code archive, list archive, book reviews, dsp links
> http://shoko.calarts.edu/musicdsp/
>
> ------------------------------
>
> End of music-dsp-digest V1 #1365
> ********************************
>
>
> dupswapdrop: the music-dsp mailing list and website
> http://shoko.calarts.edu/music-dsp



dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/


dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/




More information about the music-dsp mailing list