packages feed

hdf-0.7: Help/UGen/Oscillator/lf_pulse.help.lhs

lf_pulse f ip w

A non-band-limited pulse oscillator. Outputs a high value of one
and a low value of zero.

   f - frequency (in hertz)
  ip - initial phase (0, 1)
   w - pulse width duty cycle (0, 1)

> import Sound.DF

> do { o1 <- fmap (\x -> x * 200.0 + 200.0) (lf_pulse 3.0 0.0 0.3)
>    ; o2 <- fmap (\x -> x * 0.1) (lf_pulse o1 0.0 0.2)
>    ; audition [] (out1 o2) }