Klang C++
Language Reference (draft)
Loading...
Searching...
No Matches
klang::Generic Namespace Reference

Templates supporting common audio functionality.

Classes

struct  Function
 Applies a function to a signal (input-output) More...
 
struct  Generator
 Signal generator object (output only) More...
 
struct  Graph
 A line graph plotter. More...
 
struct  Input
 Audio input object. More...
 
struct  Modifier
 Signal modifier object (input-output) More...
 
struct  Oscillator
 Audio oscillator object (output) More...
 
struct  Output
 Audio output object. More...
 

Functions

template<typename SIGNAL >
SIGNAL operator+ (float other, Output< SIGNAL > &output)
 
template<typename SIGNAL >
SIGNAL operator* (float other, Output< SIGNAL > &output)
 
template<typename SIGNAL >
SIGNAL operator- (float other, Output< SIGNAL > &output)
 
template<typename SIGNAL >
SIGNAL operator/ (float other, Output< SIGNAL > &output)
 
template<typename SIGNAL >
SIGNAL operator+ (Output< SIGNAL > &output, float other)
 
template<typename SIGNAL >
SIGNAL operator* (Output< SIGNAL > &output, float other)
 
template<typename SIGNAL >
SIGNAL operator- (Output< SIGNAL > &output, float other)
 
template<typename SIGNAL >
SIGNAL operator/ (Output< SIGNAL > &output, float other)
 
template<typename... Args>
 Function (float(*)(Args...)) -> Function< signal, Args... >
 
template<typename... Args>
 Function () -> Function< signal, Args... >
 

Function Documentation

◆ Function() [1/2]

template<typename... Args>
klang::Generic::Function ( ) -> Function< signal, Args... >

◆ Function() [2/2]

template<typename... Args>
klang::Generic::Function ( float(*  )(Args...)) -> Function< signal, Args... >

◆ operator*() [1/2]

template<typename SIGNAL >
SIGNAL klang::Generic::operator* ( float other,
Output< SIGNAL > & output )
inline

Definition at line 1388 of file klang.h.

1388{ return SIGNAL(output) * other; }

◆ operator*() [2/2]

template<typename SIGNAL >
SIGNAL klang::Generic::operator* ( Output< SIGNAL > & output,
float other )
inline

Definition at line 1393 of file klang.h.

1393{ return SIGNAL(output) * other; }

◆ operator+() [1/2]

template<typename SIGNAL >
SIGNAL klang::Generic::operator+ ( float other,
Output< SIGNAL > & output )
inline

Definition at line 1387 of file klang.h.

1387{ return SIGNAL(output) + other; }

◆ operator+() [2/2]

template<typename SIGNAL >
SIGNAL klang::Generic::operator+ ( Output< SIGNAL > & output,
float other )
inline

Definition at line 1392 of file klang.h.

1392{ return SIGNAL(output) + other; }

◆ operator-() [1/2]

template<typename SIGNAL >
SIGNAL klang::Generic::operator- ( float other,
Output< SIGNAL > & output )
inline

Definition at line 1389 of file klang.h.

1389{ return SIGNAL(other) - SIGNAL(output); }

◆ operator-() [2/2]

template<typename SIGNAL >
SIGNAL klang::Generic::operator- ( Output< SIGNAL > & output,
float other )
inline

Definition at line 1394 of file klang.h.

1394{ return SIGNAL(output) - other; }

Referenced by klang::Generators::Basic::Triangle::process().

◆ operator/() [1/2]

template<typename SIGNAL >
SIGNAL klang::Generic::operator/ ( float other,
Output< SIGNAL > & output )
inline

Definition at line 1390 of file klang.h.

1390{ return SIGNAL(other) / SIGNAL(output); }

◆ operator/() [2/2]

template<typename SIGNAL >
SIGNAL klang::Generic::operator/ ( Output< SIGNAL > & output,
float other )
inline

Definition at line 1395 of file klang.h.

1395{ return SIGNAL(output) / other; }

Referenced by klang::Envelope::setTargetTime().