Mozzi  alpha 0.01.1t
sound synthesis library for Arduino
 All Classes Functions Typedefs
Public Member Functions
WaveShaper< int > Class Template Reference

int specialisation of WaveShaper template More...

List of all members.

Public Member Functions

 WaveShaper (const int __attribute__((progmem))*TABLE_NAME)
 Constructor.
int next (int in)
 Maps input to output, transforming it according to the table being used.

Detailed Description

template<>
class WaveShaper< int >

int specialisation of WaveShaper template

Definition at line 76 of file WaveShaper.h.


Constructor & Destructor Documentation

WaveShaper< int >::WaveShaper ( const int __attribute__((progmem))*  TABLE_NAME) [inline]

Constructor.

Use the template parameter to set type of numbers being mapped. For example, WaveShaper <int> myWaveShaper; makes a WaveShaper which uses ints.

Template Parameters:
TABLE_NAMEthe name of the table being used, which can be found in the ".h" file containing the table.

Definition at line 84 of file WaveShaper.h.


Member Function Documentation

int WaveShaper< int >::next ( int  in) [inline]

Maps input to output, transforming it according to the table being used.

Template Parameters:
inthe input signal. For flexibility, it's up to you to give the correct offset to your input signal. So if you'r mapping a signed 9-bit signal (such as the sum of 2 8-bit Oscils) into a 512 cell table centred around cell 256, add 256 to offset the input value. With a sigmoid table, this may be useful for compressing a bigger signal into the -244 to 243 output range of Mozzi, rather than dividing the signal and returning a char from updateAudio().
Returns:
the shaped signal.

Definition at line 101 of file WaveShaper.h.


The documentation for this class was generated from the following file: