PaulStoffregen / Audio

Teensy Audio Library
http://www.pjrc.com/teensy/td_libs_Audio.html
1.11k stars 408 forks source link

Pulse waveform missing #61

Closed svgeesus closed 10 years ago

svgeesus commented 10 years ago

One of the most frequently used synthesizer waveforms is a pulse ( a rectangular wave with adjustable mark/space ratio). The square wave is a special case of pulse, with 50% mark/space. It is also common to modulate the pulse width dynamically.

Suggest two waveforms: pulse (with a single fixed value of duty cycle, between 0.0 and 1.0) and pulse_pwm (using any audio signal to continuously modulate the pulse width). These could be added as new enumerated types to waveform, or added as separate functions, depending on what is easiest to add.

(These should also pick up the _fm additions suggested in a separate issue).

svgeesus commented 10 years ago

pulse is implemented by https://github.com/PaulStoffregen/Audio/pull/63