Forums > Beta

Mistakes in 6.0 SDK?

Oct 19 2011 | 8:41 am

In the updated "simplemsp~" example, the "float" message method declaration accepts a double, not a float as one might expect. Is this a typo, or does Max 6 now secretly pass around doubles, with unsupporting objects just taking the MSB?

void simplemsp_float(t_simplemsp *x, double f);

Also, take a look at this (32-bit perform method):

t_simplemsp *x = (t_simplemsp *)(w[1]);
t_float *inL = (t_float *)(w[2]);
t_float *outL = (t_float *)(w[3]);
int n = (int)w[4];

Compared to this (64-bit perform method):

t_double *inL = ins[0];
t_double *inR = ins[1];
t_double *outL = outs[0];

The 32 bit method has only 1 input and 1 output, whereas the 64-bit method has 2 inputs and 1 output. Am I missing something, or is this just a mistake?

Oct 19 2011 | 11:35 am

For as long as I can remember it has been necessary to declare typed float arguments as doubles for windows compatibility at least. The A_FLOAT type is still an actual float though….


Oct 19 2011 | 11:46 am

Ah, thanks. C’est un peu bizarre, non?

Viewing 3 posts - 1 through 3 (of 3 total)

Forums > Beta