Integer is King? - the challenge

DSP, Plug-in and Host development discussion.
Christian Budde
KVRAF
1539 posts since 14 May, 2004 from Europe

Post Mon Jun 04, 2007 5:04 am

Ok guys,

after enjoying your conversation I throw a simple EQ plugin together. It has three different processing algorithms: X, Y and Z.
One is entirely done in fixed point math, while the other one is done entirely in floating point math. One processing mode is unknown yet. The processing ladder and the coefficients are equal, except that the one only uses fixed point math, while the other one uses floating point math.

The plugin itself is *NOT* made for commercial use, just for evaluation of the differen processing types. There are a lot of issues in this plug. I know that, but this should doo the trick.

Click on the screenshot to download the plugin:
Image

I did not use any kind of dithering/noiseshaping here. In theory it is necesarry, since the in/out format is only 32bit float (due to restrictions of the VST interface).

The zip file also contains the details of the algorithms used, but it is password protected. I will post the password next week at this location.

Happy evaluating,

Christian

PS: Note: in the default preset/position the sound of all processing modes are binary equal. So you definitely can't here a sound without EQing. Trust me.

duncanparsons
KVRAF
8369 posts since 11 Apr, 2003 from now on the flat

Post Mon Jun 04, 2007 5:11 am

great idea Christian, I was about to dig up some I code I used last year in an FP/FxP thread I started...

But blind testing like this should be great ;)

DSP
Image

#The fREaK!
KVRist
88 posts since 24 May, 2005 from Sweden

Post Mon Jun 04, 2007 6:35 am

While judging by the sound what is what, if possible, would be a challenge, the kind of error that occurs when something blows up in an implementation of the filter (which I've got it to repeatedly) quite strongly suggests it to me. Though I guess that's kind of cheating. :wink:
#if IN_SOVIET_RUSSIA
# define BJARNE_STROUSTRUP "evil"
#endif

Christian Budde
KVRAF
1539 posts since 14 May, 2004 from Europe

Post Mon Jun 04, 2007 7:44 am

Short update: I added my VST ABX tool for blind testing VST plugins.

Suprisingly it seems as if I *did* hear a difference in very extreme settings (11 times with 15 trials). Right now I'm not sure, what exactly I heard. It still can be some kind of placebo thing.
However this comparison is interesting, since a difference is measurable. Especially for full scale signals (where the floating point precision isn't superior any more: remember 32bit float at full scale (+/-1) equals 23bit integer). So doing a harmonic distortion measurement of both algorithms unveils a slight difference (down at -180db ;-) which is still _far_ below the hearing threshold).

But I'd like to avoid any kind of subjectivity here. At least until we have our first results. Will there be a anyone who can hear the difference?

Christian

nollock
KVRian
1153 posts since 10 Dec, 2003

Post Mon Jun 04, 2007 8:23 am

Imo you should also test double precision. Based on my limited experience, and moreso on comments from other developers you should use double for anything recursive, particulary with high resonance.

JCJR
KVRAF
2418 posts since 17 Apr, 2005 from S.E. TN

Post Mon Jun 04, 2007 8:36 am

Christian is probably already using doubles for his float math, but that is a good point. I always store coefficients and 'memory state' vars as doubles, so that the only bump down to 32 bit float is in the in/out buffer. But I assumed most folks do the same.

Christian Budde
KVRAF
1539 posts since 14 May, 2004 from Europe

Post Mon Jun 04, 2007 8:47 am

sorry that I didn't make it clear here: I'm using Integer64 for all fixed point types (with a good amount of headroom) and 64bit double precision floating point for coefficients and states. The processing is done inside the CPU registers maintaining theoretcally 80bits precision.
In fact there's only one 'bump down' to 32bit float at the end. This should be done with dither/noiseshaper. I have already coded that part, but I disabled it here since i'd want to avoid judging the dither/noiseshaper here (which is in my case a bit different for fixed/floating point). In case someone can relayable hear a difference here, I'd like to continue the test with dither/noiseshaper.

User avatar
Kingston
KVRAF
6474 posts since 16 Dec, 2002

Post Mon Jun 04, 2007 8:53 am

it's a waste NOT to process stuff as doubles on today's CPU architecture. float gets bumped to doubles in the FPU's of current generation most of the time AFAIK. negligible CPU hit one vs. the other..


on to the topic. in my (currently) noisy test environment I could not tell the difference between any of the modes and I was using some super drastic mega killer settings. maybe I'll try later but I think my conclusion won't change.

nollock
KVRian
1153 posts since 10 Dec, 2003

Post Mon Jun 04, 2007 9:19 am

I cant get the thing to work. It just maxes out my CPU and produces no sound. :(

Edit: I've loaded a sound file, and this displays. I've load two instances of the eq plug. set up the soundcard, and selected 'start'. It says "trial 1 of 15'.

Christian Budde
KVRAF
1539 posts since 14 May, 2004 from Europe

Post Mon Jun 04, 2007 10:21 am

sorry, everything here is work in progress. I could wait to get everything stable, but at when this happens, the discussion is probably snow of yesterday...

mauseoleum
KVRAF
1907 posts since 29 Oct, 2003

Post Mon Jun 04, 2007 10:35 am

Hi mausoleum,

first of all thanks for taking part in the challenge. One thing though, could you please remove your thoughts about the challenge for a while? I don't want to emphasize all the others who might take place in this challenge.

All I can say at this point is that I had a similar rating,when I did it by myself. But I don't want all the others to join the club, only because some others did notice it.
yep. Mr. CB asked me to do so - so kindly that in fact I did remove my thoughts.

Btw. the difference was obvious on _consumer_ sony walkman headphones. Unfair bit in the equation is that they were powered by my custom headphone amp with built-in passive contour filter that _makes_ a difference (spinoff of a modded T-filter). The stinky bit is that it was fed by an ancient AWE64gold soundblaster ISA card.

Math wizards, don't you think that _summing_ with fixed point math won't get noticed on a plastic boombox, not mentioning dynamics ... ?

For _float_ hosts _AND_ if integers/fixed proves to be a bit better sounding, I think there would be an opportunity in providing a "buss-channel" plugin with said math, EQ-compressor thingie, with lowpass and hipass filters.

Thanks for your cooperation, over and out. Vote me for president when time comes.
Last edited by mauseoleum on Thu Jun 07, 2007 11:58 am, edited 1 time in total.

User avatar
bmanic
KVRAF
8198 posts since 3 Feb, 2003 from Finland, Espoo

Post Mon Jun 04, 2007 10:55 am

Nice to see Mr audio detective himself on the case here! I'll take the challenge of course! :wink:

Cheers!
bManic
"Wisdom is wisdom, regardless of the idiot who said it." -an idiot

User avatar
Chris Walton
KVRAF
2161 posts since 25 Jan, 2007 from the back room, away from his wife's sight (or so he thinks)

Post Mon Jun 04, 2007 12:06 pm

Kingston wrote:it's a waste NOT to process stuff as doubles on today's CPU architecture. float gets bumped to doubles in the FPU's of current generation most of the time AFAIK. negligible CPU hit one vs. the other..
I agree, unless memory speed and size are a problem.

Then again, everybody except me is running a 60Ghz 7TB RAM computer anyway.
Full-time Daddy and Software Developer
Part-time Musician and Smartass
Zero-time Intelligent Being
Formerly known as arke, VladimirDimitrievich, bslf, and ctmg. Yep, those bans were deserved.

JonHodgson
KVRian
770 posts since 2 Apr, 2003

Post Tue Jun 05, 2007 1:19 am

Chris Walton wrote:
Kingston wrote:it's a waste NOT to process stuff as doubles on today's CPU architecture. float gets bumped to doubles in the FPU's of current generation most of the time AFAIK. negligible CPU hit one vs. the other..
I agree, unless memory speed and size are a problem.

Then again, everybody except me is running a 60Ghz 7TB RAM computer anyway.
except that with SSE and 32 bit floats you can generate a far higher throughput, and even if you aren't using SSE memory accesses are potentially one of the most costly actions in a modern architecture, unless it's in the cache, but then if your values are half the size then you can fit twice as much in, increasing your chances of a cache hit.

There are places where doubles are advantageous, even neccessary, and many where they are not, there's never enough processing power for the average punter, give them a bigger CPU or a more efficient plugin, and they'll just load up more plugins!

JonHodgson
KVRian
770 posts since 2 Apr, 2003

Post Tue Jun 05, 2007 1:24 am

As for this test, 64 bit ints versus 64 bit floats? Come on, considering that no D/A converter manages better than 20/21 bits worth of signal to noise at full scale if a programmer can't make any differences between the two inaudible, then fire the programmer.

Return to “DSP and Plug-in Development”