Integer is King? - final thoughts about the EQ challenge

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

BTW, when will Xhip be:

- final, before december, i'm hoping. this seems pretty likely too, i'm 80% sure it'll be final by then if i dont run into any problems

, sound like a Virus, omg virus!!!11111oneoneone

, run on ProTools, after i sign away my soul to the devil i suppose

- stop crashing when moving the unison sliders while playing, long time ago, wasnt it? if you can get it to crash doing this now that means there is a really big problem happening and please do me a favor and figure out how to reproduce this in multiple configurations so i can fix it

BTW, leave teh xhip things in the xhip thread :P

Post

ok - both filters _will_ operate to the full range. both filters _will_ work pretty much ok with static parameters - however, as you'll see in this example the float version will barf and then have the "phase locking" behaviour i mentioned before.

i had to fiddle a bit to show the different behaviours with static parameters, although i didnt fiddle much so feel free everyone. i have not yet tested adjusting the parameters over time, which by my memory is what caused the float version to barf.

i didnt realize before that they both work nearly ok at the full range of parameters, the float version doesnt barf as much at this particular configuration i'm supplying. like i said though i havent tested other configurations, i'll leave this to you guys.

but, here it is, proof of what i've been talking about: http://xhip.cjb.net/temp/public/mmode.c

load the two .raw files it produces into your favorite wave editor. if you dont have an editor which can load .raw files you can add your own code to include a riff header, and i suggest you get a new favorite wave editor.

Post

i should add some things:

1) the m32 function i used there i included just to make the code portable c, i didnt want to include assembly. with access to assembly, you can use the 32x32:64 mul function on the x86 to get the same thing in 3-12 cycles, variable based upon which delays might take effect. the "stupid way" also might have errors in it, i'm not sure, but it seems to work exactly the same as the x86 instruction with a 2* mul after it.

2) for anybody who doesnt have a compiler to compile this, the binary: http://xhip.cjb.net/temp/public/int_vs_ ... filter.exe

3) for anybody not wanting to run the binary: http://xhip.cjb.net/temp/public/float.output.raw http://xhip.cjb.net/temp/public/int.output.raw

4) for anybody with a lame wave editor: http://xhip.cjb.net/temp/public/float.output.wav http://xhip.cjb.net/temp/public/int.output.wav

5) the comment "//max = rate / 9.0" might be misleading. here, lower values produce higher frequencies. 9.0 is the lowest value which is unlikely to cause an explosion or weird behaviour for float. anything below 9.0 becomes quite a lot more likely.

6) if you run the filter twice you'll gain the ability to push the cutoff above nyquist. if you add a decimation filter you'll be able to have a pretty damn nice filter right there without even adding the additional features xhip has.

7) the clipping of the bandpass integrator will prevent any major explosions in both versions, although in the float version an explosion is still possible with certain parameters and modulations. if you remove the clipping you'll be able to experience even more differences between int and float which the clipping helps to cover up. however, without the clipping there this filter sucks.

Post

final thoughts - i AM a friggin idiot....
That's all I wanted to do as a kid. Play a guitar properly and jump around. But too many people got in the way. - Syd Barrett

Post

interesting theory aciddose.

this int vs float thing would explain why especially filters and more processed stuff like heavy feedback related circuits may sound less convincing in the VST land, because generally based on floating point?

You can clearly hear a difference between the both samples.
Image

Post

the difference is quite significant but both waves sound quite strange (or is that what they are supposed to sound like?)

Post

AD, I think I found a bug on line 29:

float q = (long)((1.0 - feedback) * 2147483647.0);

q should be a long here, no? - Not that it matters tho...

Post

the float sample sounds somewhat smeared in the top,
while the int sample sounds a bit "cleaner" or should I say "more defined". (hard to find the right words for explaining!)

I don't know if the test itself is done correctly, but fi so these results could definitly be the main thing that I dislike about VST synth sound.

I think aciddose is hitting the sweet spot.


I accidently clicked on this thread but it seems a very interesting topic.
Last edited by hifiboom on Wed Jun 13, 2007 8:02 pm, edited 1 time in total.
Image

Post

l0calh05t wrote:the difference is quite significant but both waves sound quite strange (or is that what they are supposed to sound like?)
They do sound strange... indeed...

Post

hifiboom wrote:the float sample sounds somewhat smeared in the top,
while the int sample sounds a bit "cleaner" or should I say "more defined". (hard to find the right words for explaining!)

I don't know if the test itself is done correctly, but fi so these results could definitly be the main thing that I dislike about VST synth sound.

I think aciddose is hitting the sweet spot.
To my ears it's the other way round. We're listening to a sawtooth running through a filter with hard clipping. Pretty harsh sounding. For some reasons the float version decreases in volume so that after a third of the sample or so the volume is pretty much below the clipping point. Then it sounds like a sawtooth - nice 8)

Post

Actually, the .wavs also look plain wrong. This has close to nothing to do with a sawtooth. Aciddose, what should the samples look, like?

http://www.u-he.com/img/notasaw.png

Post

That looks like a filtered saw with lots of resonance about 5 octaves above the fundamental to me. :shrug: (Haven't listened or read the code yet.)

Post

AdmiralQuality wrote:That looks like a filtered saw with lots of resonance about 5 octaves above the fundamental to me. :shrug: (Haven't listened or read the code yet.)
Yeah... more like, even though the resonance is *off*...

wait... line 36:

l += 2*m32(f, b + 3*m32(q, l));

shouldn't that be

l += 2*m32(f, b + 6*m32(q, l));

?!?

It seems to me that q = 3.0 - 3.0 * feedback. This is taken care for in the float version, but not in the int version (naturally, he can't go "above" 1.0 in int). The int version instead scales the product by 3... which has to be scaled by 2 as well... makes 6, doesn't it?

Post

Why can't you go above 1.0 in int???????? Are you not giving any headroom and using the entire range? Oh man... I couldn't deal with the clipping at every single calculation. All my filters work at any level. Only clips when it leaves your host and hits the soundcard.

Post

AdmiralQuality wrote:Why can't you go above 1.0 in int???????? Are you not giving any headroom and using the entire range? Oh man... I couldn't deal with the clipping at every single calculation. All my filters work at any level. Only clips when it leaves your host and hits the soundcard.
It's just demonstration code to show the "creeping error" in recursive float structures...

Something indeed happens here, but I think it's not really working as intended...

Post Reply

Return to “DSP and Plugin Development”