desc:Tremolo

// Copyright (C) 2012-2017 Theo Niessink <theo@taletn.com>
// This work is free. You can redistribute it and/or modify it under the
// terms of the Do What The Fuck You Want To Public License, Version 2,
// as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.

slider1:4.0<0.0,20.0,0.1>Rate (Hz)
slider2:-9.0<-384.0,0.0,0.1>Amount (dB)

import Tale/lfo.jsfx-inc

@slider

lfo.lfo_setf(slider1);
amount = 0.5*(exp(log(10)/20 * slider2) - 1);

@sample

trem = amount * (lfo.lfo_sin() + 1) + 1;
spl0 *= trem;
spl1 *= trem;
