triangle wave problems


    Apr 28 2006 | 7:39 pm
    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.

    • Apr 28 2006 | 7:54 pm
      just checking, but is there a reason that the triangle~ and tri~ objects don't work for you?
    • Apr 28 2006 | 8:36 pm
      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.
    • Apr 28 2006 | 8:50 pm
      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
    • May 04 2006 | 6:33 pm
      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:
    • May 04 2006 | 6:56 pm
      At 44.1kHz 11.61 milliseconds makes a buffer~ with 512 samples. You want a buffer~ with 513 samples.
      Ben
    • May 04 2006 | 8:39 pm
      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.
    • May 04 2006 | 11:30 pm
      hi, this works for me. cheers, volker.
    • May 05 2006 | 3:19 pm
      thanks! works here too.