Steve Harris wrote:
a quick test
(%s/double/float/g) shows the cpu usage doubling,
but i'm unsure what may cause this huge performance drop.
Lets just put it down to chache issues and ignore it ;)
can't ... ;) here's the output of gcc -O2 -S. this is what is
added for every coefficient in the float version wrt doubles:
...
fstps -4(%ebp)
flds -4(%ebp)
...
afaict, it truncates the algorithm's accumulator to float.
if we change the constant coefficients to come as floats
(appended 'f') this truncation is omitted, and the cpu cost
is the same (maybe a tad more) as for doubles. i conclude
that constant real values really need the 'f' if operating
with floats in gcc, and that there's little reason to use
them in DSP on x87 anyway if memory effects aren't essential.
doubles
should, on average, mean we seldom hit the denormal number
bounds, or at least less frequently than with floats. i also expect
doubles to be beneficial to the filter stability by minimizing
round-off error, though i may be wrong here. lastly, x87 uses 80 bits
Yes, though can manually truncate the floats, and floats will give half
the cache footprint, so play better with other software. I dont really
have a feel for when doubles are neccesary for filters yet.
on average, the branched truncate costs more in this filter
than simply ignoring denormals. for this particular filter,
there doesn't seem to be a good reason to switch to floats
at least on the system i use. if i was pressed for a rule,
i'd say use doubles unless you need to store lots of them.
Yes, you can always pep things up with a nonlinear
effect of somekind
before the cabinet+speaker sim. In FFT convolvers you take several
impulses at different amplitudes and shift between them.
currently, i'm looking at what a sine wave looks like after
it's been handled by a good distortion stomp box. the way it
shapes the wave form seems easy to grasp, but as usual, i
am hesitant to implement what i don't understand fully ...
I wouldn't worry too much aboout being very close
the the impulse, the're
only for a particular input amplitude and I can't remember when they came
from so may not be fantastic.
the recording seems to be of decent quality, and the iir
response irons away most of the noise anyway. but the most
important thing is i like the sound of it, which i do a lot.
i've tried about every of your impulses and, would you
believe it, liked the fenders the least. i regularly play
a fender super 60, for ten years or so. :) got to take
a response from it someday myself.
I'm wondering if this technique can be used for
reverbs too - generate a
purely "white" synthetic reverb tail, and apply an IIR the aproximate
shape of the rooms impulse to it to make it sound more real...
very interesting thought indeed. do you have a good response
for trying this? (sorry, "steve's flat" doesn't qualify,
"albert hall" is more like it ;)
tim