triangle wave problems
i'm trying to create a triangle waveform from a phasor~ - like cycle~ (i have a ramp buffer that cycle~ refers to). I won't get into why I'm using cycle~ instead of phasor~...BUT, I'm getting a strange discontinuity that I can't figure out. This patch demonstrates the problem (XP). Why does does the cycle~-based version behave differently????
Peter.
just checking, but is there a reason that the triangle~ and tri~ objects
don't work for you?
i'll be damned! I didn't know triangle~ existed. Thanks for that. tri~ doesn't "work" for me because it's anti-aliased. I'm still curious why the above doesn't work right, though.
On 28-Apr-2006, at 21:39, pnyboer wrote:
> BUT, I'm getting a strange discontinuity that I can't figure out.
Going back to The Book:
>> The cycle~ object is an interpolating oscillator that reads
>> repeatedly through one cycle of a
>> waveform, using a wavetable of 512 samples. Its default waveform
>> is one cycle of a cosine
>> wave. It can use other waveforms by accessing samples from a
>> buffer~ object. The 513th
>> sample in the wavetable source (the buffer~) is used for
>> interpolation beyond the 512th
>> sample.
That last sentence is, I think, what's killing you. Try defining that
513th sample at loadbang time.
-- P.
-------------- http://www.bek.no/~pcastine/Litter/ -------------
Peter Castine +---> Litter Power & Litter Bundle for Jitter
Heavy-Duty Mathematics for Everyday Use
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de
hmmm...ok, that 513th doesn't really do it either. here's a patch that demonstrates the problem I'm having. Theoretically, the cycle~ phasr should be the same as phasor~. Practically, it's not:
At 44.1kHz 11.61 milliseconds makes a buffer~ with 512 samples. You
want a buffer~ with 513 samples.
Ben
hmmm...right. but I still the clicks if I change the buffer size to 11.63265. Did changing this fix the problem for you, or is it just an observation of me being absent minded? :)
p.
hi,
this works for me.
cheers,
volker.
thanks! works here too.