Hallo, Carlos Pita hat gesagt: // Carlos Pita wrote:
Do you know how can I fill an arbitrarily sized array with a line strip? The goal is to write square, sawtooth, triangular and other simple waves like that and then loop with tabread4~. The array size can be reconfigured, so I don't want to load the table from a presampled file but instead to resample it from the original function when the array is resized. Doing it with line~ is too awkward, scheduling delays and like that, and
...
You can use [vline~] instead, which accepts messages consisting of line segments and is not limited to only one segment.
See attached patch for one possible way to use it. It would need some tinkering to adapt to variable array sizes, but I hope, the basic principle becomes clear, the only thing left to do is scaling the values send to vline~ dynamically to match the current array size. And of course you'd need to decide on a way how to specify the line segments in regard to array size (like: going from 0 to 1 over half the array size could become a message like: [0 1 0.5(, then you'd need to multiply 0.5 with the arraysize and divide by samplerate/1000.)
Frank Barknecht _ ______footils.org__
_ __latest track: "scans" _ http://footils.org/cms/show/41