FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
devices::audio::SpecialTone Namespace Reference

This namespace defines special "tones" which have an impact on how to play a melody. More...

Variables

static constexpr const Tone END = Tone::USER0
 This special tone marks the end of a melody (as a sequence of Tones). More...
 
static constexpr const Tone REPEAT_START = Tone::USER1
 This special tone marks the beginning of sequence that shall be repeated later. More...
 
static constexpr const Tone REPEAT_END = Tone::USER2
 This special tone marks the end of a repeating sequence (started with REPEAT_START). More...
 
static constexpr const Tone TIE = Tone::USER3
 This special tone marks the following notes to be tied together, ie their durations are added with no intertone delay. More...
 
static constexpr const Tone SLUR = TIE
 This special tone marks the following notes to be slurred together, ie no intertone delay shall occur between these notes. More...
 

Detailed Description

This namespace defines special "tones" which have an impact on how to play a melody.

They are used by TonePlayer and based on special Tones.

See also
TonePlayer
Tone

Variable Documentation

◆ END

constexpr const Tone devices::audio::SpecialTone::END = Tone::USER0
staticconstexpr

This special tone marks the end of a melody (as a sequence of Tones).

Definition at line 44 of file tone_player.h.

◆ REPEAT_START

constexpr const Tone devices::audio::SpecialTone::REPEAT_START = Tone::USER1
staticconstexpr

This special tone marks the beginning of sequence that shall be repeated later.

See also
REPEAT_END

Definition at line 51 of file tone_player.h.

◆ REPEAT_END

constexpr const Tone devices::audio::SpecialTone::REPEAT_END = Tone::USER2
staticconstexpr

This special tone marks the end of a repeating sequence (started with REPEAT_START).

The associated repeats in TonePlay has a special meaning: it indicates the number of times to repeat the sequence.

See also
REPEAT_START

Definition at line 59 of file tone_player.h.

◆ TIE

constexpr const Tone devices::audio::SpecialTone::TIE = Tone::USER3
staticconstexpr

This special tone marks the following notes to be tied together, ie their durations are added with no intertone delay.

The associated repeats in TonePlay indicates how many following notes shall be tied to the next; hence, in order to tie two notes, you should set repeats to 1.

According to music theory, ties are between two notes of the same pitch only; however, there is no control of this constraint.

See also
SLUR

Definition at line 71 of file tone_player.h.

◆ SLUR

constexpr const Tone devices::audio::SpecialTone::SLUR = TIE
staticconstexpr

This special tone marks the following notes to be slurred together, ie no intertone delay shall occur between these notes.

The associated repeats in TonePlay indicates how many following notes shall be slurred to the next; hence, in order to slur two notes, you should set repeats to 1.

According to music theory, slurs are between two notes of different pitches only; however, there is no control of this constraint. Implementation-wise, technically speaking, there is no difference between ties and slurs.

See also
TIE

Definition at line 85 of file tone_player.h.