Appends piches
This commit is contained in:
118
pitches/pitches/pitches.h
Normal file
118
pitches/pitches/pitches.h
Normal file
@@ -0,0 +1,118 @@
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
|
||||
namespace pitches
|
||||
{
|
||||
//--------------------------------------------------------------
|
||||
struct Note
|
||||
{
|
||||
constexpr Note(const uint16_t freq, const std::chrono::milliseconds dur)
|
||||
: frequency(freq)
|
||||
, duration(dur)
|
||||
{
|
||||
}
|
||||
constexpr Note(const uint16_t freq, const uint32_t dur)
|
||||
: frequency(freq)
|
||||
, duration(std::chrono::milliseconds(dur))
|
||||
{
|
||||
}
|
||||
|
||||
uint16_t frequency;
|
||||
std::chrono::milliseconds duration;
|
||||
};
|
||||
//--------------------------------------------------------------
|
||||
static constexpr uint16_t silent = 0;
|
||||
static constexpr uint16_t B0 = 31;
|
||||
static constexpr uint16_t C1 = 33;
|
||||
static constexpr uint16_t CS1 = 35;
|
||||
static constexpr uint16_t D1 = 37;
|
||||
static constexpr uint16_t DS1 = 39;
|
||||
static constexpr uint16_t E1 = 41;
|
||||
static constexpr uint16_t F1 = 44;
|
||||
static constexpr uint16_t FS1 = 46;
|
||||
static constexpr uint16_t G1 = 49;
|
||||
static constexpr uint16_t GS1 = 52;
|
||||
static constexpr uint16_t A1 = 55;
|
||||
static constexpr uint16_t AS1 = 58;
|
||||
static constexpr uint16_t B1 = 62;
|
||||
static constexpr uint16_t C2 = 65;
|
||||
static constexpr uint16_t CS2 = 69;
|
||||
static constexpr uint16_t D2 = 73;
|
||||
static constexpr uint16_t DS2 = 78;
|
||||
static constexpr uint16_t E2 = 82;
|
||||
static constexpr uint16_t F2 = 87;
|
||||
static constexpr uint16_t FS2 = 93;
|
||||
static constexpr uint16_t G2 = 98;
|
||||
static constexpr uint16_t GS2 = 104;
|
||||
static constexpr uint16_t A2 = 110;
|
||||
static constexpr uint16_t AS2 = 117;
|
||||
static constexpr uint16_t B2 = 123;
|
||||
static constexpr uint16_t C3 = 131;
|
||||
static constexpr uint16_t CS3 = 139;
|
||||
static constexpr uint16_t DB3 = 139;
|
||||
static constexpr uint16_t D3 = 147;
|
||||
static constexpr uint16_t DS3 = 156;
|
||||
static constexpr uint16_t EB3 = 156;
|
||||
static constexpr uint16_t E3 = 165;
|
||||
static constexpr uint16_t F3 = 175;
|
||||
static constexpr uint16_t FS3 = 185;
|
||||
static constexpr uint16_t G3 = 196;
|
||||
static constexpr uint16_t GS3 = 208;
|
||||
static constexpr uint16_t A3 = 220;
|
||||
static constexpr uint16_t AS3 = 233;
|
||||
static constexpr uint16_t B3 = 247;
|
||||
static constexpr uint16_t C4 = 262;
|
||||
static constexpr uint16_t CS4 = 277;
|
||||
static constexpr uint16_t D4 = 294;
|
||||
static constexpr uint16_t DS4 = 311;
|
||||
static constexpr uint16_t E4 = 330;
|
||||
static constexpr uint16_t F4 = 349;
|
||||
static constexpr uint16_t FS4 = 370;
|
||||
static constexpr uint16_t G4 = 392;
|
||||
static constexpr uint16_t GS4 = 415;
|
||||
static constexpr uint16_t A4 = 440;
|
||||
static constexpr uint16_t AS4 = 466;
|
||||
static constexpr uint16_t B4 = 494;
|
||||
static constexpr uint16_t C5 = 523;
|
||||
static constexpr uint16_t CS5 = 554;
|
||||
static constexpr uint16_t D5 = 587;
|
||||
static constexpr uint16_t DS5 = 622;
|
||||
static constexpr uint16_t E5 = 659;
|
||||
static constexpr uint16_t F5 = 698;
|
||||
static constexpr uint16_t FS5 = 740;
|
||||
static constexpr uint16_t G5 = 784;
|
||||
static constexpr uint16_t GS5 = 831;
|
||||
static constexpr uint16_t A5 = 880;
|
||||
static constexpr uint16_t AS5 = 932;
|
||||
static constexpr uint16_t B5 = 988;
|
||||
static constexpr uint16_t C6 = 1047;
|
||||
static constexpr uint16_t CS6 = 1109;
|
||||
static constexpr uint16_t D6 = 1175;
|
||||
static constexpr uint16_t DS6 = 1245;
|
||||
static constexpr uint16_t E6 = 1319;
|
||||
static constexpr uint16_t F6 = 1397;
|
||||
static constexpr uint16_t FS6 = 1480;
|
||||
static constexpr uint16_t G6 = 1568;
|
||||
static constexpr uint16_t GS6 = 1661;
|
||||
static constexpr uint16_t A6 = 1760;
|
||||
static constexpr uint16_t AS6 = 1865;
|
||||
static constexpr uint16_t B6 = 1976;
|
||||
static constexpr uint16_t C7 = 2093;
|
||||
static constexpr uint16_t CS7 = 2217;
|
||||
static constexpr uint16_t D7 = 2349;
|
||||
static constexpr uint16_t DS7 = 2489;
|
||||
static constexpr uint16_t E7 = 2637;
|
||||
static constexpr uint16_t F7 = 2794;
|
||||
static constexpr uint16_t FS7 = 2960;
|
||||
static constexpr uint16_t G7 = 3136;
|
||||
static constexpr uint16_t GS7 = 3322;
|
||||
static constexpr uint16_t A7 = 3520;
|
||||
static constexpr uint16_t AS7 = 3729;
|
||||
static constexpr uint16_t B7 = 3951;
|
||||
static constexpr uint16_t C8 = 4186;
|
||||
static constexpr uint16_t CS8 = 4435;
|
||||
static constexpr uint16_t D8 = 4699;
|
||||
static constexpr uint16_t DS8 = 4978;
|
||||
//--------------------------------------------------------------
|
||||
}; // namespace pitches
|
||||
Reference in New Issue
Block a user