function generator
[sim,out] = ld_fngen(sim, events, shape_, period, amp)
shape_ - the shape of the output signal: =0 : sinus, more to come...
period, amp * - Periode length in samples and amplitude
out * - output