SuperCollider CLASSES (extension)

DPW3Tri
ExtensionExtension

Triangle via 3rd order differerentiated polynomial waveform
Inherits from: UGen : AbstractFunction : Object

Description

Distortion creeps in for changes at low frequencies when under 200Hz. But very clean above that.

Class Methods

*ar (freq: 440, mul: 1, add: 0)

Arguments:

freq

Inherited class methods

Instance Methods

Inherited instance methods

Examples

//distortion creeps in under 200Hz
{ DPW3Tri.ar(XLine.kr(2000, 20, 10)) }.play; 

//very fast sweeps can have transient distortion effects
{ DPW3Tri.ar(MouseX.kr(200,12000,'exponential')) }.play;

//compare:
{LFTri.ar(MouseX.kr(200,12000,'exponential'))}.play


//less efficient than LFTri
{ Mix(DPW3Tri.ar(Array.rand(10,50,5000))*0.1) }.play;

{ Mix(LFTri.ar(Array.rand(10,50,5000))*0.1) }.play;


//triangle is integration of square wave; warning loud, not so kind 
{Integrator.ar(Pulse.ar(MouseX.kr(440,8800),0.5),0.99)}.play

//differentiation of triangle is square
{HPZ1.ar(2.0*DPW3Tri.ar(MouseX.kr(440,8800)))}.play

//compare
{Pulse.ar(MouseX.kr(440,8800),0.5)}.play