| Mozzi version v1.1.0 sound synthesis library for Arduino |

Public Member Functions | List of all members
Portamento< CONTROL_UPDATE_RATE > Class Template Reference

A simple portamento (pitch slide from one note to the next) effect, useful for note-based applications. More...

`#include <Portamento.h>`

## Public Member Functions
| Portamento ()
| Constructor.
void | setTime (unsigned int milliseconds)
| Set how long it will take to slide from note to note, in milliseconds. More...
void | start (uint8_t note)
| Call this at note-on, it initialises the portamento. More...
void | start (Q16n16 note)
| Call this at note-on, it initialises the portamento. More...
Q16n16 | next ()
| Use this in updateControl() to provide a frequency to the oscillator it's controlling. More...

## Detailed Description

### template<unsigned int CONTROL_UPDATE_RATE>
class Portamento< CONTROL_UPDATE_RATE >

A simple portamento (pitch slide from one note to the next) effect, useful for note-based applications.

Definition at line 22 of file Portamento.h.

## Member Function Documentation

## ◆ next()

template<unsigned int CONTROL_UPDATE_RATE>

Q16n16 Portamento< CONTROL_UPDATE_RATE >::next | ( |  | ) |
| inline

Use this in updateControl() to provide a frequency to the oscillator it's controlling.

For example: myOscil.setFreq_Q16n16(myPortamento.next());

Returns
  a Q16n16 fractional frequency value, progressing smoothly between successive notes.

Definition at line 72 of file Portamento.h.

## ◆ setTime()

template<unsigned int CONTROL_UPDATE_RATE>

void Portamento< CONTROL_UPDATE_RATE >::setTime | ( | unsigned int | milliseconds | ) |
| inline

Set how long it will take to slide from note to note, in milliseconds.

Parameters

  milliseconds |

Definition at line 38 of file Portamento.h.

## ◆ start() [1/2]

template<unsigned int CONTROL_UPDATE_RATE>

void Portamento< CONTROL_UPDATE_RATE >::start | ( | uint8_t | note | ) |
| inline

Call this at note-on, it initialises the portamento.

Parameters

  note | a midi note number, a whole number.

Definition at line 47 of file Portamento.h.

## ◆ start() [2/2]

template<unsigned int CONTROL_UPDATE_RATE>

void Portamento< CONTROL_UPDATE_RATE >::start | ( | Q16n16 | note | ) |
| inline

Call this at note-on, it initialises the portamento.

Parameters

  note | a midi note number in Q16n16 fractional format. This is useful for non-whole note or detuned values.

Definition at line 58 of file Portamento.h.