Mozzi  version 2015-05-11-20:23
sound synthesis library for Arduino
 All Classes Functions Typedefs Groups
Line< unsigned char > Class Template Reference

Public Member Functions

 Line ()
 Constructor. More...
 
unsigned char next ()
 Increments one step along the line. More...
 
void set (unsigned char value)
 Set the current value of the line. More...
 
void set (unsigned char targetvalue, unsigned char num_steps)
 Given a target value and the number of steps to take on the way, this calculates the step size needed to get there from the current value. More...
 
void set (unsigned char startvalue, unsigned char targetvalue, unsigned char num_steps)
 Given a new starting value, target value and the number of steps to take on the way, this sets the step size needed to get there. More...
 

Detailed Description

template<>
class Line< unsigned char >

Definition at line 128 of file Line.h.

Constructor & Destructor Documentation

Line< unsigned char >::Line ( )
inline

Constructor.

Use the template parameter to set the type of numbers you want to use. For example, Line <int> myline; makes a Line which uses ints.

Definition at line 138 of file Line.h.

Member Function Documentation

unsigned char Line< unsigned char >::next ( )
inline

Increments one step along the line.

Returns
the next value.

Definition at line 149 of file Line.h.

void Line< unsigned char >::set ( unsigned char  value)
inline

Set the current value of the line.

The Line will continue incrementing from this value using any previously calculated step size.

Parameters
valuethe number to set the Line's current_value to.

Definition at line 166 of file Line.h.

void Line< unsigned char >::set ( unsigned char  targetvalue,
unsigned char  num_steps 
)
inline

Given a target value and the number of steps to take on the way, this calculates the step size needed to get there from the current value.

Parameters
targetvaluethe value to move towards.
num_stepshow many steps to take to reach the target.

Definition at line 181 of file Line.h.

void Line< unsigned char >::set ( unsigned char  startvalue,
unsigned char  targetvalue,
unsigned char  num_steps 
)
inline

Given a new starting value, target value and the number of steps to take on the way, this sets the step size needed to get there.

Parameters
startvaluethe number to set the Line's current_value to.
targetvaluethe value to move towards.
num_stepshow many steps to take to reach the target.

Definition at line 192 of file Line.h.