I want to create a sine wave (not cosine) and load it into a buffer~ to be used with cycle~.

Here’s the formula

Let x be the sample number (so there are 513 samples)

0 < = x <= 512

f(x) = sin(2pi*x/512)

Which would result in 513 samples in the wave table with the f(0) = f(512), like it’s supposed to be according to the manual.

How do I create a sound file that size using max msp so it could be loaded into buffer~?

]]>good luck!

Timo ]]>

RB

– Pasted Max Patch, click to expand. –

]]>
But I don’t understand, Roald, why you divided by 511?

If there are 513 samples then the last value would be:

sin(2*pi*512/511) which is NOT equal to sin(2*pi*1), and so f(0) != f(512)

Please explain what I’m missing… or did you make a mistake?

]]>