Klang C++
Language Reference (draft)
Loading...
Searching...
No Matches
klang::Operator< OSCILLATOR >

FM operator. More...

#include <klang.h>

+ Inheritance diagram for klang::Operator< OSCILLATOR >:

Public Member Functions

Operatoroperator() (param f)
 
Operatoroperator() (param f, relative phase)
 
Operatoroperator() (relative phase)
 
virtual Operatoroperator= (const Envelope::Points &points)
 
virtual Operatoroperator= (const Envelope &points)
 
Operatoroperator* (float amp)
 
virtual void process () override
 
Operatoroperator>> (Operator &carrier)
 
virtual const signalinput () const
 
virtual void input (const signal &source)
 
virtual void operator<< (const signal &source)
 

Public Attributes

Envelope env
 
Amplitude amp = 1.f
 
signal in
 

Detailed Description

template<class OSCILLATOR>
struct klang::Operator< OSCILLATOR >

Definition at line 3024 of file klang.h.

Member Function Documentation

◆ input() [1/3]

virtual void klang::Generic::Input< signal >::input ( )
inlineprotectedvirtualinherited

◆ input() [2/3]

virtual const signal & klang::Generic::Input< signal >::input ( ) const
inlinevirtualinherited

Reimplemented in klang::Generic::Graph< SIZE >::Series.

Definition at line 1343 of file klang.h.

1343{ return in; }

◆ input() [3/3]

virtual void klang::Generic::Input< signal >::input ( const signal & source)
inlinevirtualinherited

Definition at line 1347 of file klang.h.

1347{ in = source; input(); }
virtual const signal & input() const
Definition klang.h:1343

◆ operator()() [1/3]

template<class OSCILLATOR >
Operator & klang::Operator< OSCILLATOR >::operator() ( param f)
inline

Definition at line 3028 of file klang.h.

3028{ OSCILLATOR::set(f); return *this; }

◆ operator()() [2/3]

template<class OSCILLATOR >
Operator & klang::Operator< OSCILLATOR >::operator() ( param f,
relative phase )
inline

Definition at line 3029 of file klang.h.

3029{ OSCILLATOR::set(f, phase); return *this; }

◆ operator()() [3/3]

template<class OSCILLATOR >
Operator & klang::Operator< OSCILLATOR >::operator() ( relative phase)
inline

Definition at line 3030 of file klang.h.

3030{ OSCILLATOR::set(phase); return *this; }

◆ operator*()

template<class OSCILLATOR >
Operator & klang::Operator< OSCILLATOR >::operator* ( float amp)
inline

Definition at line 3042 of file klang.h.

3042 {
3044 return *this;
3045 }
Amplitude amp
Definition klang.h:3026

◆ operator<<()

virtual void klang::Generic::Input< signal >::operator<< ( const signal & source)
inlinevirtualinherited

Definition at line 1346 of file klang.h.

1346{ in = source; input(); }

◆ operator=() [1/2]

template<class OSCILLATOR >
virtual Operator & klang::Operator< OSCILLATOR >::operator= ( const Envelope & points)
inlinevirtual

Definition at line 3037 of file klang.h.

3037 {
3038 env = points;
3039 return *this;
3040 }
Envelope env
Definition klang.h:3025

◆ operator=() [2/2]

template<class OSCILLATOR >
virtual Operator & klang::Operator< OSCILLATOR >::operator= ( const Envelope::Points & points)
inlinevirtual

Definition at line 3032 of file klang.h.

3032 {
3033 env = points;
3034 return *this;
3035 }

◆ operator>>()

template<class OSCILLATOR >
Operator & klang::Operator< OSCILLATOR >::operator>> ( Operator< OSCILLATOR > & carrier)
inline

Definition at line 3053 of file klang.h.

3053 {
3054 carrier << *this;
3055 return carrier;
3056 }

◆ process()

template<class OSCILLATOR >
virtual void klang::Operator< OSCILLATOR >::process ( )
inlineoverridevirtual

Definition at line 3047 of file klang.h.

3047 {
3048 OSCILLATOR::set(+in);
3049 OSCILLATOR::process();
3050 OSCILLATOR::out *= env++ * amp;
3051 }

Member Data Documentation

◆ amp

template<class OSCILLATOR >
Amplitude klang::Operator< OSCILLATOR >::amp = 1.f

Definition at line 3026 of file klang.h.

◆ env

template<class OSCILLATOR >
Envelope klang::Operator< OSCILLATOR >::env

Definition at line 3025 of file klang.h.

◆ in

Definition at line 1340 of file klang.h.

1340{ 0.f };