From the original SynthMaker forum (2004–2014), with its members’ names and dates.
tor ·
Im trying to put my first EQ together. All bands are 8 pole. I used Shifrin's RBJ modules and tweaked them to get a more silky sound and hopefully to minimize quantization errors.
So far it is a CPU consumer of dimensions. But I would be glad if some of you guys gave it a shot and tell me what you think of the sound of this baby. I am most of all concerned about how it affects the highest frequencies. Is it only my wish-thinking that like the sound up there or am I on to something here?
Do not mind the GUI
Please let me know what you think 😇
aliasant ·
tor wrote: Im trying to put my first EQ together. All bands are 8 pole. I used Shifrin's RBJ modules and tweaked them to get a more silky sound and hopefully to minimize quantization errors.
So far it is a CPU consumer of dimensions. But I would be glad if some of you guys gave it a shot and tell me what you think of the sound of this baby. I am most of all concerned about how it affects the highest frequencies. Is it only my wish-thinking that like the sound up there or am I on to something here?
Do not mind the GUI
Please let me know what you think 😇
That actually sounds very good!
Nice work
tor ·
Coming from you, I take that as a big compliment. 😀
I guess I have to check if I really managed to reduce quantisation errors as well. And then there is optimization of the plug that is the biggest challenge for me.
Thank you!
bootsy ·
"8 pole"? Ain't this standard biquads?
If you are concerned with the sound in the top frequency range then you should avoid the curve warping near Nyquist frequency. Both, shelving and LP filter has this behaviour in your implementation.
peace,
bootsy
tor ·
If you serie connect 4 biquads you get a 8-pole right? Or have I misunderstood something? Would I call this something else than if I actually had a function with 8 poles?
That said... if it is a little warping i do not actually care. My concern is EQ how it sounds in the high frequencies and that it should be quite accurate due to the data showed in the GUI. My impression is that alot of EQs sound a bit harsh and metallic when pushed hard. Even on high quality program material. Probably a result of quantization errors. May be my try to workaround this issue create some minor warping. But I guess it is not that significant.
What do you use to measure the warping Bootsy? I can not see any in VSTpluginAnalyzer... 🙁
Do you find warping in the peak filters as well? If not that's strange.
🙂
Thank you for the feedback Bootsy
bootsy ·
tor wrote: If you serie connect 4 biquads you get a 8-pole right?
Yes but why 8-pole? You can get the same curves with just one biquad and the cascaded filter design won't give you a better phase nor a better impulse response - but correct me if I'm wrong of course.
tor wrote: What do you use to measure the warping Bootsy? I can not see any in VSTpluginAnalyzer... 🙁
Do you find warping in the peak filters as well? If not that's strange.
The VST Analyzer clearly shows the warping for both, LP and peak filters (measured at 44.1kHz). This is one of the major problems of digital EQs which are not oversampled.
tor ·
bootsy wrote:
tor wrote: If you serie connect 4 biquads you get a 8-pole right?
Yes but why 8-pole? You can get the same curves with just one biquad and the cascaded filter design won't give you a better phase nor a better impulse response - but correct me if I'm wrong of course.
tor wrote: What do you use to measure the warping Bootsy? I can not see any in VSTpluginAnalyzer... 🙁
Do you find warping in the peak filters as well? If not that's strange.
The VST Analyzer clearly shows the warping for both, LP and peak filters (measured at 44.1kHz). This is one of the major problems of digital EQs which are not oversampled.
Why 8-pole:
Because it opens up for more creative tweaking due to sound and quant-errors.
VSTanalyzer:
Guess I have to zoom in some more. Actually never thought of that. Stupid me 😀 Thanks!
tor ·
I just deleted two posts... me crying over green trouble. I have sorted it out now. Kind of... not really sure what caused trouble but it is gone. Almost 🙂
tor ·
@ Bootsy: I really cant see the warping you refer to. What exactly do you do in VSTanalyzer?
I thought you meant ripple... sorry.
tor ·
I would love if someone could help me turn this two codes into an optimized asm. It is quite small codes. But in multiples it makes a huge difference I think. Credit will follow 😉
Cheers and thanks in advance!
Tor
Mo ·
Hi Tor.
I gave it a quick look. Not much to optimize thought. Only a few unnecessary moves and floats removed.
Here it is:
tor ·
Thanks a lot Mo 😀
Hello to you!
Don't think I have seen many post of you in here before. Nice to get feedback from new people (for me).
He he I have just uploaded a simple noise generator as well... want to give it a go while you're at it?
Again thanks.
Mo ·
I can't see much to optimize there too, but here you go:
Note the cvtps2dq opcode is way faster but make it only run on SSE2 machines (No pentium4/AMD equivalent or older).
tor ·
Mo wrote: cvtps2dq opcode
he he.. thats like greek to me 🙂
But again.. thanks a bunch 😀
ehm.. sorry but I have changed the noise gen a little. If you have more time.... 😊
Could you?
Mo ·
tor wrote: he he.. thats like greek to me
In the ASM code, i used cvtps2dq opcode to make the float to integer. This may be the fastest way to do it but will only work for newer processors. If you need it to be compatible with older hardware, you will need another way to convert the float or not use ASM for this.
tor ·
OK.. I don't mind that. It is like stone age machines that will not be supported 😀
Mo ·
Ok. Are you using it for mono only or pack4/poly also?
tor ·
Mo wrote: Ok. Are you using it for mono only or pack4/poly also?
Mono only 🙂
Mo ·
This is cool. It can be optimized to use only the mono stream and not calculate the other 3. Now it should more than half the cpu use..
tor ·
Very nice!
Thank you again.
Now I really need to try to get some sleep here. 🙂
tor ·
@ Bootsy:
Hi again. I mentioned instability in the lowest range of the HP filter I'm working atm. When I look at your channel strip I see the same issue. Not as evident as in my HP but it is there. The F-curve in VSTP.A. jumps increasingly in the lower freq's (Very noticeable below 25hz). So I started to check some more EQs with HP in VSTP.A. and found that your BootEQmkII is very stable. But it only goes down to 40hz. Other non SM-plugs seems to be stable down below 20hz. Do you or anyone have a clue what causes this and how to prevent it?
Dell ·
Hi.
Your CPU usage is too high for only four bands. 🙁
Reaper: 83.6 %
Wavelab: 88.2 %
Samplitude: 86 - 88%
That is from a Pentium 4, 2.8 GHZ
Bear in mind that if you plan to release this publically, the consumption must be reduced. In the beginning of the Year, Wavearts offered a valve simulation in which consumed half of what your vst offers and, it was unusable by the majority of users.
Cheers!
tor ·
Dell wrote: Hi.
Your CPU usage is too high for only four bands. 🙁
Reaper: 83.6 %
Wavelab: 88.2 %
Samplitude: 86 - 88%
That is from a Pentium 4, 2.8 GHZ
Bear in mind that if you plan to release this publically, the consumption must be reduced. In the beginning of the Year, Wavearts offered a valve simulation in which consumed half of what your vst offers and, it was unusable by the majority of users.
Cheers!
Hi.. you obviously did not read the whole thread. 😉
The example posted is all code component. Don't mind the CPU usage. I'm in the process of turning it into green maths now. But in both ways I have the same problem. Frequency curve that jumps like it is unstable in the lowest frequencies. The problem only occur when I have four biquads in series. Independently the all seem stable.
This is giving me a head ache. 😠
tor ·
@ Dell:
BTW... in your narrow EQ I see the same behaviour when the low shelf at 32hz is dialed all the way down. Is this a SM problem due to the RBJ design or what causes this?
Anyone?????????
Dell ·
tor wrote:
Dell wrote: Hi.
Your CPU usage is too high for only four bands. 🙁
Reaper: 83.6 %
Wavelab: 88.2 %
Samplitude: 86 - 88%
That is from a Pentium 4, 2.8 GHZ
Bear in mind that if you plan to release this publically, the consumption must be reduced. In the beginning of the Year, Wavearts offered a valve simulation in which consumed half of what your vst offers and, it was unusable by the majority of users.
Cheers!
Hi.. you obviously did not read the whole thread. 😉
The example posted is all code component. Don't mind the CPU usage. I'm in the process of turning it into green maths now. But in both ways I have the same problem. Frequency curve that jumps like it is unstable in the lowest frequencies. The problem only occur when I have four biquads in series. Independently the all seem stable.
This is giving me a head ache. 😠
My apologies. 😊
I performed a quick analysis using VST analyser and, all is fine. The fluctuations in the curvature could be based on you having something working side-by-side with the equaliser. It can also be the reaction time of the knob control in which VST Analyser cannot manage.
If you are using VST Analyser, let me be the first to say, it is not good on low frequencies. Since you have no control on adjusting the reaction on the sine wave, you are at the realm of the preset tone embedded in VST Analyser. This in turn, will give you incorrect measurements under 20 cycles.
If you want the jumping to stop in VST Analyser, you will need to have the starting point of the cut-off higher than 7 Hz. You can still achieve the same curvature from 20 Hz onwards. However, below 20 Hz the slope will offer a gradual roll-off.
When the CPU is reduced, let me know, and I will test it through one of my programs.
Cheers!
tor ·
Dell wrote:
tor wrote:
Dell wrote: Hi.
Your CPU usage is too high for only four bands. 🙁
Reaper: 83.6 %
Wavelab: 88.2 %
Samplitude: 86 - 88%
That is from a Pentium 4, 2.8 GHZ
Bear in mind that if you plan to release this publically, the consumption must be reduced. In the beginning of the Year, Wavearts offered a valve simulation in which consumed half of what your vst offers and, it was unusable by the majority of users.
Cheers!
Hi.. you obviously did not read the whole thread. 😉
The example posted is all code component. Don't mind the CPU usage. I'm in the process of turning it into green maths now. But in both ways I have the same problem. Frequency curve that jumps like it is unstable in the lowest frequencies. The problem only occur when I have four biquads in series. Independently the all seem stable.
This is giving me a head ache. 😠
My apologies. 😊
I performed a quick analysis using VST analyser and, all is fine. The fluctuations in the curvature could be based on you having something working side-by-side with the equaliser. It can also be the reaction time of the knob control in which VST Analyser cannot manage.
If you are using VST Analyser, let me be the first to say, it is not good on low frequencies. Since you have no control on adjusting the reaction on the sine wave, you are at the realm of the preset tone embedded in VST Analyser. This in turn, will give you incorrect measurements under 20 cycles.
If you want the jumping to stop in VST Analyser, you will need to have the starting point of the cut-off higher than 7 Hz. You can still achieve the same curvature from 20 Hz onwards. However, below 20 Hz the slope will offer a gradual roll-off.
When the CPU is reduced, let me know, and I will test it through one of my programs.
Cheers!
No problem 😉
So you say that it is VSTP.A. that is the problem. I also thought of that. But all non SM plugs I tried have no fluctuations at all, all way down. It is not because of green maths or GUI for the same behaviour is there in static filters in pure code component.
Dell ·
tor wrote: @ Dell:
BTW... in your narrow EQ I see the same behaviour when the low shelf at 32hz is dialed all the way down. Is this a SM problem due to the RBJ design or what causes this?
Anyone?????????
No one uses sine waves to measure frequencies in single digits. They use pink noise. VST Analyser limitation appears to be 5.3 Hz. Anything below that it cannot register. If you wanted to create a cut-off point at 0.5 Hz, it will become unstable based on it's limitation using sine waves however, on other analysers that can register to DC the erratic behaviour is not shown.
You can use Reaper's Analysers for they register to 0 - 23080 kHz and feed your own test tones. I merely use VST Analyser as a means of frequency response from a 0 dB standpoint. However for in depth testing I always use something else.
VST Analyser accuracy falls within the 20 – 20,000 kHz range. If you are looking for accuracy, deactivate the roll-off filters, and have the user engage them if he/she desires. It will also reduce the CPU usage.
Speaking of Narrow Q, I created that roll-off for some one kept asking for a roll-off on the sub frequencies which does not reflect hardware equipment. Upon offering that EQ, the bloke still wanted a curve he could manipulate himself. You live, you learn. 🙂
Cheers!
tor ·
😉
Dell ·
tor wrote:
No problem 😉
So you say that it is VSTP.A. that is the problem. I also thought of that. But all non SM plugs I tried have no fluctuations at all, all way down. It is not because of green maths or GUI for the same behaviour is there in static filters in pure code component.
There is a difference between using shelf filters and Peak filters. The other developers use shelves however, shelf roll-offs will never give you the curvature you are looking for. You can achieve, 6, 12, 18, 24, 48 dB per octave with a shelf. However, you cannot achieve -1 dB @ 20 Hz, and, - 27 dB @ 10 Hz. 😉 Only peak filtering offers that type of control. The limitation of VST Analyser is it cannot tell you what is taking place below 5.3 Hz. There is more than likely a rise occurring however, it is bouncing about like a ball. Such activity will create issues in terms of accuracy below 10 Hz.
Take into consideration 20 cps moves slower than 20,000 cps in addition offers a larger wave. There is activity @ 20,000 cycles however, the wave is too small to detect compared to 20 cps.
Peaks starting points are at the given frequency whereas shelves start before the desired frequency.
I wouldn’t concern myself about fluctuations – 35 dB @ 5.3 cycles. Anyone who is familiar with frequencies will not complain of a little activity – 35 dB @ 5.3 cycles. Those who do complain are looking for an accurate equaliser, which is not the concept of your design.
Cheers!
tor ·
I do not understand all of your arguments. You can change the Q of a shelf to get intermediate values in dB per octave other than what you mentioned. And what you say do not explain why we get this fluctuation and other developers do not. It is clearly not a VSTP.A. problem. But I see your point that the relevans of fluctuation below 20hz or cps you call it not that much of a concern. But I do not like it and I really would like to get rid of it. Others can do it then I/we can 😀
tor ·
I'm sorry I wrote Q.. I meant Slope witch is the best term in a shelving filter. It is not locked to 6, 12, 18, 24, 48 dB per octave as I understand you claim.
Correct me if I misunderstood 🙂
Dell ·
Once you alter the shelf to create a steep slope, you are asking it to deliver a peak response. Going from - 1dB @ 20 Hertz to - 27 dB @ 10 Hertz is a steep roll-off which is common with peaks.
If you want to tackle the problem, create your own spectrum analyser that can measure 0.5 Hz with Synthmaker and move away from the VST Analyser. 🙂
I only use VST Analyser to show the frequency response from a 0 dB perspective. Upon viewing my Blog, you will notice all real-time measurements are conducted using other means of test equipment.
Here are the Narrow Q tests…
http://www.youtube.com/watch?v=5LSo4efZTRc
http://www.youtube.com/watch?v=W7pOiTbTpW0
If you want to get rid of the fluctuations, follow the dB per octave rule and don’t try to create your own customised roll-off slopes that will add more artefacts in the design.
I understand you want everything to be designed using your parts. However, there are many developers that have already created filters that will not offer any artefacts. Here is one of them
Filters and optimization
Bare in mind I do not make clean plug-ins. All my designs are supposed to add their own tonal characteristics upon usage… Just like hardware equipment. 😉
Cheers!
tor ·
Any way.
The biquads I use is the same as the ones you link to. And mine is perfectly stable too. But... when I cascade 4 of then I get this fluctuation. I do NOT think this has any thing to do with the VSTP.A..
I think I need some more in depth competence here. It is not magic... it is DSP technology and I'm quite sure there is some one in here who can help me out.
I repeat my problem atm:
Fluctuation in the lowest frequencies on the highpass filter when measuring in VSTpluginanalyzer. (Curve jumping increasingly from about 100hz down to 0hz. Significant below 25hz.)
Bootsy talked about some warping in the high frequencies. I have not been able to understand/ identify what he means.
tor ·
Another quest for mr. Mo 😀
Dell ·
You may need to start building various types of equalisers to have a better understanding how they work. Nothing beats practice. 🙂
Equalisers are frequency driven. If you alter one frequency the frequencies surrounding the alterd frequency are going to react. That is how all equalisers respond whether it is a DSP, transistor or valve equaliser.
Your slope is too steep and is peaking.
The Q is not wide enough to control the frequencies lower than 10 Hz and they are reacting to the sine wave signal being fed from VST Analyser.
Since there is no way to turn off the signal and adjust the measurements in VST anaylser you are getting a bouncing signal. The rise is due the frequency below 10 cycles returning back to 0 dB in which VST Analyser cannot display for it is limited to 5.3 cycles.
Slopes continue to decline per octave until it reaches DC or 0 cycles.
Peaks will not follow the slope method unless the Q is wide enough to cover various octaves, are set at a very low frequency and, offers enough dB loss to mimic the response of a slope.
MyCo offers an OSM with optimise filters which do not offer any artefacts in the link I offered. 🙂
Cheers!
Disco_Steve ·
The problem is math error in the tail of the response due to the resolution of the floats used.
Low frequency filters have long tails and are thus more susceptible to these problems, you need to use a different form of biquad, (there are about ten) it's to do with the order in which the coefficients are added together, I canny remember which one is best when chaining filters (sorry) but the is a particular one that has been shown to give the best response.
The asymmetry in the response in the high frequencies is due to the nyquist limit. It's just a fact of the filters used, infect all IIR's suffer from the effect. The solution is to use higher sample rates. As far as I can tell this is the only reason why higher sample rates sound better, because the filters on the audio sound more symmetric which sounds more analogue because analogue filters don't have the same problem.
The problem with higher sample rates is that it pushes this low frequencies cause math problems error up to higher frequencies as well, so you need to have a greater bit depth in the maths. 24bit mentesa floats should be just enough if your cairful.
Helpful?
Oww just remembered, the best place to see all the different forms of biquad is in the help file in matlab (I think it's online) search freqz and it should come up. I think it also talks through the advantage and disadvantage. You might have to sacrifice some CPU though, as as far as I remember th best one for chaining isn't best for CPU use
Steve
Steve
Disco_Steve ·
Reading mo closely.
The best way to see the frequency and phase response of a filter is to get it's impulse response and fft that.
This will get rid of any widowing problems that is currently causing the wobbling at low frequencies you are experiencing, as some times the wave is in a different place and the square window is causing different results.
That should be more helpful
Steve
tor ·
Now that was very helpful!
Very nice explained.
THANK YOU! 😀
tor ·
Ok I now have two small code chunks that I would love to get optimized in asm. Any one up to the task?
Please.... with sugar and candy 😇
@ Mo?
@ Anyone?
😀
tor ·
@ Disco Steve:
I know about direct form 1 and 2 for the biquads. I will investigate more on this 😀
Andrew J ·
Disco_Steve wrote: The problem with higher sample rates is that it pushes this low frequencies cause math problems error up to higher frequencies as well, so you need to have a greater bit depth in the maths. 24bit mentesa floats should be just enough if your cairful
Note also that there are techniques for rearranging higher order filters as a series of second order filters for improved performance with single precision floats. Check Matlab (or Octave) documentation for zp2sos.
This might be a bit tricky to implement in green code, but you can get around it by generating tables of coefficients offline. Though I should warn that you'll sometimes get discontinuities in the values of one or more coefficients - and this introduces some risk if you're interpolating the coefficients.
Mo ·
Quick optimizing..
Here you are:
tor ·
Mo wrote: Quick optimizing..
Here you are:
You're tha man!
Thank you again 😀
Andrew and Disco: I will see what I can manage to do with this after some more reading. Thanks a bunch for all replies 😍
tor ·
Hey... so I finally managed to finish the optimizing process. There are still some tweaking to do. But I'm getting there soon. The biggest issue atm is the fluctuation problem in the low end I think. Have not had the time to look a the different biquad forms. I have just one peak filter in this test EQ. The finished thing will have more. I added 2*oversampling and a noise knob for eliminating denormals and otherwise creative use. The CPU consumption is very acceptable now.
Please test it. 😉
tor ·
Ah... I forgot to mention. It should now also work correct in all samplerates. 🙂
Dell ·
Hi.
The CPU usage is much better than the previous version.
I would suggest having a master volume (input or output) to regulate the overall levels.
Cheers!
tor ·
Dell wrote: Hi.
The CPU usage is much better than the previous version.
I would suggest having a master volume (input or output) to regulate the overall levels.
Cheers!
That's was not a part of my plan. But I might consider it. Anyone had the time to test it yet? Please report what platform, host and samplerates it has been tested on.
Thanks in advance.
Tor
tor ·
By the way... I posted this under examples. I will upload the osm when I have finished the EQ and or if I get totally stuck with something.
Cheers! 😍
Dell ·
Hi.
If you are planning to offer your equaliser to the public, having a control to regulate the overall level will be necessary.
I tried a quick test using a 192 kHz wav file, and it appears to be working fine. Upon engaging the low-pass filter everything above 20 kHz is rolled off. I used a spectrum analyser that can detect beyond 40 kHz.
Cheers!
tor ·
I actually did that on purpose. I really don't see the point of keeping info over 20k. The number of people that can hear anything up there are so very very few. But I'm going to implement a gain knob 🙂
Dell ·
Most humans cannot hear beyond 16 kHz. The ones who can hear 20 kHz, will just keep the filters off.
The difference is noticable using 88.2,96, 176.4, in addition to, 192 kHz files. The majority uses 44.1 and at times, 48 kHz. Under those conditions 20 kHz is already being severed by the limited bandwidth.
Cheers!
bootsy ·
The curve warping near Nyquist is still there. So, whats the oversampling good for?
MyCo ·
I haven't look deeply into all posted OSMs, but in the optimized versions of filtercode2 & 3 from Mo, there is some room. Stage 0 can be completely removed by the well known ABS-ASM hack.
BTW: in the ASMs there are some undeclared variables.
tor ·
Thanks for the feedback guys. 😀
@ Bootsy: I dont know what causes this. The oversampling should help.. but not apparently. Can you point me in the right direction? 🙂
@ MyCo: I really have no asm experience or knowledge. Could you please fix these issues this for me? You will be credited 🙂
I now start thinking that I have to start learning Octave to wrap my head around the maths in IIR's..
Mo ·
MyCo wrote: I haven't look deeply into all posted OSMs, but in the optimized versions of filtercode2 & 3 from Mo, there is some room. Stage 0 can be completely removed by the well known ABS-ASM hack.
BTW: in the ASMs there are some undeclared variables.
Seems hardly worth it?
tor ·
Thank you Disco_Steve! 😀
Now I have replaced the difference equation in code to another form and the result is a perfectly stable filter in the low end. 😈
If anyone want to have a look at it or maybe please with sugar optimize it in asm I would be very thankful.
See att's for the VST and the new code.
tor ·
I was a bit quick there.. seems like i have a small amount of fluctuation in the peak-filter's lowest frequencies. But this is so little I will accept it. 🙂
At least for now 😉
trogluddite ·
Here's a leaner ASM version of the difference thingy...
...see if it nulls when subtracted from your code just to be sure I haven't messed it up!
tor ·
Thank you very much troggie 😀
trogluddite ·
No problem - reducing the code is the easy bit for me.
Getting the right equation and then finding the coefficients to make a filter, phew, then I am very lost 😕
If you would like to learn a little ASM of your own, then this type of code which is just maths is the easiest to start with - you only need to know a handful of opcodes. With these smaller codes, it is simpler to write your own from scratch than to edit the SM generated code - that can get a bit confusing with all the unnecessary lines of code that it makes.
tor ·
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 🙂
trogluddite ·
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.
tor ·
Thank you for the nice introduction guide to the asm-world 🙂
Must try it soon 😉
tor ·
@ 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
Andrew J ·
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".
tor ·
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?
tor ·
Something like this? but with some recursive fx in between in and out when i1 and i2 is streams from the oversampling kit?
MichaelBenjamin ·
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.
tor ·
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.
tor ·
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)
🙂
tor ·
Am I only processing every second sample with this osint.osm?
here is the high pass example:
tor ·
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.... 😕
@ Andrew J: Heeeeeelp!!! 😊 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.
Andrew J ·
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
tor ·
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.
sunsynth ·
Andrew - I hope U get well soon!
Walter
aliasant ·
Andrew J wrote: 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
Get well m8!
Andrew J ·
Thanks for the kind thoughts guys, I'm definitely on the improve!
tor, take a look at the updated wiki: How To Code An Oversampled Filter. I've also added an example schematic.
I hope I haven't made any dumb mistakes 😉
stw ·
Andrew J wrote: Thanks for the kind thoughts guys, I'm definitely on the improve!
tor, take a look at the updated wiki: How To Code An Oversampled Filter. I've also added an example schematic.
I hope I haven't made any dumb mistakes 😉
Thanks for that very educating update and the well explaining .osms! Very much appreciated! 😍
aliasant ·
stw wrote:
Andrew J wrote: Thanks for the kind thoughts guys, I'm definitely on the improve!
tor, take a look at the updated wiki: How To Code An Oversampled Filter. I've also added an example schematic.
I hope I haven't made any dumb mistakes 😉
Thanks for that very educating update and the well explaining .osms! Very much appreciated! 😍
120% Agree!!!!
Thank you Andrew. Finally some light in my mudded.......
MegaHurtz ·
Andrew please spare a minite of your time to explain to me how raising the hf content
over nquist again would not create aliasses.
Becouse there`s only two samples there, I beleive you are wrong.
Also I beleive nobody applying this in the right mind would ever use a digital filter.
Furthermore you cannot construct a Niq sinewave either. only a 0 1 0 -1.
wich will mess up your signal yet again.
MegaHurtz ·
Actually i made a case against it.. Here you can see filtering amounts to a flatter passband.
and less jitter. Albeit a nicely represented sinewave, the frequency by my da is lower (thus an alias).
tor ·
Good to hear you are getting better Andrew 🙂
And thanks for sharing your knowledge. I see the solution is much simpler than I anticipated, and it makes perfect sense when I see it. Learning new stuff every day is great 😀
Again, THANK YOU VERY MUCH!
MegaHurtz ·
It does do a pretty nice job though. the jitter reduction to certain frequency`s is phenomenal.
must be the q im creating wich is a bit off. maybe we should collab on this to get a new design.
keep on doing the Great work!
bootsy ·
Great job Andrew (as always) and thanks for sharing!
Dell ·
It appears the problem with over-sampling is the misunderstanding of over-sampling.
Over sampling enables a given frequency range, less distortion, based on a wider bandwidth. The wider the bandwidth, the better the chance of achieving ultrasonic & infrasonic frequencies with the least amount of distortion.
If one is filtering frequencies severely @ 20,000 kHz and not the ending point of the frequency bandwidth, over-sampling will create a problem for the filtering occurs below the frequency’s bandwidth. The end result is a dip @ 20 kHz and rise roughly around 22 – 23 kHz.
In order to remedy such a peak, in the response, one would need to filter at the starting point of the frequency bandwidth.
The file used is pink noise sampled @ 96 kHz. This is equivalent to a frequency bandwidth of 48 kHz, which is common in the lowest grade of analogue hardware.
Cheers!
MegaHurtz ·
it`s very simple to mimic that passband response without oversampling.
And guess what it sounds quite well. So you could state gentle attenuation reduces aliasses along the line.
and does a proper yob at keeping away ringing, and converts any sine to some sine. becouse it
cant be amplitudes other than a sine becouse of the loudness.
The big question is what level to be per frequency?
EDIT to me atleast 🙂
MegaHurtz ·
Attenuation 6x no oversampling Vs Dry.
The PCM.
The FFT.
MegaHurtz ·
Dell wrote: In order to remedy such a peak, in the response, one would need to filter at the starting point of the frequency bandwidth.
The file used is pink noise sampled @ 96 kHz. This is equivalent to a frequency bandwidth of 48 kHz, which is common in the lowest grade of analogue hardware.
Cheers!
aha, i see.. The trick would be getting it`s frequency at 44khz then.
Dell ·
Right! 🙂
The track is sampled/recorded pink noise @ 96 kHz. The playback is set to 44.1 kHz. This is why the frequency is chopped off beyond 22 kHz.
The rise beyond 20 kHz is based the low-pass filter’s starting point @ 20 kHz. Since the file is a higher sample rate, its frequency bandwidth extends beyond 20 kHz.
Having a low-pass filter offering a starting point of 20 kHz may be fine for a 44.1 kHz file. However, for a 96 kHz file, 20 kHz is not high enough to address frequencies beyond 20 kHz upon low-pass filtering.
Bear in mind if the file used were 44.1 kHz, there would be no rise in dB/SPL above 20 kHz for, 44.1 (22,050) is the frequency bandwidth limit.
I’ve over-sampled a few equalisers for my sound system however there are no low-pass filtering within the chain.
I will try to post some frequency graphs based of audio files based on various sample rates by the middle of the week.
Cheers!
MegaHurtz ·
Also you could yust use an interpolation on it. Maybe even keeping
the sampled audio at a 44k pitch, and upsample really nice.
But im really sold to the attenuation thing, got one that sounds really natural
but i think it could be a little better? Now it`s a liniar attenuation.
Dell ·
Hi.
Here is a video on how a wider bandwidth will prevent high frequency roll-off based on a limited bandwidth.
The video also shows how low pass filtering will not always be helpful when one is aiming to reduce frequencies above 20 kHz using high sample rate files. 🙂
http://www.youtube.com/watch?v=ibmKIBlq0b0
Cheers!
tor ·
I have found the best result for the EQ is by using double precision in the multips, adds and subs in direct form II ( See here: Why the ¤#&"¤%/"!!! ).
Because of this it is impossible to use oversampling in SM. No longer ability to shuffle the index. But my ears like it when i use the oversampling components to do two independent processes and then "downsample" it again. The EQ also seem more stable with this solution aswell, thoug it doubles the CPU. But that would also be the case with "regular" OS in SM.
Please test and give me feed back.
Tor
Dell ·
Hi
The load time is very slow on Reaper & Samplitude. Possibly the noise file is causing the problem?
96 kHz Wave File = 75%
44.1 kHz Wav File = 34.9 %
Using a 24 bit/96 kHz Wave File
Upon flipping the High Pass/Low Pass filters the CPU jumped from 75 – 86%, the sound jittered and, Samplitude halted at 141%.
Please note that none of the controls were altered except the high-pass/low-pass filters.
Using a 16 bit/44.1 kHz Wave File
Upon flipping the High Pass/Low Pass filters the CPU jumped from 35 – 66%, then 99%.
Please note that none of the controls were altered except the high-pass/low-pass filters.
All of this occurs on a Pentium 4, 2.8 GHZ, with 2 GB of RAM. It appears my PC is not strong enough to evaluate your plug-in.
Cheers!
aliasant ·
I too have a denormal problem but only on the HP filter.
If I switch it on and then back of CPU raises from 0.81% to 2.75% and back to 0.81 if I switch it back on again.
This is in Reaper 48kHz 24Bit
tor ·
Ok.. thank you both. 😀
There was a huge difference in CPU load on your systems.
On mine Core 2 duo @ 2.4 it use prox 8-10% in Reaper at 44100.
I have to take a closer look at the HP.
This will be a quite CPU hungry thing any how due to lack of optimization ability using double pecision and doubling load with 2* "OS".
But I think it sound very pleasing and is quite precise as required in the mastering processor i have in mind.
Dell ·
Hi.
Providing you are not going to offer this to the public, by all means enjoy your equaliser.
Cheers!
tor ·
Denormals taken care of in both LP & HP. I forgot to feed them with noise when disconnected.
tor ·
To day I had some time to do some testing myself. And yes Dell 🙂 I see your point. 😉
@ 192000 SR I get over 300% CPU load 😕
Maybe I have to comprimize my demands on this one 😉
tor ·
Solved this problem by auto disabling 2*OS when SR over 48000. Now CPU l0oad is down to 36% at 192000 😀
This makes sence to do any way. At 88200 there is no need for OS at all 🙂
tor ·
Adding the OS switch made me aware of chages to the stereo image. When OS is enabled image is narrower. 😮
tor ·
Dough..... never mind!
🙂 Cable ERROR 🙂
Please forgive me shouting so quicly 😊
This time the EQ is ready for some real testing. 🙂
Please give me feedback whether or not you can differ the sound with OS on/off. And generally other issues like overall sound, CPU load and host compability with different settings in SR and bit depth.
Dell ·
Hi.
If someone doesn't evaluate your plug-in on a computer not as powerful as yours, I will give you an analysis on Wednesday.
Cheers!
mHz ·
These suffer hughe denormal problems.. Seems to be zero related.
But im too lazy to look yust guessing 🙂
tor ·
mHz wrote: These suffer hughe denormal problems.. Seems to be zero related.
But im too lazy to look yust guessing 🙂
I guess that would be one of the earlier versions. There is no denormal problems as I can recognize in the last posted EQ.
Dell wrote: Hi.
If someone doesn't evaluate your plug-in on a computer not as powerful as yours, I will give you an analysis on Wednesday.
Cheers!
Ok thanks Dell. I guees it now will be usable even on a P4 machine. But this is still going to ba a quite CPU hungy thing. 🙂
tor ·
mHz wrote: These suffer hughe denormal problems.. Seems to be zero related.
But im too lazy to look yust guessing 🙂
tor wrote: I guess that would be one of the earlier versions. There is no denormal problems as I can recognize in the last posted EQ.
Dont forget to eat and drink. I is also important to take brakes from the computer screen. mHz you were perfectly right. Some times (very often) I get blind working on stuff. I will get back to you when I have done some proper testing myself...
For now thanks for the feedback 🙂
Tor
Dell ·
Hi.
Here are the results using a Pentium 4, 2.8 GHZ Computer
44100/16-bit wav file
CPU: 22% average (nothing adjusted)
CPU: 197% average (2*OS on)
96000/24-bit wav file
CPU: 48% average (nothing adjusted)
CPU: 73% average (HP & LP enabled)
It takes too long to load considering there is no graphic user interface and/or meters.
Cheers!
tor ·
Ok.. thanks 🙂
I have done alot of testing myself now and come to that ill drop 2*OS. The benefit is to my ears not perciveable and it was not properly implemented due to double pecision anyway. I think I will keep the double precision math even though it makes the cpu load higher. The filter is now stable in low frequencies.
I am in the process of going through the whole EQ to find possible optimizations.
tor ·
A little on the side here... but I have to tell you what song I use to test my EQ with:
-Fade to black, with Dire Straits.
http://www.last.fm/music/Dire+Straits/_/Fade+to+Black
http://open.spotify.com/track/13zcHgG22ZVCwtGsNmVYV6
There is a whole lot of nice, clear and separated details in all frequency areas. All in all a great track for audiophile people. 😉
To get higher samplerates i'd recomend either r8brain from voxengo or SoX plugin with foobar2000.
tor ·
This thread is continued in the registered users area. Here:
[old link]
Wrote something here? To have a post removed or your name hidden, write to [email protected].