Tri~ Is Tiny and Deformed?

Andy Fennesz's icon

I'm working with several LFOs in a patch, and I noticed the Triangles are vastly diminished in amplitude and malformed. What could be going on? Thanks!

BrokenTri.maxpat
Max Patch

bdc's icon

from the tri~ reference page:

An antialiased triangular waveform. An ideal, straight-line triangular wave generated in a computer contains aliased frequencies that can sound irritating. tri~ produces a nice, analog-esque output waveform.

https://docs.cycling74.com/max8/refpages/tri~

triangle~ might be more appropriate for your purpose.

Andy Fennesz's icon

I'm sorry, I should have enlarged the "triangle" earlier to show the deformed shape.

This is with amplitude multiplied by 4. The anti-aliased triangle is slightly curved and slightly asymmetrical, but it still resembles a triangle, which I can't say for this shape.

bdc's icon

"tri~ produces a nice, analog-esque output waveform" that doesn't look like a triangle because of the antialiasing.

Roman Thilenius's icon


tri does not work here because it is simply not made for running at 0.5 Hz.

at 30 Hz it works like it should, and at 30Hz it is not even the worst idea to use a bandlimited waveform as LFO...

triangle is a funny object. you could do that yourself with 2 objects

Andy Fennesz's icon

Why is the amplitude so tiny?

Why do rectangles and cycles work just fine at LFO rates?

Roman Thilenius's icon


in rect~ they forgot to implement the bug.

👽'tW∆s ∆lienz👽's icon

Why is the amplitude so tiny?
Why do rectangles and cycles work just fine at LFO rates?

it's just the difference between "anti-aliased" oscillators and regular ones. the anti-aliased ones are meant to be run at audio-rates (20Hz and above) for optimal 'audio' quality(not 'lfo' rate). for below-audio rates(lfos) you want the 'pure' waveforms(anti-aliasing introduces a certain kind of filtering which reshapes the waveform in these ways, it is meant to keep digital harshness to a minimum when you change/control/generate things at higher/audio-rate frequencies, but causes this weird behavior at below-audio/lfo rates).

in rect~ they forgot to implement the bug

😂 haha, or maybe the different waveshape(steeper angularity), causes the anti-aliasing to react differently...
...
...also...
...i feel weird calling them 'tiny and deformed'...(🤣)
perhaps "different and special" is a more polite way of regarding the behavior of these waveforms 🎩

Roman Thilenius's icon


there is a certain eligibilty in his question, i just dont know the answer.

let´s assume they both use minBLEP at the zero crossing / at the tri´s peak or however it works: why does one look normal at 0.5 Hz and the other one not?

below around 3 Hz, tri seems to loose amplitude, no matter the scope setting.


👽'tW∆s ∆lienz👽's icon

there is a certain eligibilty in his question...

definitely a valid question. agreed.
..just to add one thing, if you change the
'duty cycle' of tri~ to create a steeper amount of change, it hits the anti-aliasing scheme(whatever it is) differently and allows more amplitude in(this is why i feel the answer is partially found in the way the steepness of slope in waveforms reacts to anti-aliasing differently... among other variables at work too, tho..):

Roman Thilenius's icon


yes, you are right, for "sawtooth" it would work.

i was first thinking maybe the blep is read out interpolated and that could somehow collide with the vectorsize(!), or the upsampling is not sufficient, but that would affect the HF situation, not the subs.