gibber-cc / gibber

An audiovisual live coding environment for the browser
MIT License
902 stars 79 forks source link

lfo waveforms are not scaled uniformly #64

Closed ianhattwick closed 3 years ago

ianhattwick commented 3 years ago

for the lfo() function, sine and triangle waves are bipolar whereas saw and square waves are unipolar

s = Synth()

s.note.seq([0,1,2,3], 1/4) s.gain = lfo('sin', btof(1), 0.3, 0.) //twice as fast s.gain = lfo('sin', btof(1), 0.3, 0.3) s.gain = lfo('square', btof(1), 0.3, 0.) s.gain = lfo('saw', btof(1), 0.3, 0.) s.gain = lfo('triangle', btof(1), 0.3, 0.3) //bipolar as well

ianhattwick commented 3 years ago

Also, is there documentation for the available waveforms for lfo() and for

s.note.seq( sine( btof( 1 ), 7, 0), 1/4)

style functions?

charlieroberts commented 3 years ago

no, there is no documentation, I'll look into that. Hopefully taking everything bipolar will be relatively easy as well.

ianhattwick commented 3 years ago

Cool - FYI i think it is only the square wave that is not bipolar (is true for the square() function as well).

On Apr 8, 2021, at 8:08 AM, charlie roberts @.***> wrote:

no, there is no documentation, I'll look into that. Hopefully taking everything bipolar will be relatively easy as well.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gibber-cc/gibber/issues/64#issuecomment-815730672, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPGSWBCFFCFKAPZFPC6UYTTHWMETANCNFSM42R5QJQQ.

charlieroberts commented 3 years ago

still no documentation, but all the waves (square, triangle, sine, noise) are correctly biased / scaled now.

charlieroberts commented 3 years ago

ok documentation added.

charlieroberts commented 3 years ago

I also added documentation for the lfo shorthands sine, square, tri, and saw.