Amplifier Simulation?

Sound synthesis techniques, DSP and related mathematics

Moderators: electrogear, Nu Audio Science, exonerate, oddson

Re: Amplifier Simulation?

Postby hansdump on Mon Jan 18, 2010 1:14 am

...asymmetries make the difference!!!


If somebody wants to start with a diode in here just take the shockleys diode model and add about 0.6V there you will see!

http://en.wikipedia.org/wiki/Diode_mode ... iode_model

Vd is your input, so: Vd=0.65+input

you should not forget applying hp filtering and clipping at the output. Of course you can do clipping at certain values before and after. Or you try a curvefit of some other models 3:)

input-->diode-->hp-->clipping

If you don´t take the 0.6 offset, you will hear nothing... this was a big aha-moment for me in understanding analog modeling (and if one rises a step...one sees, that the next step is much more huge).

Great events come from little cause.

So far from here...

PS: The most significant characteristics of transformers...as I know... most people call it cross-over distortion.
User avatar
hansdump
essemist
 
Posts: 94
Joined: Mon Feb 09, 2009 2:26 am

Re: Amplifier Simulation?

Postby MegaHurtz on Tue Jan 19, 2010 2:51 pm

We can always trust you to get someting new on the table.
Let`s have a look :)
User avatar
MegaHurtz
smaniac
 
Posts: 1023
Joined: Mon Aug 11, 2008 5:29 pm
Location: Eindhoven/Netherlands

Re: Amplifier Simulation?

Postby MegaHurtz on Tue Jan 19, 2010 3:00 pm

Oopfhh, Always trusted the best analogue to the RC filter was the moving average.
This would be quite the undertaking :D
User avatar
MegaHurtz
smaniac
 
Posts: 1023
Joined: Mon Aug 11, 2008 5:29 pm
Location: Eindhoven/Netherlands

Re: Amplifier Simulation?

Postby hansdump on Tue Jan 19, 2010 11:26 pm

http://en.wikipedia.org/wiki/Low-pass_filter

check only the Discrete-time realization!!

There you will find:

// Return RC low-pass filter output samples, given input samples,
// time interval dt, and time constant RC
y[i] := y[i-1] + α * (x[i] - y[i-1])

take a control and wire it to alpha! 0...1

if someone does not understand here my out of the box maybe buggy sm code:

streamin x;
streamin alpha;
streamout y;

float y1;

y= y1 + alpha * (x - y1);
y1=y;


Your first realtime digital simulation of a RC Lowpass filter! Great 3:)

H.
User avatar
hansdump
essemist
 
Posts: 94
Joined: Mon Feb 09, 2009 2:26 am

Re: Amplifier Simulation?

Postby aliasant on Wed Jan 20, 2010 8:26 am

hansdump wrote:if someone does not understand here my out of the box maybe buggy sm code:

streamin x;
streamin alpha;
streamout y;

float y1;

y= y1 + alpha * (x - y1);
y1=y;

Your first realtime digital simulation of a RC Lowpass filter! Great 3:)

H.



Thought I recognized this.
Its just the old trusty lowpass filter we all have.

The code vesion I have look like this:
Code: Select all
streamin in;
streamin cutoff;
streamout LP;

LP=LP+((in-LP)*cutoff);


And here is an ASM version:

Code: Select all
streamin in;
streamin cutoff;
streamout LP;

movaps xmm1,in;
subps xmm0,LP;
mulps xmm0,cutoff;
addps xmm0,LP;

movaps LP,xmm0;
It's never to late to be late.....

If my posts misses characters like t, h, u or others its only because my CRAPPY MICROSOFT KEYBOARD needs a hammer to type those keys. This is a new Microsoft Sidewinder X6! :(
User avatar
aliasant
smunatic
 
Posts: 2009
Joined: Sat Dec 30, 2006 5:49 pm
Location: Sweden

Re: Amplifier Simulation?

Postby Tzarls on Wed Jan 27, 2010 9:26 pm

A small addition to this topic. I was playing with the idea of waveshaping and came to this, a very basic OD + Power AMP setup, with some filters thrown in (Toolbox Filters by Myco) to remove harshness.

Amp Sim Test.rar
(1.25 MiB) Downloaded 85 times


As I said before, everything here is just a couple of waveshapers to simulate the transfer curve of an OD (2 stages) and a power amp (2 stages) and some eq-ing. No tone stack, no cab resonator, nada. Let me know what you think.
Tzarls
smanatic
 
Posts: 582
Joined: Tue Nov 11, 2008 5:43 am
Location: Peru

Re: Amplifier Simulation?

Postby MegaHurtz on Wed Jan 27, 2010 9:36 pm

User avatar
MegaHurtz
smaniac
 
Posts: 1023
Joined: Mon Aug 11, 2008 5:29 pm
Location: Eindhoven/Netherlands

Re: Amplifier Simulation?

Postby Tzarls on Wed Jan 27, 2010 9:41 pm

Yes, tested you app today.... it acts a little like an upward compressor, right? Very much like the poweramp transfer curve stage, to some degree. I found that using a transfer curve you can achieve that in a very effective way. Have you tried my dll? I´d like you opinion.
Tzarls
smanatic
 
Posts: 582
Joined: Tue Nov 11, 2008 5:43 am
Location: Peru

Re: Amplifier Simulation?

Postby MegaHurtz on Wed Jan 27, 2010 10:25 pm

I like the sound :D , But it`s a bit of a fiddle to get it out.
since all the knobs get to 0. Never knowing what your default is.
I would tweak it a little so you can go up from your default, into distortion.
maybe normalising some stuff so you get close to a consistant density in sound level.
User avatar
MegaHurtz
smaniac
 
Posts: 1023
Joined: Mon Aug 11, 2008 5:29 pm
Location: Eindhoven/Netherlands

Re: Amplifier Simulation?

Postby Tzarls on Thu Jan 28, 2010 12:02 am

Yes, well, it´s just a test and needs maybe lots of work to make it flexible enough, but glad you like it´s sound. I wanted to know if it was possible to get some overdrive using just transfer curves.... I think I´ll send some sine waves into some of my amps and then plot the output to make some more curves and see what happens.
Tzarls
smanatic
 
Posts: 582
Joined: Tue Nov 11, 2008 5:43 am
Location: Peru

Re: Amplifier Simulation?

Postby Tzarls on Tue Feb 02, 2010 9:19 pm

Here´s another version of the above experiment. Now it´s 4x oversampled, and has a switch to add even harmonics to the sound. It also sports the assymetrical 50-50 duty cycle characteristics and some kind of sag emulation. Gain controls (OD1 and OD2) go from 0 (silence) to full distortion.(4). Again no cab resonators, just a filter at the end of the chain to emulate the speaker response. To me it sound good when overdriven, but I don´t like the clean sounds (yet). I could say this one sound maybe a little more processed. Would like to hear your opinions.
Amp Sim Test 05.rar
(1.29 MiB) Downloaded 120 times
Tzarls
smanatic
 
Posts: 582
Joined: Tue Nov 11, 2008 5:43 am
Location: Peru

Re: Amplifier Simulation?

Postby robrokken on Tue Mar 09, 2010 7:21 am

What is the sag based on? env follower?
robrokken
essemist
 
Posts: 100
Joined: Wed Jul 22, 2009 5:57 am

Re: Amplifier Simulation?

Postby Tzarls on Tue Mar 09, 2010 4:06 pm

Yes. It kind of push back when you attack the strings hard. Not the most elegant thing, and I´m not sure if I like it yet. :)
Tzarls
smanatic
 
Posts: 582
Joined: Tue Nov 11, 2008 5:43 am
Location: Peru

Re: Amplifier Simulation?

Postby robrokken on Tue Mar 09, 2010 4:17 pm

Moderation is the key lol, yeah, distortion sounds real good... :)
robrokken
essemist
 
Posts: 100
Joined: Wed Jul 22, 2009 5:57 am

Re: Amplifier Simulation?

Postby Tzarls on Tue Mar 09, 2010 4:30 pm

Thanks. I like it too, althought sometimes I find it a little fizzy. I wanted to try some cabinet simulation after the amp, and got carried away with the convolution thing. Once I figure out how to make the conv work, I´ll return to this thing. I´ve got a couple of ideas that might make it more interesting, but we´ll see.
Tzarls
smanatic
 
Posts: 582
Joined: Tue Nov 11, 2008 5:43 am
Location: Peru

PreviousNext

Return to Sound

Who is online

Users browsing this forum: No registered users and 1 guest