VST equalizer demo.

Until our dedicated user library is in place you can post examples and modules here

Moderators: electrogear, exonerate

Re: VST equalizer demo.

Postby tor on Wed Aug 18, 2010 7:33 pm

OK :)

Is there a thread or some wiki info about these opcodes? I guess I will have to learn this asm stuff as well. ;)

EDIT: Found it :)
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 462
Joined: Wed Apr 14, 2010 8:52 pm

Re: VST equalizer demo.

Postby trogluddite on Wed Aug 18, 2010 8:15 pm

The basic rules are very simple - in fact reducing your algorithm into small parts that are simple enough is really the hardest part. In general...

The first arguement after the opcode is where the result will end up, the second one doesn't get changed.
So addps xmm0,xmm1 means 'add xmm1 to xmm0, put the answer in xmm0, leave xmm1 unchanged'
Apart from movaps variable,xmm? (assigning a value to a variable), you can only have variables as the second (unchanging) arguement.
You have to store a value in a variable if... 1) The value will be needed by the next sample to be processed. 2) You are changing stage(n) 3) You've run out of registers to put things in (xmm0...xmm7) 4) It is an output.

To turn an equation into a list of ASM lines, simply think how you would work out the answer if you were doing the maths on paper or on a calculator one step at a time- that will give you a pretty good idea what order to do things in.
A bit of scrap paper, or plenty of //comments are very handy too - I always keep a running list of exactly what is held in each register so that I don't get lost.
One thing to be very careful of!!... The ASM primitive will highlight variable names as correct syntax even if you spell them wrong or they don't exist - so if a bit of ASM isn't working you'll have to proof read it very carefully.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3024
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: VST equalizer demo.

Postby tor on Wed Aug 18, 2010 8:59 pm

Thank you for the nice introduction guide to the asm-world :)

Must try it soon ;)
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 462
Joined: Wed Apr 14, 2010 8:52 pm

Re: VST equalizer demo.

Postby tor on Wed Aug 18, 2010 10:13 pm

@ Disco_Steve, Andrew J or anyone with this knowledge:

The oversampling toolkit does feed two streams in the upsampler. Both operate at the host's samplerate but one is carrying the interpolated values if I understand it correct. When i process them individually i get a result after the downsample module as if it was more accurate like real oversampling. But it does not solve the nyquist problem Bootsy point at does it?

Is it really possible to change the Floating-Point Format in SM? If so... any pointers on how to do that. Disco_Steve mentioned 24Bit mantissa.. But isn't SM operating with 32bit floating point with a bit precision of 24bit?

http://en.wikipedia.org/wiki/Floating_point
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 462
Joined: Wed Apr 14, 2010 8:52 pm

Re: VST equalizer demo.

Postby Andrew J on Thu Aug 19, 2010 1:06 am

tor wrote:@ Disco_Steve, Andrew J or anyone with this knowledge:

The oversampling toolkit does feed two streams in the upsampler. Both operate at the host's samplerate but one is carrying the interpolated values if I understand it correct. When i process them individually i get a result after the downsample module as if it was more accurate like real oversampling. But it does not solve the nyquist problem Bootsy point at does it?


You can't just place a 1X rate filter after an upsampler. A state dependent filter (i.e. one that uses the last n input samples) needs to be rewritten to account for the fact that we're dealing with two input samples to the filter at each sample period. The filter has to process the first sample, shuffle it's buffer along by one sample, process the second sample and then shuffle again before the next sample period starts.

Please read the wiki on oversampling and pay particular attention to the section on "Processing At A Higher Sampling Rate".
Andrew J
smanatic
 
Posts: 616
Joined: Tue May 29, 2007 4:53 am
Location: Australia

Re: VST equalizer demo.

Postby tor on Thu Aug 19, 2010 1:04 pm

Andrew J wrote:
tor wrote:@ Disco_Steve, Andrew J or anyone with this knowledge:

The oversampling toolkit does feed two streams in the upsampler. Both operate at the host's samplerate but one is carrying the interpolated values if I understand it correct. When i process them individually i get a result after the downsample module as if it was more accurate like real oversampling. But it does not solve the nyquist problem Bootsy point at does it?


You can't just place a 1X rate filter after an upsampler. A state dependent filter (i.e. one that uses the last n input samples) needs to be rewritten to account for the fact that we're dealing with two input samples to the filter at each sample period. The filter has to process the first sample, shuffle it's buffer along by one sample, process the second sample and then shuffle again before the next sample period starts.

Please read the wiki on oversampling and pay particular attention to the section on "Processing At A Higher Sampling Rate".


Hey :)

Thank you for responding to my posts. I kind of understand what you mean... I think. But still not quite. The way I used the upsampling is just like you did in your example in the tutorial. But that is wrong i understand. I could not quite get it to make sense either. I believe I can hear a difference to the better in the highest frequencies. But that may be just imagination.. he he. Wonder if I can wrap my head around this...

Do you have any more hints?

BTW... the aliasing/ warp effect i do see in many EQs (in different amount though) if I understand and use VSTpluginanalyzer correct. If the program material used does not contain info over 20000 does it matter? Or do the IIR filters generate noise above 20k?
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 462
Joined: Wed Apr 14, 2010 8:52 pm

Re: VST equalizer demo.

Postby tor on Thu Aug 19, 2010 2:45 pm

Something like this? but with some recursive fx in between in and out when i1 and i2 is streams from the oversampling kit?
Attachments
osint.osm
(2.27 KiB) Downloaded 93 times
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 462
Joined: Wed Apr 14, 2010 8:52 pm

Re: VST equalizer demo.

Postby MichaelBenjamin on Thu Aug 19, 2010 2:58 pm

you can write the counter in one line:
index = (index+1)&(index<2);//counts from 0-1
as for the rest it looks like an overly complicated 1 sample delay, but i also did not understand what andrew meant with the recursive and such.
User avatar
MichaelBenjamin
smaniac
 
Posts: 1439
Joined: Thu Jul 12, 2007 3:26 pm

Re: VST equalizer demo.

Postby tor on Thu Aug 19, 2010 3:23 pm

Thank you for that little optimizer.. but there is something else not quite right here. I tried it on a highpass now and I got a little strange frequency respone. The red is normal 1*rate and the blue is 2*rate with this implementation.

graph.png
graph.png (44.71 KiB) Viewed 744 times
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 462
Joined: Wed Apr 14, 2010 8:52 pm

Re: VST equalizer demo.

Postby tor on Thu Aug 19, 2010 3:28 pm

I guess it shuold be index = (index+1)&(index<1);
instead of: index<2);

It is only two indexes. When nr 2 (index1) is reached go back to nr1(index0)

:)
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 462
Joined: Wed Apr 14, 2010 8:52 pm

Re: VST equalizer demo.

Postby tor on Thu Aug 19, 2010 3:53 pm

Am I only processing every second sample with this osint.osm?

here is the high pass example:
Attachments
highpasstestOS.osm
(17.11 KiB) Downloaded 93 times
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 462
Joined: Wed Apr 14, 2010 8:52 pm

Re: VST equalizer demo.

Postby tor on Thu Aug 19, 2010 4:37 pm

osint.osm does only process every second sample from each of the inputs mix them and then separate every second sample to the outputs. actually the opposite of what i try to do.... :S

@ Andrew J: Heeeeeelp!!! :blush: Ehm.. I also see now that I have not done what you describe in the tutorial. But atm I can not understand how to do this.
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 462
Joined: Wed Apr 14, 2010 8:52 pm

Re: VST equalizer demo.

Postby Andrew J on Fri Aug 20, 2010 12:23 am

Hi tor, sorry to leave you hanging like this - but I'm ill at the moment. I will try and write up a bit of a tutorial on this tomorrow.

-Andrew
Andrew J
smanatic
 
Posts: 616
Joined: Tue May 29, 2007 4:53 am
Location: Australia

Re: VST equalizer demo.

Postby tor on Fri Aug 20, 2010 1:04 am

No need for you to be sorry for other things than your health. ;)

You are a BIG contributor in here and I am thankful for that. :)

Best wishes and hope you recover soon.
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 462
Joined: Wed Apr 14, 2010 8:52 pm

Re: VST equalizer demo.

Postby sunsynth on Fri Aug 20, 2010 9:00 am

Andrew - I hope U get well soon!

Walter
User avatar
sunsynth
smaniac
 
Posts: 1494
Joined: Mon Sep 11, 2006 3:27 pm
Location: HH - Made in Germany

PreviousNext

Return to Examples

Who is online

Users browsing this forum: No registered users and 1 guest

cron