![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
Language Guide / Signal Flow
klang::relative
A value expressed relative to a complete unit.
An overload that accepts relative interprets the value according to the object. For the standard oscillator phase-offset setter, 1 represents a whole cycle and 0.25 represents a quarter cycle. Unary + on a Klang value such as a signal selects the relative form. Apply it to a named value to write +phase inline.
const signal phase = 0.25;
sine.set(440, +phase);A signal used as an offset relative to another signal. More...
#include <klang.h>
Inheritance diagram for klang::relative:Public Member Functions | |
| 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) |
| Adds processed output of in to signal. | |
| signal & | operator+= (const signal &x) |
| Add (mix) another signal to the signal. | |
| signal & | operator+= (float x) |
| Add the specified amount to the signal. | |
| signal & | operator+= (double x) |
| Add the specified amount to the signal. | |
| signal & | operator+= (int x) |
| Add the specified amount to the signal. | |
| signal & | operator-= (const signal &x) |
| Subtract another signal from the signal. | |
| signal & | operator-= (float x) |
| Subtract the specified amount from the signal. | |
| signal & | operator-= (double x) |
| Subtract the specified amount from the signal. | |
| signal & | operator-= (int x) |
| Subtract the specified amount from the signal. | |
| signal & | operator*= (const signal &x) |
| Multiply (modulate) signal by another signal. | |
| signal & | operator*= (float x) |
| Multiply signal by the specified amount. | |
| signal & | operator*= (double x) |
| Multiply signal by the specified amount. | |
| signal & | operator*= (int x) |
| Multiply signal by the specified amount. | |
| signal & | operator/= (const signal &x) |
| Divide signal by another signal. | |
| signal & | operator/= (float x) |
| Divide signal by the specified amount. | |
| signal & | operator/= (double x) |
| Divide 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+ (double 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. | |
| relative | operator+ () const |
| Returns a copy of the signal to treat as a relative offset (e.g. for phase modulation). | |
| signal | operator- (float x) const |
| Subtract one signal from another. | |
| signal | operator- (double 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* (float x) const |
| Multiply (modulate) two signals. | |
| signal | operator* (double x) const |
| Return a copy of the signal scaled by x. | |
| signal | operator* (int x) const |
| Return a copy of the signal scaled by x. | |
| signal | operator/ (float x) const |
| Divide one signal by another. | |
| signal | operator/ (double x) const |
| Return a copy of the signal divided by. | |
| 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 | relative () const |
| Returns a copy of the signal to treat as a relative offset (e.g. for phase modulation). | |
Public Attributes | |
| float | value |
|
inlineinherited |
|
inlineinherited |
Definition at line 1229 of file klang.h.
References klang::signal::value.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 1139 of file klang.h.
References klang::signal::value.
Definition at line 1145 of file klang.h.
References klang::signal::value.
|
inlineinherited |
Definition at line 1221 of file klang.h.
References klang::power(), and klang::signal::value.
|
inlineinherited |
Definition at line 1219 of file klang.h.
References klang::power(), and klang::signal::value.
|
inlineinherited |
Definition at line 1223 of file klang.h.
References klang::power(), and klang::signal::value.
|
inlineinherited |
|
inherited |
Definition at line 1124 of file klang.h.
Referenced by klang::Amplitude::Amplitude(), klang::Controls::add(), klang::signal::isDenormal(), klang::Control::normalised(), klang::signal::operator const float(), klang::Control::operator float(), klang::signal::operator float &(), klang::signal::operator*(), klang::signal::operator*(), klang::signal::operator*(), klang::signal::operator*=(), klang::signal::operator*=(), klang::signal::operator*=(), klang::signal::operator*=(), klang::signal::operator+(), klang::signal::operator+(), klang::signal::operator+(), klang::signal::operator+(), klang::signal::operator+=(), klang::signal::operator+=(), klang::signal::operator+=(), klang::signal::operator+=(), klang::signal::operator-(), klang::signal::operator-(), klang::signal::operator-(), klang::signal::operator-=(), klang::signal::operator-=(), klang::signal::operator-=(), klang::signal::operator-=(), klang::signal::operator/(), klang::signal::operator/(), klang::signal::operator/(), klang::signal::operator/=(), klang::signal::operator/=(), klang::signal::operator/=(), klang::signal::operator/=(), klang::signal::operator<<(), klang::signal::operator>>(), klang::signal::operator^(), klang::signal::operator^(), klang::signal::operator^(), klang::signal::relative(), klang::Modifiers::Modal::set(), and klang::Control::setNormalised().