This is from justinkim/PWM_Tone_Library modified for six octaves.

Fork of PWM_Tone_Library by justin kim

Committer:
MTYarnell
Date:
Tue Apr 18 15:57:38 2017 +0000
Revision:
2:1d3262096227
Parent:
0:d06af372d384
Modified as part of "Hexi_Acceleromagnetic_Synth" 2017, Michael Yarnell, Alec Pierce.  ; Octaves 1, 2, and 6 were added after calculation based on 3, 4, and 5.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
justinkim 0:d06af372d384 1 /* Includes ------------------------------------------------------------------*/
justinkim 0:d06af372d384 2 #include "mbed.h"
justinkim 0:d06af372d384 3
justinkim 0:d06af372d384 4 /* Private typedef -----------------------------------------------------------*/
justinkim 0:d06af372d384 5 /* Private define ------------------------------------------------------------*/
MTYarnell 2:1d3262096227 6 #define Do1 33 //C octave1
MTYarnell 2:1d3262096227 7 #define Do1s 35 //C#
MTYarnell 2:1d3262096227 8 #define Re1 37 //D
MTYarnell 2:1d3262096227 9 #define Re1s 39 //D#
MTYarnell 2:1d3262096227 10 #define Mi1 41 //E
MTYarnell 2:1d3262096227 11 #define Fa1 44 //F
MTYarnell 2:1d3262096227 12 #define Fa1s 46 //F#
MTYarnell 2:1d3262096227 13 #define So1 49 //G
MTYarnell 2:1d3262096227 14 #define So1s 52 //G#
MTYarnell 2:1d3262096227 15 #define La1 55 //A
MTYarnell 2:1d3262096227 16 #define La1s 58 //A#
MTYarnell 2:1d3262096227 17 #define Ti1 62 //B
MTYarnell 2:1d3262096227 18
MTYarnell 2:1d3262096227 19 #define Do2 66 //C octave2
MTYarnell 2:1d3262096227 20 #define Do2s 69 //C#
MTYarnell 2:1d3262096227 21 #define Re2 74 //D
MTYarnell 2:1d3262096227 22 #define Re2s 78 //D#
MTYarnell 2:1d3262096227 23 #define Mi2 83 //E
MTYarnell 2:1d3262096227 24 #define Fa2 87 //F
MTYarnell 2:1d3262096227 25 #define Fa2s 93 //F#
MTYarnell 2:1d3262096227 26 #define So2 98 //G
MTYarnell 2:1d3262096227 27 #define So2s 104 //G#
MTYarnell 2:1d3262096227 28 #define La2 110 //A
MTYarnell 2:1d3262096227 29 #define La2s 117 //A#
MTYarnell 2:1d3262096227 30 #define Ti2 124 //B
MTYarnell 2:1d3262096227 31
justinkim 0:d06af372d384 32 #define Do3 131 //C octave3
justinkim 0:d06af372d384 33 #define Do3s 139 //C#
justinkim 0:d06af372d384 34 #define Re3 147 //D
justinkim 0:d06af372d384 35 #define Re3s 156//D#
justinkim 0:d06af372d384 36 #define Mi3 165 //E
justinkim 0:d06af372d384 37 #define Fa3 175 //F
justinkim 0:d06af372d384 38 #define Fa3s 185 //F#
justinkim 0:d06af372d384 39 #define So3 196 //G
justinkim 0:d06af372d384 40 #define So3s 208 //G#
justinkim 0:d06af372d384 41 #define La3 220 //A
justinkim 0:d06af372d384 42 #define La3s 233 //A#
justinkim 0:d06af372d384 43 #define Ti3 247 //B
MTYarnell 2:1d3262096227 44
justinkim 0:d06af372d384 45 #define Do4 262 //C octave4
justinkim 0:d06af372d384 46 #define Do4s 277 //C#
justinkim 0:d06af372d384 47 #define Re4 294 //D
justinkim 0:d06af372d384 48 #define Re4s 311//D#
justinkim 0:d06af372d384 49 #define Mi4 330 //E
justinkim 0:d06af372d384 50 #define Fa4 349 //F
justinkim 0:d06af372d384 51 #define Fa4s 370 //F#
justinkim 0:d06af372d384 52 #define So4 392 //G
justinkim 0:d06af372d384 53 #define So4s 415 //G#
justinkim 0:d06af372d384 54 #define La4 440 //A
justinkim 0:d06af372d384 55 #define La4s 466 //A#
justinkim 0:d06af372d384 56 #define Ti4 494 //B
MTYarnell 2:1d3262096227 57
justinkim 0:d06af372d384 58 #define Do5 523 //C octave5
justinkim 0:d06af372d384 59 #define Do5s 554 //C#
justinkim 0:d06af372d384 60 #define Re5 587 //D
justinkim 0:d06af372d384 61 #define Re5s 622//D#
justinkim 0:d06af372d384 62 #define Mi5 659 //E
justinkim 0:d06af372d384 63 #define Fa5 699 //F
justinkim 0:d06af372d384 64 #define Fa5s 740 //F#
justinkim 0:d06af372d384 65 #define So5 784 //G
justinkim 0:d06af372d384 66 #define So5s 831 //G#
justinkim 0:d06af372d384 67 #define La5 880 //A
justinkim 0:d06af372d384 68 #define La5s 932 //A#
justinkim 0:d06af372d384 69 #define Ti5 988 //B
justinkim 0:d06af372d384 70
MTYarnell 2:1d3262096227 71 #define Do6 1045 //C octave6
MTYarnell 2:1d3262096227 72 #define Do6s 1107 //C#
MTYarnell 2:1d3262096227 73 #define Re6 1173 //D
MTYarnell 2:1d3262096227 74 #define Re6s 1243 //D#
MTYarnell 2:1d3262096227 75 #define Mi6 1317 //E
MTYarnell 2:1d3262096227 76 #define Fa6 1395 //F
MTYarnell 2:1d3262096227 77 #define Fa6s 1478 //F#
MTYarnell 2:1d3262096227 78 #define So6 1566 //G
MTYarnell 2:1d3262096227 79 #define So6s 1659 //G#
MTYarnell 2:1d3262096227 80 #define La6 1757 //A
MTYarnell 2:1d3262096227 81 #define La6s 1861 //A#
MTYarnell 2:1d3262096227 82 #define Ti6 1972 //B
MTYarnell 2:1d3262096227 83
justinkim 0:d06af372d384 84 /* Private variables ---------------------------------------------------------*/
justinkim 0:d06af372d384 85 /* Private function prototypes -----------------------------------------------*/
justinkim 0:d06af372d384 86 void Tune(PwmOut name, int period, int beat);
justinkim 0:d06af372d384 87 void Auto_tunes(PwmOut name, int period, int beat);
justinkim 0:d06af372d384 88 void Stop_tunes(PwmOut name);
justinkim 0:d06af372d384 89
justinkim 0:d06af372d384 90 /* Private functions ---------------------------------------------------------*/