Integer is King? - final thoughts about the EQ challenge
- KVRAF
- 12615 posts since 7 Dec, 2004
you _could_ create code which is "faster", however you'd need to run several of these in parallel or weave int and float code together. i do know what can be done in float, but i think this particular iir doesnt lend itself to any further optimization without significantly altering (adding delay, *wink wink*) the function.
"Or apparantly, as in this case, your INT versions had bugs? You certainly had less trouble coding the float version in this case. "
well, the float version didnt work while the int version did, previously, so much in fact that it convinced me that there was some problem with using floating point for the function. we still have not tested the function in the same ranges used in xhip, so it might be interesting to replace xhip's filter with a completely float version (perhaps the whole signal path) and see what differences there are. it might just be that the first time i tried to implement the float version i made some rediculous mistake in the code, but i've no idea how that would be possible unless i was drunk or something.
the original code wasnt mine, the original code was written by Christian. the only difference seems to have been the noise floor, and/or accuracy of the calculations. there wasnt really any strong preference, but thorkz did pick out the less accurate one. perhaps there is some correlation between thorkz's preferences and higher noise-floor/error ?
hm.. but apparently i was drunk when i wrote mmode.c, or atleast that can be my excuse. i've updated the code in order to compare a "naive float" version to my xhip version. the difference is mostly due to the lower accuracy for small numbers in int. the lower accuracy for large numbers in float doesnt make much difference, at least not one which is perceptible.
an interesting thing i notice though is that the more "perfect" float version sounds dull, plastic-like. you know with the "digital" timbre people refer to. the int version sounds more full and "natural", due to the error level changing the parameters in certain places. the feedback at high frequencies becomes reduced significantly compared to the float version for example. you could intentionally add these properties to the float version, however this reminds me of analog vs. digital debate. the int version adds something through error (like analog electronics) to the timbre that is difficult if not near impossible to add and get right in float. these things may actually have more significance than what is usually attributed to them.
"I think you underestimate the power of the floating point hardware in modern CPUs."
well, by average synthesizers with the same quality are many times slower than what i've written. either 1) my code is better or 2) the format is better or 3) ???
i've always been leaning toward "the format is better", but perhaps that is now proven incorrect?
"Or apparantly, as in this case, your INT versions had bugs? You certainly had less trouble coding the float version in this case. "
well, the float version didnt work while the int version did, previously, so much in fact that it convinced me that there was some problem with using floating point for the function. we still have not tested the function in the same ranges used in xhip, so it might be interesting to replace xhip's filter with a completely float version (perhaps the whole signal path) and see what differences there are. it might just be that the first time i tried to implement the float version i made some rediculous mistake in the code, but i've no idea how that would be possible unless i was drunk or something.
the original code wasnt mine, the original code was written by Christian. the only difference seems to have been the noise floor, and/or accuracy of the calculations. there wasnt really any strong preference, but thorkz did pick out the less accurate one. perhaps there is some correlation between thorkz's preferences and higher noise-floor/error ?
hm.. but apparently i was drunk when i wrote mmode.c, or atleast that can be my excuse. i've updated the code in order to compare a "naive float" version to my xhip version. the difference is mostly due to the lower accuracy for small numbers in int. the lower accuracy for large numbers in float doesnt make much difference, at least not one which is perceptible.
an interesting thing i notice though is that the more "perfect" float version sounds dull, plastic-like. you know with the "digital" timbre people refer to. the int version sounds more full and "natural", due to the error level changing the parameters in certain places. the feedback at high frequencies becomes reduced significantly compared to the float version for example. you could intentionally add these properties to the float version, however this reminds me of analog vs. digital debate. the int version adds something through error (like analog electronics) to the timbre that is difficult if not near impossible to add and get right in float. these things may actually have more significance than what is usually attributed to them.
"I think you underestimate the power of the floating point hardware in modern CPUs."
well, by average synthesizers with the same quality are many times slower than what i've written. either 1) my code is better or 2) the format is better or 3) ???
i've always been leaning toward "the format is better", but perhaps that is now proven incorrect?
-
- KVRian
- 770 posts since 2 Apr, 2003
Well it is true that on Intel processors the FPU hasn't been accelerated all that much in recent years, the SSE unit is faster, even on scalars.
-
- KVRian
- 770 posts since 2 Apr, 2003
Which code are you talking about now? Yours, or Christians?aciddose wrote:an interesting thing i notice though is that the more "perfect" float version sounds dull, plastic-like. you know with the "digital" timbre people refer to. the int version sounds more full and "natural", due to the error level changing the parameters in certain places. the feedback at high frequencies becomes reduced significantly compared to the float version for example. you could intentionally add these properties to the float version, however this reminds me of analog vs. digital debate. the int version adds something through error (like analog electronics) to the timbre that is difficult if not near impossible to add and get right in float. these things may actually have more significance than what is usually attributed to them.
- u-he
- 30215 posts since 8 Aug, 2002 from Berlin
If you mean that bugs make integer sound better... then, seriously, I think you're loosing itaciddose wrote:these things may actually have more significance than what is usually attributed to them.
- KVRAF
- 12615 posts since 7 Dec, 2004
i'm not talking about any bugs. also, my code didnt have any bugs until i "matched" the int version to the float version. i wasnt thinking in terms of int, and so the result was that i didnt realize that wrapping would occur. a minimum of 18db headroom is required to prevent wrapping in the int version.
the error is what i'm referring to here, and you know everything that makes an analog synthesizer sound analog is in fact error. you can count it all as error - nobody doubts that they sound a lot better than software.
based upon our tests, it seems any problems with software will never be solved by increasing the precision of the data types used. it seems the float version operates as close to "perfect" as human ears will ever be able to detect. so, if any exactly matched code ever sounds better in int, it must be attributed to the lower accuracy of the data type used.
personally though, i've never believed that the data type has any significant impact. all my theorizing in this thread has been an attempt to match some of my experience up with the results of christian's test plugin. while the sample size was very small and the results definitely are masked by a high level of noise, the probability of thorkz's results matching up with his opinions is only 1/3. it's plausible that this is a coincidence, but it is unlikely.
i didnt consider that the increase in error, or technically the shift in balance of error terms between float and int would have a significant impact without some more complex action taking place. we've ruled out all of my theories for complex actions at these scales and so that leaves us only one option. unless somebody else wants to try thinking up some theories?
the error is what i'm referring to here, and you know everything that makes an analog synthesizer sound analog is in fact error. you can count it all as error - nobody doubts that they sound a lot better than software.
based upon our tests, it seems any problems with software will never be solved by increasing the precision of the data types used. it seems the float version operates as close to "perfect" as human ears will ever be able to detect. so, if any exactly matched code ever sounds better in int, it must be attributed to the lower accuracy of the data type used.
personally though, i've never believed that the data type has any significant impact. all my theorizing in this thread has been an attempt to match some of my experience up with the results of christian's test plugin. while the sample size was very small and the results definitely are masked by a high level of noise, the probability of thorkz's results matching up with his opinions is only 1/3. it's plausible that this is a coincidence, but it is unlikely.
i didnt consider that the increase in error, or technically the shift in balance of error terms between float and int would have a significant impact without some more complex action taking place. we've ruled out all of my theories for complex actions at these scales and so that leaves us only one option. unless somebody else wants to try thinking up some theories?
Last edited by aciddose on Mon Jun 18, 2007 12:22 pm, edited 1 time in total.
-
- KVRAF
- 4738 posts since 20 Feb, 2004 from Gothenburg, Sweden
now that just isn't trueaciddose wrote:you can count it all as error - nobody doubts that they sound a lot better than software.
Stefan H Singer
https://dropshotaudio.com/
https://dropshotaudio.com/
- KVRAF
- 12615 posts since 7 Dec, 2004
ok, so we have doubts, but these come generally from those with little or no experience in the analog world.. unless you're an exceptional case here? 
if you can tell me you've built your own modular and mucked about with analogs for fifteen years, my above statement will definitely be proven incorrect.
if you can tell me you've built your own modular and mucked about with analogs for fifteen years, my above statement will definitely be proven incorrect.
-
- KVRian
- 770 posts since 2 Apr, 2003
Hmmmm, maybe unlikely means something different on your planet?aciddose wrote:the probability of thorkz's results matching up with his opinions is only 1/3. it's plausible that this is a coincidence, but it is unlikely.
-
- KVRAF
- 4738 posts since 20 Feb, 2004 from Gothenburg, Sweden
What? No, or, well, I could, but I'd lie. But the little I have used analog stuff, or digital synths with analog outputs for that matter, still lets me form an opinion. It's not like "analog sounds better" is a fact, and "nobody doubts that they sound a lot better than software" just isn't true if there's a single person who thinks software sounds better. And I do. It's all subjective. For me the noise levels alone bug me enough for me to prefer software, even on digital synths with analog outputs. That said, quite often, software sounds worse than hardware (imo), but comparing entirely different instruments sound qualities to each other is again something very subjective.aciddose wrote:ok, so we have doubts, but these come generally from those with little or no experience in the analog world.. unless you're an exceptional case here?
if you can tell me you've built your own modular and mucked about with analogs for fifteen years, my above statement will definitely be proven incorrect.
If you meant "nobody that has built their own modular and mucked about with analogs for fifteen years doubts that they sound a lot better than software" you should've said so
Stefan H Singer
https://dropshotaudio.com/
https://dropshotaudio.com/
-
- KVRian
- 1144 posts since 26 Sep, 2005 from Germany
that sounds interesting. So maybe its the non-perfection coding in every processing module that makes a virtual more close sounding to a real analog.an interesting thing i notice though is that the more "perfect" float version sounds dull, plastic-like. you know with the "digital" timbre people refer to. the int version sounds more full and "natural", due to the error level changing the parameters in certain places. the feedback at high frequencies becomes reduced significantly compared to the float version for example. you could intentionally add these properties to the float version, however this reminds me of analog vs. digital debate. the int version adds something through error (like analog electronics) to the timbre that is difficult if not near impossible to add and get right in float. these things may actually have more significance than what is usually attributed to them.
This could make sense.
I try to model somthing similar with a filter design in a creamware modular patch, randomly changing very slow amounts of cut_off and resonance with a smoothing module and a random_lfo with some interesting rewsults, so that the output sounds less "sterile" and "digital dead"
The error that may occur using int may work in a similar way and lead to a bit more variation. At the end this "error" is still a fixed phaenomena, meaning there still won't be a random changing outcome as the mathematical error is also reproduceable.
Hope this german-2-english translation still makes sense for you.
-
- KVRian
- 770 posts since 2 Apr, 2003
aciddose wrote:what this seems to show is that there isnt really much difference in this case and probably many other cases between single and double. there is a major difference in many cases between float and int, though.
Hmmmmmaciddose wrote:personally though, i've never believed that the data type has any significant impact
-
- KVRian
- 770 posts since 2 Apr, 2003
This theory doesn't really seem to stand up to scrutiny any more than the "creeping error" theory, unless the general concensus of what gives analogue its desirable character is wrong.hifiboom wrote:that sounds interesting. So maybe its the non-perfection coding in every processing module that makes a virtual more close sounding to a real analog.an interesting thing i notice though is that the more "perfect" float version sounds dull, plastic-like. you know with the "digital" timbre people refer to. the int version sounds more full and "natural", due to the error level changing the parameters in certain places. the feedback at high frequencies becomes reduced significantly compared to the float version for example. you could intentionally add these properties to the float version, however this reminds me of analog vs. digital debate. the int version adds something through error (like analog electronics) to the timbre that is difficult if not near impossible to add and get right in float. these things may actually have more significance than what is usually attributed to them.
This could make sense.
I try to model somthing similar with a filter design in a creamware modular patch, randomly changing very slow amounts of cut_off and resonance with a smoothing module and a random_lfo with some interesting rewsults, so that the output sounds less "sterile" and "digital dead"
The error that may occur using int may work in a similar way and lead to a bit more variation. At the end this "error" is still a fixed phaenomena, meaning there still won't be a random changing outcome as the mathematical error is also reproduceable.
Hope this german-2-english translation still makes sense for you.
It is generally thought that the "character" of analogue circuits comes from their imperfections, both from the ideal, but also within themselves, so that for example no two oscillators are quite the same.
Now the differences from the ideal will be down to
Component tolerances (the resistor says 4k7 on it, but actually that's 4k7 +/- 5%)
Non linearities (the amp is supposed to be linear, but in reality it isn't, especially at the extremes of its range)
Thermal drift (as components warm up their values change, often at different rates on different channels)
Noise (thermal noise).
Of these the first two are probably considered potentially "nice" character, the third is generally a pain, and the last is really not much good to anyone (most synths have a noise generator to inject noise when they want it, the rest of the time why would we want it?)
With the exception of signal independent values like filter coefficients and gain values, which might result in a sweep not being as completely smooth (if you even notices), integer rounding errors are going to be random errors centred around zero, and changing not slowly, but rather 48000 times a second. With low signal complexity they may be quite correlated to the signal, giving very low (and generally unpleasant if you could hear it) distortion, whilst with a more complex input the correlation becomes far less detectable and you effectively get broadband noise.
So basically the errors in an integer system don't appear to make it more like an analogue circuit, with component tolerances causing slight differences in response and slow drifts back and forth, what they do is make it like an analogue circuit with perfect identical components and white noise.
-
- KVRian
- 1144 posts since 26 Sep, 2005 from Germany
rmm Jon,
I mean,
7 years ago, allmost all VSTi were toys and sounded crappy.
Now in todays virtual world the situation has changed a bit and we got relative good sounding and complex stuff coming close to external VA.
but still the words of "dull, plastic-like" seem to hit exactly the nail what is not done perfectly yet.
If instability of the oscillator can make a sound more nice, why not circuit dependent low level noise?
Does there really exist something like this?concensus of what gives analogue its desirable character is wrong
I mean,
7 years ago, allmost all VSTi were toys and sounded crappy.
Now in todays virtual world the situation has changed a bit and we got relative good sounding and complex stuff coming close to external VA.
but still the words of "dull, plastic-like" seem to hit exactly the nail what is not done perfectly yet.
If instability of the oscillator can make a sound more nice, why not circuit dependent low level noise?
-
- KVRian
- 770 posts since 2 Apr, 2003
Well it's easy enough to test, just add noise to the sound of your oscillator.hifiboom wrote:rmm Jon,
Does there really exist something like this?concensus of what gives analogue its desirable character is wrong
I mean,
7 years ago, allmost all VSTi were toys and sounded crappy.
Now in todays virtual world the situation has changed a bit and we got relative good sounding and complex stuff coming close to external VA.
but still the words of "dull, plastic-like" seem to hit exactly the nail what is not done perfectly yet.
If instability of the oscillator can make a sound more nice, why not circuit dependent low level noise?
the only time I can envisage it being an advantage is as a mask to other artifacts, but it hardly seems like some kind of universal solution.

