Klang C++ 0.7.15
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

Operator & operator() (param f)
 
Operator & operator() (param f, relative phase)
 
Operator & operator() (relative phase)
 
virtual Operator & operator= (const Envelope::Points &points)
 
virtual Operator & operator= (const Envelope &points)
 
Operator & operator* (signal amp)
 
virtual void process () override
 
Operator & operator>> (Operator &carrier)
 
virtual const signal & input () 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 5465 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 2947 of file klang.h.

2947{ return in; }

◆ input() [3/3]

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

Reimplemented in klang::Debug.

Definition at line 2951 of file klang.h.

2951{ in = source; this->input(); }
virtual const signal & input() const
Definition klang.h:2947

◆ operator()() [1/3]

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

Definition at line 5469 of file klang.h.

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

◆ operator()() [2/3]

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

Definition at line 5470 of file klang.h.

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

◆ operator()() [3/3]

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

Definition at line 5471 of file klang.h.

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

◆ operator*()

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

Definition at line 5483 of file klang.h.

5483 {
5485 return *this;
5486 }
Amplitude amp
Definition klang.h:5467

◆ operator<<()

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

Reimplemented in klang::Debug.

Definition at line 2950 of file klang.h.

2950{ in = source; this->input(); }

◆ operator=() [1/2]

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

Definition at line 5478 of file klang.h.

5478 {
5479 env = points;
5480 return *this;
5481 }
Envelope env
Definition klang.h:5466

◆ operator=() [2/2]

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

Definition at line 5473 of file klang.h.

5473 {
5474 env = points;
5475 return *this;
5476 }

◆ operator>>()

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

Definition at line 5494 of file klang.h.

5494 {
5495 carrier << *this;
5496 return carrier;
5497 }

◆ process()

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

Definition at line 5488 of file klang.h.

5488 {
5489 OSCILLATOR::set(+in);
5490 OSCILLATOR::process();
5491 OSCILLATOR::out *= env++ * amp;
5492 }

Member Data Documentation

◆ amp

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

Definition at line 5467 of file klang.h.

◆ env

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

Definition at line 5466 of file klang.h.

◆ in