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

A phase or wavetable increment. More...

#include <klang.h>

Public Member Functions

 increment (float amount, const float size=2 *pi)
 Create a phase increment (default to radians).
 
 increment (float amount, int size)
 Create a phase increment (wavetable size).
 
 increment (float amount, double size)
 Create a phase increment.
 
incrementoperator= (float in)
 Set current phase.
 

Public Attributes

float amount
 The current phase.
 
const float size
 The length of a a full cycle (e.g. 2 pi or wavetable size)
 

Detailed Description

Definition at line 639 of file klang.h.

Constructor & Destructor Documentation

◆ increment() [1/3]

klang::increment::increment ( float amount,
const float size = 2 * pi )
inline

Definition at line 644 of file klang.h.

644: amount(amount), size(size) { }
float amount
The current phase.
Definition klang.h:640
const float size
The length of a a full cycle (e.g. 2 pi or wavetable size)
Definition klang.h:641

References amount, and size.

◆ increment() [2/3]

klang::increment::increment ( float amount,
int size )
inline

Definition at line 646 of file klang.h.

646: amount(amount), size((float)size) { }

References amount, and size.

Referenced by klang::Wavetable::process().

◆ increment() [3/3]

klang::increment::increment ( float amount,
double size )
inline

Definition at line 648 of file klang.h.

648: amount(amount), size((float)size) { }

References amount, and size.

Member Function Documentation

◆ operator=()

increment & klang::increment::operator= ( float in)
inline

Definition at line 651 of file klang.h.

651{ amount = in; return *this; }

References amount.

Member Data Documentation

◆ amount

float klang::increment::amount

◆ size

const float klang::increment::size