Why 512 point sine wave from cycle~?
Hi there!
Working my way through various YouTube videos and C74 docs to learn, I came across the section on the cycle object; which says: " It reads through a list of 512 values at a specified rate, looping back to the beginning of the list when it reaches the end. "
This got me wondering, if a list of 1024 / 2056 / etc. values would produce a "cleaner" sound - and if there's any objects in Max that do this?
Any insight into this would be greatly appreciated!
:)
check out the cycle~ helpfile(the info. you got is outdated information; around Max6 or so, can't remember, the internal wavetable to cycle~ was updated to cycle through 16k samples).
under the 'buffer' tab in the cycle~ helpfile, you'll see you can use your own wavetable by setting cycle~ to a buffer~ of your choosing(but in that tab, it also explains the internal wavetable is already at 16k(i'm guessing it might actually be 16384 to be exact)).
yes, it does produce a cleaner sound(smoother i'd say... sampling-rate and frequency of playback all come into play as well, but overall, it's better in sound and control 'capabilities'). you can also use any of the sample playback objects to do this like index~, play~, etc. and especially wave~(which is designed to work like a wavetable similar to cycle~). anything which uses buffer~ can be used like a wavetable(and buffer~ can be set to be filled with a sine wave on its own, see its helpfile).
basically, there are so many options for this it's hard to describe. so i'd recommend checking out the 'buffer' tab of the cycle~ helpfile first, and then check out the wave~ object(and get to know buffer~ as well).
also check out the 'reference' files(can be navigated to from within any helpfile by the question mark tab, or by the appropriate 'reference' icon on the right-toolbar(depending on whether you've worked within the helpfile yet or not, you might need to have the cycle~ object selected to see its appropriate info. via the right-toolbar)) - reference files will give you deeper details into objects, for example, checking out the "buffer_sizeinsamps" attribute gives you the following additional info., a crucial part of it is using a size which is a power of two:
@buffer_sizeinsamps:
Override the size of the buffer used for the wavetable. If using the set message the size will be 512, or if using the setall message the size will be the whole buffer~ length. Use this attribute to define a different size (the size should be a power of two). Setting this size to 0 will result in an effective size of 512 and setting it to -1 will result an effective size of the whole buffer~ length. Possible values:
'-1'
'0'
'16'
'32'
'64'
'128'
'256'
'512'
'1024'
'2048'
'4096'
'8192'
'16384'
'32768'
'65536'
hope it helps🍻
Wow, thanks alot! This is so complex and weird but I love it.
like raja says, back in the days it was only 512, so it is now 512 by default but allows more.
and 512 is enough for many real life applications (such as oscillators).
before i´d use 4096 to read it out using bicubic interpolation i´d rather use cos~.
the other alternative is, of course, the wave~ object.
so it is now 512 by default
just to be clear, it's 16k by default, as shown here in the helpfile:

oh, sorry, but thats not good if that changed with max8 ?
oh yeah, only when it doenst have a name argument, i see.