![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
Language Guide / Units and Conversions
klang::Pitch
Musical pitch as a MIDI note number.
Use Pitch for note values. Convert with -> Frequency to obtain the frequency in Hz. This example gives concert A. See Frequency for the reciprocal conversion.
const param hz = Pitch(69) -> Frequency;Control parameter (pitch) More...
#include <klang.h>
Inheritance diagram for klang::Pitch:Public Member Functions | |
| const char * | text () const |
| const Pitch * | operator-> () |
| template<typename TYPE > | |
| Pitch | operator+ (TYPE in) |
| template<typename TYPE > | |
| Pitch | operator- (TYPE in) |
| template<typename TYPE > | |
| Pitch | operator* (TYPE in) |
| template<typename TYPE > | |
| Pitch | operator/ (TYPE in) |
| param (constant in) | |
| param (const float initial=0.f) | |
| param (const signal &in) | |
| param (signal &in) | |
| param (Control &in) | |
| template<typename SOURCE , std::enable_if_t<!std::is_arithmetic_v< std::decay_t< SOURCE > > &&!std::is_base_of_v< signal, std::decay_t< SOURCE > > &&!std::is_same_v< std::decay_t< SOURCE >, Control > &&std::is_convertible_v< SOURCE &&, const signal & >, int > = 0> | |
| param (SOURCE &&source) | |
| param & | operator+= (const increment &increment) |
| 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. | |
| 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-= (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 |
Static Public Attributes | |
| static THREAD_LOCAL Conversion | Frequency |
|
inlineinherited |
|
inlineinherited |
Definition at line 1229 of file klang.h.
References klang::signal::value.
|
inlineinherited |
|
inlineinherited |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 1499 of file klang.h.
References klang::increment::amount, and klang::increment::size.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
Definition at line 1705 of file klang.h.
References klang::power().
|
inline |
|
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.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
inline |
|
inlinestatic |
|
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().