#include <synth.h>
Public Member Functions | |
| Oscillator () | |
| void | setfreq (float f) |
| void | setwaveform (int32_t x) |
| void | step (void) |
| uint32_t | get_phase (void) |
| int32_t | output (void) |
Private Attributes | |
| uint32_t | phase |
| uint32_t | dphase |
| uint32_t | waveform |
| int32_t Oscillator::output | ( | void | ) |
Definition at line 270 of file synth.cpp.
Referenced by SimpleVoice::output(), TwoSquaresVoice::output(), and NoisyVoice::step().

|
inline |
Definition at line 257 of file synth.h.
Referenced by SimpleVoice::setfreq(), TwoSquaresVoice::setfreq(), and NoisyVoice::setfreq().

|
inline |
Definition at line 260 of file synth.h.
Referenced by NoisyVoice::NoisyVoice(), SimpleVoice::SimpleVoice(), and TwoSquaresVoice::TwoSquaresVoice().

|
inline |
Definition at line 265 of file synth.h.
Referenced by SimpleVoice::step(), TwoSquaresVoice::step(), and NoisyVoice::step().

|
private |
|
private |
Because the human ear is very sensitive to pitch, both the phase and dphase variables use the entire 32-bit unsigned range.
Definition at line 243 of file synth.h.
Referenced by get_phase(), output(), and step().
|
private |
Definition at line 250 of file synth.h.
Referenced by Oscillator(), output(), and setwaveform().
1.8.6