Harmonics objects are convenient factories for creating Arrays that are used to fill buffers using the b_gen sine fill commands on the server.
Harmonics.new(size: 32)
Create a new Harmonics array of size. Nothing is filled in for you, until instance methods are applied.
.ramp(start: 1.0, step)
Implements the formula: 1 / ((i+1) ** k)
.geom(k: 1.2)
Implements the formula: 1 / (i ** k)
.formant(center: 12, width: 3)
Create a formant like structure.
.teeth(spacing: 2, start: 0)
Returns 1.0 to the nth place, fills the rest with 0.0
.shelf(start, end, startLevel: 1.0, endLevel: 0.0)
.sine(wavelength: 4, iphase: 1.5707963267949, mul: 1.0, add: 0.0)
.pulse(wavelength: 4, iphase: 0, duty: 0.5, mul: 1.0, add: 0.0)
.rand(lo: 0.0, hi: 1.0)
.exprand(lo: 0.01, hi: 1.0)
.linrand(lo: 0.0, hi: 1.0)
.rand2(val: 1.0)
.coin(prob: 0.5)
.size = value