create a table of 512 samples

Apr 15, 2009 at 3:42pm

create a table of 512 samples

Hi,
i’d like to use cycle˜ with buffer˜object to read a single waveform .

do you know how to create a table of 512 samples with a waveform like, for example, a triangular wave?

it would be nice to do that in a similar manner of gen7 in csound, simply rendering a wave of 512 samples containing some waveform.

thanks.
fv

#43381
Apr 15, 2009 at 3:55pm

[counter 0 511], then append the waveform data, then [peek~], thats one of many ways.

for a ramp you would calculate the waveform with [/ 512.], for a triwave you could do [+1], [split 256], [* -1.], [/ 256.], for a cosine is a bit more complicated, but it is possible to find it out.

#155609

You must be logged in to reply to this topic.