RingTone.h File Reference
#include <cstdint>
#include <cmath>
Include dependency graph for RingTone.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  RingTone::NoteDef
 
class  RingTone::Parser
 Base parser class. More...
 

Namespaces

 RingTone
 

Enumerations

enum class  RingTone::Note {
  RingTone::MUTE , RingTone::C , RingTone::C_Sharp , RingTone::D_Flat = C_Sharp ,
  RingTone::D , RingTone::D_Sharp , RingTone::E_Flat = D_Sharp , RingTone::E ,
  RingTone::F , RingTone::F_Sharp , RingTone::G , RingTone::G_Sharp ,
  RingTone::A_Flat = G_Sharp , RingTone::A , RingTone::A_Sharp , RingTone::B_Flat = A_Sharp ,
  RingTone::B
}
 Note numbers, defined here for convenience. More...
 

Functions

template<unsigned octave, unsigned note>
static constexpr unsigned RingTone::calculateFrequency ()
 
unsigned RingTone::charToNoteValue (char c)
 Get the corresponding note number for a letter. More...
 
unsigned RingTone::getNoteFrequency (unsigned octave, unsigned note)
 Convert a scale/note combination into frequency. More...
 
unsigned RingTone::getClosestNote (unsigned frequency, unsigned &octave)
 Convert a frequency into a scale/note combination into frequency. More...
 
const char * RingTone::getNoteName (unsigned noteValue)
 Get text for a given note number. More...
 

Variables

static unsigned RingTone::noteFrequencyA4 = 440
 Reference note frequency. More...
 
static constexpr float RingTone::frequencyRoot = pow(2, 1.0 / 12)