35 using namespace Nsound;
50 pulse_width_(pulse_width),
PulseUnits units_
The default pulse width to use.
float64 generate(const float64 &frequency)
This is a real-time method for the Pulse generator.
float64 pulse_width_
The falling edge time for the pulse.
void reset()
Resets the position pointer back to the begging of the waveform.
float64 fall_t_
The rising edge time for the pulse.
float64 t_
The time step between samples in seconds.
float64 generate2(const float64 &frequency, const float64 &pulse_width)
This is a real-time method for the Pulse generator.
Pulse(const float64 &sample_rate, const float64 &pulse_width, const PulseUnits &units=PULSE_PERCENT)
Creates a new Pulse Generator.
float64 sample_time_
The number of samples per second to generate.
A Buffer for storing audio samples.
A class the provides draw utilities and a wavetable oscillator.
virtual float64 generate2(const float64 &frequency, const float64 &phase)
This is a real-time method for the wavetable oscillator.