Equations for generating waveforms with variable sample size?

Apr 10, 2010 at 10:20am

Equations for generating waveforms with variable sample size?

My current patch concept is to combine multislider with peek~ to draw waveforms. The size of the multislider/buffer~ is controlled by a menu so that I can have a 512-sample waveform, 64 samples, 1024 samples, etc.

I also want preset buttons so that when I press the “Sine” message with the size in menu set to 256 samples, for example, then a uzi is triggered to output 256 bangs to a counter which is sent to an expression to generate waveform values for the multislider. (similar to wolek’s winmaker but for audio instead of windowing)

My issue is that I don’t know where to find the equations to generate the preset waveforms. I can find equations for a set sample size but not variable. My presets will just be the standard waveforms: sine, square/pulse, triangle, and ramp/sawtooth.

Apr 11, 2010 at 3:17am

I found buffer~ writer and have figured out how to adapt the math for different sample lengths. Consider the question solved, the forum won’t let me delete this thread though.


You must be logged in to reply to this topic.