float VS double in Max/MSP
Hi folks,
I have been asking myself numerous times if the fact that all
communications between MSP objects is limited to float types is
something that will stay as such, or not.
More than once I encountered situations where this limitation did
affect the sound quality and was very tangible (IIR filters, soundfile
playback, etc...)
IMHO it would be more than beneficial for Max not only to start using
double as a general way of processing data internally to each object,
but also as a basic type for data exchange between objects (especially
in MSP land)
I am not expecting such a change in Max 5 and I am not even asking it
as a feature request. I understand it's a major upgrading job. I only
wanted to know if there have been thoughts in this direction, and what
are the pros and cons that have been considered.
Any comments?
Thank you.
- Luigi
------------------------------------------------------------
THIS E-MAIL MESSAGE IS FOR THE SOLE USE OF THE INTENDED RECIPIENT AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED INFORMATION. ANY UNAUTHORIZED REVIEW, USE, DISCLOSURE OR DISTRIBUTION IS PROHIBITED. IF YOU ARE NOT THE INTENDED RECIPIENT, CONTACT THE SENDER BY E-MAIL AT SUPERBIGIO@YAHOO.COM AND DESTROY ALL COPIES OF THE ORIGINAL MESSAGE. WITHOUT PREJUDICE UCC1-207.
------------------------------------------------------------
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
On Dec 6, 2007, at 11:36 AM, Luigi Castelli wrote:
> I am not expecting such a change in Max 5 and I am not even asking it
> as a feature request. I understand it's a major upgrading job. I only
> wanted to know if there have been thoughts in this direction, and what
> are the pros and cons that have been considered.
>
> Any comments?
The pro is obvious (higher precision floating point processing). Cons
are major reworking of the code base, and backwards compatibility
with existing 32bit compiled objects.
Plenty of thoughts have been put into this, and it will most likely
happen when we move to a 64bit version of Max/MSP. (Not Max 5), maybe
a year or two after that (but no promises). Since all objects will
need to be recompiled for 64bit, this simplifies trying to make older
third party 32 bit objects work in a 64bit world. So, that seems the
most appropriate time to make this switch for both Max atoms and MSP
signals to 64bit floating point numbers. Fear not. It *will* happen.
It's just a matter of when.
In the meantime, there's the HR objects for signal calculations or
perform this manipulation in C/Java/Javascript. More often than not,
the portions of a calculation which demand double precision floating
point can be localized and dealt with accordingly. As for simple
soundfile playback, anything other than the increment of playback
head as a double (which can be accomplished with the HR objects for
now) should not yield significantly audible sound quality
differences. All of our IIR filters use double precision internally
for the calculations and feedback stages.
-Joshua
Hi Luigi,
you wouldn't aks on this list if you weren't a develop of externals
yourself.
For many of my (flext-based) number-crunching objects i implemented the
possibility to output numbers with double precision by using a list with
two float arguments in the usual "(float)number number-(float)number"
style (just as the hr objects) when a @double attribute is set to 1. On
the other hand all of these objects understand a "list" or "double"
message into all relevant inlets with two float arguments as well as
normal "float" messages. Needless to say they all work with double
precision internally.
Using this convention it is easy to stay compatible with
single-precision objects as well as exploiting full precision with
objects that are compatible of handling it.
gr~~~
Luigi Castelli schrieb:
> Hi folks,
>
> I have been asking myself numerous times if the fact that all
> communications between MSP objects is limited to float types is
> something that will stay as such, or not.
>
> More than once I encountered situations where this limitation did
> affect the sound quality and was very tangible (IIR filters, soundfile
> playback, etc...)
>
> IMHO it would be more than beneficial for Max not only to start using
> double as a general way of processing data internally to each object,
> but also as a basic type for data exchange between objects (especially
> in MSP land)
>
> I am not expecting such a change in Max 5 and I am not even asking it
> as a feature request. I understand it's a major upgrading job. I only
> wanted to know if there have been thoughts in this direction, and what
> are the pros and cons that have been considered.
>
> Any comments?
>
> Thank you.
>
> - Luigi
>
>
>
>
> ------------------------------------------------------------
> THIS E-MAIL MESSAGE IS FOR THE SOLE USE OF THE INTENDED RECIPIENT AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED INFORMATION. ANY UNAUTHORIZED REVIEW, USE, DISCLOSURE OR DISTRIBUTION IS PROHIBITED. IF YOU ARE NOT THE INTENDED RECIPIENT, CONTACT THE SENDER BY E-MAIL AT SUPERBIGIO@YAHOO.COM AND DESTROY ALL COPIES OF THE ORIGINAL MESSAGE. WITHOUT PREJUDICE UCC1-207.
> ------------------------------------------------------------
>
>
>
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
>