Klang C++
Language Reference (draft)
|
A mono audio signal (equivalent to a float). More...
#include <klang.h>
Public Member Functions | |
signal (constant initial) | |
Create signal from a constant. | |
signal (const float initial=0.f) | |
Create signal from a 32-bit float.. | |
signal (const double initial) | |
Create signal from a 64-bit double. | |
signal (const int value) | |
Create signal from an 32-bit signed integer. | |
const signal & | operator<< (const signal &input) |
Feedback operator (prevents further processing of returned value). | |
signal & | operator>> (signal &destination) const |
Stream operator (feedforward; allows further processing) | |
signal & | operator= (Output &in) |
Assign processed output of in to signal. | |
signal & | operator+= (Output &in) |
Adds processed output of in to signal. | |
signal & | operator+= (const signal &x) |
Add (mix) another signal to the signal. | |
signal & | operator-= (const signal &x) |
Subtract another signal from the signal. | |
signal & | operator*= (const signal &x) |
Multiply (modulate) signal by another signal. | |
signal & | operator/= (const signal &x) |
Divide signal by another signal. | |
signal & | operator+= (float x) |
Add the specified amount to the signal. | |
signal & | operator-= (float x) |
Subtract the specified amount from the signal. | |
signal & | operator*= (float x) |
Multiply signal by the specified amount. | |
signal & | operator/= (float x) |
Divide signal by the specified amount. | |
signal & | operator+= (double x) |
Add the specified amount to the signal. | |
signal & | operator-= (double x) |
Subtract the specified amount from the signal. | |
signal & | operator*= (double x) |
Multiply signal by the specified amount. | |
signal & | operator/= (double x) |
Divide signal by the specified amount. | |
signal & | operator+= (int x) |
Add the specified amount to the signal. | |
signal & | operator-= (int x) |
Subtract the specified amount from the signal. | |
signal & | operator*= (int x) |
Multiply signal by the specified amount. | |
signal & | operator/= (int x) |
Divide signal by the specified amount. | |
signal | operator+ (float x) const |
Add two signals together. | |
signal | operator- (float x) const |
Subtract one signal from another. | |
signal | operator* (float x) const |
Multiply (modulate) two signals. | |
signal | operator/ (float x) const |
Divide one signal by another. | |
signal | operator+ (double x) const |
Return a copy of the signal offset by x. | |
signal | operator- (double x) const |
Return a copy of the signal offset by -x. | |
signal | operator* (double x) const |
Return a copy of the signal scaled by x. | |
signal | operator/ (double x) const |
Return a copy of the signal divided by. | |
signal | operator+ (int x) const |
Return a copy of the signal offset by x. | |
signal | operator- (int x) const |
Return a copy of the signal offset by -x. | |
signal | operator* (int x) const |
Return a copy of the signal scaled by x. | |
signal | operator/ (int x) const |
Return a copy of the signal divided by x. | |
signal | operator^ (float x) const |
Return a copy of the signal raised to the power of x. | |
signal | operator^ (double x) const |
Return a copy of the signal raised to the power of x. | |
signal | operator^ (int x) const |
Return a copy of the signal raised to the power of x. | |
operator const float () const | |
operator float & () | |
bool | isDenormal () const |
Check if the signal contains a denormal value. | |
int | channels () const |
Returns the number of channels (1 = mono). | |
relative | operator+ () const |
Returns a copy of the signal to treat as a relative offset (e.g. for phase modulation). | |
relative | relative () const |
Returns a copy of the signal to treat as a relative offset (e.g. for phase modulation). | |
Public Attributes | |
float | value |
|
inline |
Definition at line 366 of file klang.h.
References klang::constant::f, and value.
|
inline |
Definition at line 369 of file klang.h.
References value.
Referenced by klang::param::param(), klang::param::param(), klang::signals< CHANNELS >::signals(), klang::signals< CHANNELS >::signals(), and klang::operator>>().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 435 of file klang.h.
References value.
Referenced by klang::Stereo::frame::mono(), klang::Stereo::frame::operator*(), klang::Stereo::frame::operator*(), klang::Stereo::frame::operator*(), klang::Stereo::frame::operator*(), klang::Stereo::frame::operator*(), klang::Generators::Fast::Phase::operator=(), klang::Generators::Basic::Pulse::process(), klang::Generators::Basic::Saw::process(), klang::Envelope::Follower::rms(), klang::Filters::Biquad::Filter::set(), klang::Generators::Fast::Sine::set(), klang::Generic::Oscillator< SIGNAL >::set(), klang::Generic::Oscillator< SIGNAL >::set(), klang::Wavetable::set(), klang::Wavetable::set(), klang::Wavetable::set(), klang::Generators::Fast::OSM::setDuty(), and klang::Control::smooth().
|
inline |
Definition at line 399 of file klang.h.
References value.
Referenced by klang::buffer::operator*=(), klang::Stereo::frame::operator*=(), klang::Stereo::frame::operator*=(), and klang::Stereo::frame::operator*=().
|
inline |
|
inline |
Definition at line 408 of file klang.h.
References value.
Referenced by klang::Control::operator*=(), klang::Stereo::frame::operator*=(), klang::Stereo::frame::operator*=(), and klang::Stereo::frame::operator*=().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 431 of file klang.h.
References value.
Referenced by klang::Stereo::frame::mono(), klang::Stereo::frame::operator+(), klang::Stereo::frame::operator+(), klang::Stereo::frame::operator+(), klang::Stereo::frame::operator+(), klang::Stereo::frame::operator+(), klang::Envelope::Follower::AR::process(), klang::Filters::Butterworth::LPF::process(), klang::ADSR::set(), and klang::Control::smooth().
|
inline |
Definition at line 395 of file klang.h.
References value.
Referenced by klang::buffer::operator+=(), klang::Stereo::frame::operator+=(), klang::Stereo::frame::operator+=(), and klang::Stereo::frame::operator+=().
|
inline |
|
inline |
Definition at line 404 of file klang.h.
References value.
Referenced by klang::Envelope::Linear::operator++(), klang::Control::operator+=(), klang::Stereo::frame::operator+=(), klang::Stereo::frame::operator+=(), and klang::Stereo::frame::operator+=().
|
inline |
|
inline |
|
inline |
Definition at line 433 of file klang.h.
References value.
Referenced by klang::Envelope::at(), klang::Stereo::frame::operator-(), klang::Stereo::frame::operator-(), klang::Stereo::frame::operator-(), klang::Stereo::frame::operator-(), klang::Stereo::frame::operator-(), klang::Envelope::Follower::AR::process(), and klang::Generators::Basic::Saw::process().
|
inline |
Definition at line 397 of file klang.h.
References value.
Referenced by klang::Stereo::frame::operator-=(), klang::Stereo::frame::operator-=(), and klang::Stereo::frame::operator-=().
|
inline |
|
inline |
Definition at line 406 of file klang.h.
References value.
Referenced by klang::Phase::operator+(), klang::Envelope::Linear::operator++(), klang::Control::operator-=(), klang::Stereo::frame::operator-=(), klang::Stereo::frame::operator-=(), and klang::Stereo::frame::operator-=().
|
inline |
|
inline |
|
inline |
Definition at line 437 of file klang.h.
References value.
Referenced by klang::Stereo::frame::operator/(), klang::Stereo::frame::operator/(), klang::Stereo::frame::operator/(), klang::Stereo::frame::operator/(), klang::Stereo::frame::operator/(), klang::Generators::Fast::Phase::operator=(), and klang::Generic::Oscillator< SIGNAL >::set().
|
inline |
Definition at line 401 of file klang.h.
References value.
Referenced by klang::Stereo::frame::operator/=(), klang::Stereo::frame::operator/=(), and klang::Stereo::frame::operator/=().
|
inline |
|
inline |
Definition at line 410 of file klang.h.
References value.
Referenced by klang::Control::operator/=(), klang::Stereo::frame::operator/=(), klang::Stereo::frame::operator/=(), and klang::Stereo::frame::operator/=().
|
inline |
Definition at line 384 of file klang.h.
References value.
Referenced by klang::Envelope::Follower::AR::process().
|
inline |
Definition at line 460 of file klang.h.
References klang::power(), and value.
|
inline |
|
inline |
|
inline |
float klang::signal::value |
Definition at line 363 of file klang.h.
Referenced by klang::Amplitude::Amplitude(), signal(), signal(), signal(), signal(), isDenormal(), operator const float(), klang::Control::operator float(), operator float &(), klang::Phase::operator%(), operator*(), operator*(), operator*(), operator*=(), operator*=(), operator*=(), operator*=(), klang::Phase::operator+(), operator+(), operator+(), operator+(), operator+(), klang::param::operator+=(), klang::Phase::operator+=(), klang::Phase::operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator-(), operator-(), operator-(), operator-=(), operator-=(), operator-=(), operator-=(), klang::Amplitude::operator->(), klang::dB::operator->(), klang::Pitch::operator->(), operator/(), operator/(), operator/(), operator/=(), operator/=(), operator/=(), operator/=(), operator<<(), operator>>(), operator^(), operator^(), operator^(), relative(), and klang::Pitch::text().