Klang C++ 0.7.15
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.
 
increment & operator= (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 1468 of file klang.h.

Constructor & Destructor Documentation

◆ increment() [1/3]

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

Definition at line 1473 of file klang.h.

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

◆ increment() [2/3]

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

Definition at line 1475 of file klang.h.

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

◆ increment() [3/3]

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

Definition at line 1477 of file klang.h.

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

Member Function Documentation

◆ operator=()

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

Definition at line 1480 of file klang.h.

1480{ amount = in; return *this; }

Member Data Documentation

◆ amount

float klang::increment::amount

◆ size

const float klang::increment::size