Luke Cartwright / Mbed 2 deprecated ELEC2645_Project_el18loc_nearlythere

Dependencies:   mbed

Committer:
lukeocarwright
Date:
Thu Feb 06 12:59:16 2020 +0000
Revision:
1:766a293c9b07
Child:
2:07cef563acdf
intital commit 06/02/19;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lukeocarwright 1:766a293c9b07 1 #ifndef GAMEPAD_H
lukeocarwright 1:766a293c9b07 2 #define GAMEPAD_H
lukeocarwright 1:766a293c9b07 3
lukeocarwright 1:766a293c9b07 4 #include <bitset>
lukeocarwright 1:766a293c9b07 5
lukeocarwright 1:766a293c9b07 6 // Forward declaration of the classes that we use from the mbed library
lukeocarwright 1:766a293c9b07 7 // This avoids the need for us to include the huge mbed.h header inside our
lukeocarwright 1:766a293c9b07 8 // own library API
lukeocarwright 1:766a293c9b07 9 namespace mbed
lukeocarwright 1:766a293c9b07 10 {
lukeocarwright 1:766a293c9b07 11 class AnalogIn;
lukeocarwright 1:766a293c9b07 12 class InterruptIn;
lukeocarwright 1:766a293c9b07 13 class PwmOut;
lukeocarwright 1:766a293c9b07 14 class AnalogOut;
lukeocarwright 1:766a293c9b07 15 class Ticker;
lukeocarwright 1:766a293c9b07 16 class Timeout;
lukeocarwright 1:766a293c9b07 17 }
lukeocarwright 1:766a293c9b07 18
lukeocarwright 1:766a293c9b07 19 #define TOL 0.1f
lukeocarwright 1:766a293c9b07 20 #define RAD2DEG 57.2957795131f
lukeocarwright 1:766a293c9b07 21 #define PI 3.14159265359
lukeocarwright 1:766a293c9b07 22
lukeocarwright 1:766a293c9b07 23
lukeocarwright 1:766a293c9b07 24 /** Enum for direction */
lukeocarwright 1:766a293c9b07 25 enum Direction {
lukeocarwright 1:766a293c9b07 26 CENTRE, /**< joystick centred */
lukeocarwright 1:766a293c9b07 27 N, /**< pushed North (0)*/
lukeocarwright 1:766a293c9b07 28 NE, /**< pushed North-East (45) */
lukeocarwright 1:766a293c9b07 29 E, /**< pushed East (90) */
lukeocarwright 1:766a293c9b07 30 SE, /**< pushed South-East (135) */
lukeocarwright 1:766a293c9b07 31 S, /**< pushed South (180) */
lukeocarwright 1:766a293c9b07 32 SW, /**< pushed South-West (225) */
lukeocarwright 1:766a293c9b07 33 W, /**< pushed West (270) */
lukeocarwright 1:766a293c9b07 34 NW /**< pushed North-West (315) */
lukeocarwright 1:766a293c9b07 35 };
lukeocarwright 1:766a293c9b07 36
lukeocarwright 1:766a293c9b07 37 /** Vector 2D struct */
lukeocarwright 1:766a293c9b07 38 struct Vector2D {
lukeocarwright 1:766a293c9b07 39 float x; /**< float for x value */
lukeocarwright 1:766a293c9b07 40 float y; /**< float for y value */
lukeocarwright 1:766a293c9b07 41 };
lukeocarwright 1:766a293c9b07 42
lukeocarwright 1:766a293c9b07 43 /** Polar coordinate struct */
lukeocarwright 1:766a293c9b07 44 struct Polar {
lukeocarwright 1:766a293c9b07 45 float mag; /**< float for magnitude */
lukeocarwright 1:766a293c9b07 46 float angle; /**< float for angle (in degrees) */
lukeocarwright 1:766a293c9b07 47 };
lukeocarwright 1:766a293c9b07 48
lukeocarwright 1:766a293c9b07 49 /** Gamepad Class
lukeocarwright 1:766a293c9b07 50 * @brief Library for interfacing with ELEC2645 Gamepad PCB, University of Leeds
lukeocarwright 1:766a293c9b07 51 * @author Dr Craig A. Evans
lukeocarwright 1:766a293c9b07 52 * @author Dr Alex Valavanis
lukeocarwright 1:766a293c9b07 53 * @author Joshua Davy
lukeocarwright 1:766a293c9b07 54 */
lukeocarwright 1:766a293c9b07 55 class Gamepad
lukeocarwright 1:766a293c9b07 56 {
lukeocarwright 1:766a293c9b07 57
lukeocarwright 1:766a293c9b07 58 private:
lukeocarwright 1:766a293c9b07 59 mbed::PwmOut *_led1;
lukeocarwright 1:766a293c9b07 60 mbed::PwmOut *_led2;
lukeocarwright 1:766a293c9b07 61 mbed::PwmOut *_led3;
lukeocarwright 1:766a293c9b07 62 mbed::PwmOut *_led4;
lukeocarwright 1:766a293c9b07 63 mbed::PwmOut *_led5;
lukeocarwright 1:766a293c9b07 64 mbed::PwmOut *_led6;
lukeocarwright 1:766a293c9b07 65
lukeocarwright 1:766a293c9b07 66 mbed::InterruptIn *_button_A;
lukeocarwright 1:766a293c9b07 67 mbed::InterruptIn *_button_B;
lukeocarwright 1:766a293c9b07 68 mbed::InterruptIn *_button_X;
lukeocarwright 1:766a293c9b07 69 mbed::InterruptIn *_button_Y;
lukeocarwright 1:766a293c9b07 70 mbed::InterruptIn *_button_start;
lukeocarwright 1:766a293c9b07 71
lukeocarwright 1:766a293c9b07 72 mbed::AnalogIn *_vert;
lukeocarwright 1:766a293c9b07 73 mbed::AnalogIn *_horiz;
lukeocarwright 1:766a293c9b07 74
lukeocarwright 1:766a293c9b07 75 mbed::AnalogIn *_pot1;
lukeocarwright 1:766a293c9b07 76 mbed::AnalogIn *_pot2;
lukeocarwright 1:766a293c9b07 77
lukeocarwright 1:766a293c9b07 78 mbed::AnalogOut *dac;
lukeocarwright 1:766a293c9b07 79 mbed::Ticker *ticker;
lukeocarwright 1:766a293c9b07 80 mbed::Timeout *timeout;
lukeocarwright 1:766a293c9b07 81 mbed::Timeout *note_timeout;
lukeocarwright 1:766a293c9b07 82
lukeocarwright 1:766a293c9b07 83 // centred x,y values
lukeocarwright 1:766a293c9b07 84 float _x0;
lukeocarwright 1:766a293c9b07 85 float _y0;
lukeocarwright 1:766a293c9b07 86
lukeocarwright 1:766a293c9b07 87 float *_sample_array;
lukeocarwright 1:766a293c9b07 88 const int *_notes;
lukeocarwright 1:766a293c9b07 89 const int *_durations;
lukeocarwright 1:766a293c9b07 90
lukeocarwright 1:766a293c9b07 91 int _n;
lukeocarwright 1:766a293c9b07 92 int _melody_length;
lukeocarwright 1:766a293c9b07 93 volatile unsigned int _sample;
lukeocarwright 1:766a293c9b07 94 volatile unsigned int _note;
lukeocarwright 1:766a293c9b07 95 float _bpm;
lukeocarwright 1:766a293c9b07 96 bool _repeat;
lukeocarwright 1:766a293c9b07 97
lukeocarwright 1:766a293c9b07 98
lukeocarwright 1:766a293c9b07 99 public:
lukeocarwright 1:766a293c9b07 100 /** Constructor */
lukeocarwright 1:766a293c9b07 101 Gamepad();
lukeocarwright 1:766a293c9b07 102
lukeocarwright 1:766a293c9b07 103 /** Initialise all peripherals and configure interrupts */
lukeocarwright 1:766a293c9b07 104 void init();
lukeocarwright 1:766a293c9b07 105
lukeocarwright 1:766a293c9b07 106 /** Turn all LEDs on */
lukeocarwright 1:766a293c9b07 107 void leds_on();
lukeocarwright 1:766a293c9b07 108
lukeocarwright 1:766a293c9b07 109 /** Turn all LEDs off */
lukeocarwright 1:766a293c9b07 110 void leds_off();
lukeocarwright 1:766a293c9b07 111
lukeocarwright 1:766a293c9b07 112 /** Set all LEDs to duty-cycle
lukeocarwright 1:766a293c9b07 113 *@param value in range 0.0 to 1.0
lukeocarwright 1:766a293c9b07 114 */
lukeocarwright 1:766a293c9b07 115 void leds(float val) const;
lukeocarwright 1:766a293c9b07 116
lukeocarwright 1:766a293c9b07 117 /** Set LED to duty-cycle
lukeocarwright 1:766a293c9b07 118 *@param led number (0 to 5)
lukeocarwright 1:766a293c9b07 119 *@param value in range 0.0 to 1.0
lukeocarwright 1:766a293c9b07 120 */
lukeocarwright 1:766a293c9b07 121 void led(int n,float val) const;
lukeocarwright 1:766a293c9b07 122
lukeocarwright 1:766a293c9b07 123 /** Read potentiometer 1 value
lukeocarwright 1:766a293c9b07 124 *@returns potentiometer value in range 0.0 to 1.0
lukeocarwright 1:766a293c9b07 125 */
lukeocarwright 1:766a293c9b07 126 float read_pot1() const;
lukeocarwright 1:766a293c9b07 127
lukeocarwright 1:766a293c9b07 128 /** Read potentiometer 2 value
lukeocarwright 1:766a293c9b07 129 *@returns potentiometer value in range 0.0 to 1.0
lukeocarwright 1:766a293c9b07 130 */
lukeocarwright 1:766a293c9b07 131 float read_pot2() const;
lukeocarwright 1:766a293c9b07 132
lukeocarwright 1:766a293c9b07 133 /** Get magnitude of joystick movement
lukeocarwright 1:766a293c9b07 134 * @returns value in range 0.0 to 1.0
lukeocarwright 1:766a293c9b07 135 */
lukeocarwright 1:766a293c9b07 136 float get_mag();
lukeocarwright 1:766a293c9b07 137
lukeocarwright 1:766a293c9b07 138 /** Get angle of joystick movement
lukeocarwright 1:766a293c9b07 139 * @returns value in range 0.0 to 359.9. 0.0 corresponds to N, 180.0 to S. -1.0 is central
lukeocarwright 1:766a293c9b07 140 */
lukeocarwright 1:766a293c9b07 141 float get_angle();
lukeocarwright 1:766a293c9b07 142
lukeocarwright 1:766a293c9b07 143 /** Gets joystick direction
lukeocarwright 1:766a293c9b07 144 * @returns an enum: CENTRE, N, NE, E, SE, S, SW, W, NW,
lukeocarwright 1:766a293c9b07 145 */
lukeocarwright 1:766a293c9b07 146 Direction get_direction(); // N,NE,E,SE etc.
lukeocarwright 1:766a293c9b07 147
lukeocarwright 1:766a293c9b07 148 /** Gets raw cartesian co-ordinates of joystick
lukeocarwright 1:766a293c9b07 149 * @returns a struct with x,y members, each in the range 0.0 to 1.0
lukeocarwright 1:766a293c9b07 150 */
lukeocarwright 1:766a293c9b07 151 Vector2D get_coord(); // cartesian co-ordinates x,y
lukeocarwright 1:766a293c9b07 152
lukeocarwright 1:766a293c9b07 153 /** Gets cartesian coordinates mapped to circular grid
lukeocarwright 1:766a293c9b07 154 * @returns a struct with x,y members, each in the range 0.0 to 1.0
lukeocarwright 1:766a293c9b07 155 */
lukeocarwright 1:766a293c9b07 156 Vector2D get_mapped_coord(); // x,y mapped to circle
lukeocarwright 1:766a293c9b07 157
lukeocarwright 1:766a293c9b07 158 /** Gets polar coordinates of the joystick
lukeocarwright 1:766a293c9b07 159 * @returns a struct contains mag and angle
lukeocarwright 1:766a293c9b07 160 */
lukeocarwright 1:766a293c9b07 161 Polar get_polar(); // mag and angle in struct form
lukeocarwright 1:766a293c9b07 162
lukeocarwright 1:766a293c9b07 163
lukeocarwright 1:766a293c9b07 164 /** Resets all button states. Useful for calling inbetween scenes
lukeocarwright 1:766a293c9b07 165 * where you do not want button presses from the previous scene effecting
lukeocarwright 1:766a293c9b07 166 * the current scene
lukeocarwright 1:766a293c9b07 167 */
lukeocarwright 1:766a293c9b07 168 void reset_buttons();
lukeocarwright 1:766a293c9b07 169
lukeocarwright 1:766a293c9b07 170 /** Returns true if A has been pressed
lukeocarwright 1:766a293c9b07 171 * @returns a bool corresponding to A being pressed
lukeocarwright 1:766a293c9b07 172 */
lukeocarwright 1:766a293c9b07 173
lukeocarwright 1:766a293c9b07 174 bool A_pressed();
lukeocarwright 1:766a293c9b07 175
lukeocarwright 1:766a293c9b07 176 /** Returns true if A is held
lukeocarwright 1:766a293c9b07 177 * @returns a bool corresponding to A being held
lukeocarwright 1:766a293c9b07 178 *
lukeocarwright 1:766a293c9b07 179 */
lukeocarwright 1:766a293c9b07 180 bool A_held();
lukeocarwright 1:766a293c9b07 181
lukeocarwright 1:766a293c9b07 182
lukeocarwright 1:766a293c9b07 183 /** Returns true if B has been pressed
lukeocarwright 1:766a293c9b07 184 * @returns a bool corresponding to B being pressed
lukeocarwright 1:766a293c9b07 185 */
lukeocarwright 1:766a293c9b07 186 bool B_pressed();
lukeocarwright 1:766a293c9b07 187
lukeocarwright 1:766a293c9b07 188 /** Returns true if B is held
lukeocarwright 1:766a293c9b07 189 * @returns a bool corresponding to B being held
lukeocarwright 1:766a293c9b07 190 *
lukeocarwright 1:766a293c9b07 191 */
lukeocarwright 1:766a293c9b07 192 bool B_held();
lukeocarwright 1:766a293c9b07 193
lukeocarwright 1:766a293c9b07 194 /** Returns true if B has been pressed
lukeocarwright 1:766a293c9b07 195 * @returns a bool corresponding to B being pressed
lukeocarwright 1:766a293c9b07 196 */
lukeocarwright 1:766a293c9b07 197 bool X_pressed();
lukeocarwright 1:766a293c9b07 198
lukeocarwright 1:766a293c9b07 199 /** Returns true if X is held
lukeocarwright 1:766a293c9b07 200 * @returns a bool corresponding to X being held
lukeocarwright 1:766a293c9b07 201 *
lukeocarwright 1:766a293c9b07 202 */
lukeocarwright 1:766a293c9b07 203 bool X_held();
lukeocarwright 1:766a293c9b07 204
lukeocarwright 1:766a293c9b07 205 /** Returns true if Y has been pressed
lukeocarwright 1:766a293c9b07 206 * @returns a bool corresponding to Y being pressed
lukeocarwright 1:766a293c9b07 207 */
lukeocarwright 1:766a293c9b07 208 bool Y_pressed();
lukeocarwright 1:766a293c9b07 209
lukeocarwright 1:766a293c9b07 210 /** Returns true if Y is held
lukeocarwright 1:766a293c9b07 211 * @returns a bool corresponding to Y being held
lukeocarwright 1:766a293c9b07 212 *
lukeocarwright 1:766a293c9b07 213 */
lukeocarwright 1:766a293c9b07 214 bool Y_held();
lukeocarwright 1:766a293c9b07 215
lukeocarwright 1:766a293c9b07 216
lukeocarwright 1:766a293c9b07 217 /** Returns true if start has been pressed
lukeocarwright 1:766a293c9b07 218 * @returns a bool corresponding to start being pressed
lukeocarwright 1:766a293c9b07 219 */
lukeocarwright 1:766a293c9b07 220 bool start_pressed();
lukeocarwright 1:766a293c9b07 221
lukeocarwright 1:766a293c9b07 222 /** Returns true if start is held
lukeocarwright 1:766a293c9b07 223 * @returns a bool corresponding to start being held
lukeocarwright 1:766a293c9b07 224 *
lukeocarwright 1:766a293c9b07 225 */
lukeocarwright 1:766a293c9b07 226 bool start_held();
lukeocarwright 1:766a293c9b07 227
lukeocarwright 1:766a293c9b07 228 /** Play a single tone for the specifed duration
lukeocarwright 1:766a293c9b07 229 *@param note frequency (in Hz)
lukeocarwright 1:766a293c9b07 230 *@param duration (in s)
lukeocarwright 1:766a293c9b07 231 */
lukeocarwright 1:766a293c9b07 232 void tone(const float frequency,const float duration);
lukeocarwright 1:766a293c9b07 233
lukeocarwright 1:766a293c9b07 234 /** Play a melody
lukeocarwright 1:766a293c9b07 235 *@param length of note array
lukeocarwright 1:766a293c9b07 236 *@param array of note frequencies (in Hz) - 0 treated as a rest
lukeocarwright 1:766a293c9b07 237 *@param array of note durations (4 corresponds to 1/4, 8 is 1/8 etc.)
lukeocarwright 1:766a293c9b07 238 *@param beats per minute
lukeocarwright 1:766a293c9b07 239 *@param whether to repeat or play just once
lukeocarwright 1:766a293c9b07 240 */
lukeocarwright 1:766a293c9b07 241 void play_melody(int length,const int *notes,const int *durations,float bpm,bool repeat);
lukeocarwright 1:766a293c9b07 242
lukeocarwright 1:766a293c9b07 243 /** Set the BPM of the melody
lukeocarwright 1:766a293c9b07 244 *@param beats per minute
lukeocarwright 1:766a293c9b07 245 */
lukeocarwright 1:766a293c9b07 246 void set_bpm(float bpm);
lukeocarwright 1:766a293c9b07 247
lukeocarwright 1:766a293c9b07 248 /** Write an analog voltage to the speaker
lukeocarwright 1:766a293c9b07 249 *@param voltage in range 0.0 to 1.0 (corresponds 0.0 to 3.3 V)
lukeocarwright 1:766a293c9b07 250 */
lukeocarwright 1:766a293c9b07 251 void write_dac(float val);
lukeocarwright 1:766a293c9b07 252
lukeocarwright 1:766a293c9b07 253
lukeocarwright 1:766a293c9b07 254
lukeocarwright 1:766a293c9b07 255
lukeocarwright 1:766a293c9b07 256 private:
lukeocarwright 1:766a293c9b07 257
lukeocarwright 1:766a293c9b07 258 volatile bool A_fall;
lukeocarwright 1:766a293c9b07 259 void A_fall_interrupt();
lukeocarwright 1:766a293c9b07 260
lukeocarwright 1:766a293c9b07 261 volatile bool B_fall;
lukeocarwright 1:766a293c9b07 262 void B_fall_interrupt();
lukeocarwright 1:766a293c9b07 263
lukeocarwright 1:766a293c9b07 264 volatile bool X_fall;
lukeocarwright 1:766a293c9b07 265 void X_fall_interrupt();
lukeocarwright 1:766a293c9b07 266
lukeocarwright 1:766a293c9b07 267 volatile bool Y_fall;
lukeocarwright 1:766a293c9b07 268 void Y_fall_interrupt();
lukeocarwright 1:766a293c9b07 269
lukeocarwright 1:766a293c9b07 270 volatile bool start_fall;
lukeocarwright 1:766a293c9b07 271 void start_fall_interrupt();
lukeocarwright 1:766a293c9b07 272
lukeocarwright 1:766a293c9b07 273 // Tone functions
lukeocarwright 1:766a293c9b07 274 void ticker_isr();
lukeocarwright 1:766a293c9b07 275 void timeout_isr();
lukeocarwright 1:766a293c9b07 276 void note_timeout_isr();
lukeocarwright 1:766a293c9b07 277 void play_next_note();
lukeocarwright 1:766a293c9b07 278
lukeocarwright 1:766a293c9b07 279
lukeocarwright 1:766a293c9b07 280
lukeocarwright 1:766a293c9b07 281 };
lukeocarwright 1:766a293c9b07 282
lukeocarwright 1:766a293c9b07 283 // Note definitions from Arduino.cc
lukeocarwright 1:766a293c9b07 284 #define NOTE_B0 31
lukeocarwright 1:766a293c9b07 285 #define NOTE_C1 33
lukeocarwright 1:766a293c9b07 286 #define NOTE_CS1 35
lukeocarwright 1:766a293c9b07 287 #define NOTE_D1 37
lukeocarwright 1:766a293c9b07 288 #define NOTE_DS1 39
lukeocarwright 1:766a293c9b07 289 #define NOTE_E1 41
lukeocarwright 1:766a293c9b07 290 #define NOTE_F1 44
lukeocarwright 1:766a293c9b07 291 #define NOTE_FS1 46
lukeocarwright 1:766a293c9b07 292 #define NOTE_G1 49
lukeocarwright 1:766a293c9b07 293 #define NOTE_GS1 52
lukeocarwright 1:766a293c9b07 294 #define NOTE_A1 55
lukeocarwright 1:766a293c9b07 295 #define NOTE_AS1 58
lukeocarwright 1:766a293c9b07 296 #define NOTE_B1 62
lukeocarwright 1:766a293c9b07 297 #define NOTE_C2 65
lukeocarwright 1:766a293c9b07 298 #define NOTE_CS2 69
lukeocarwright 1:766a293c9b07 299 #define NOTE_D2 73
lukeocarwright 1:766a293c9b07 300 #define NOTE_DS2 78
lukeocarwright 1:766a293c9b07 301 #define NOTE_E2 82
lukeocarwright 1:766a293c9b07 302 #define NOTE_F2 87
lukeocarwright 1:766a293c9b07 303 #define NOTE_FS2 93
lukeocarwright 1:766a293c9b07 304 #define NOTE_G2 98
lukeocarwright 1:766a293c9b07 305 #define NOTE_GS2 104
lukeocarwright 1:766a293c9b07 306 #define NOTE_A2 110
lukeocarwright 1:766a293c9b07 307 #define NOTE_AS2 117
lukeocarwright 1:766a293c9b07 308 #define NOTE_B2 123
lukeocarwright 1:766a293c9b07 309 #define NOTE_C3 131
lukeocarwright 1:766a293c9b07 310 #define NOTE_CS3 139
lukeocarwright 1:766a293c9b07 311 #define NOTE_D3 147
lukeocarwright 1:766a293c9b07 312 #define NOTE_DS3 156
lukeocarwright 1:766a293c9b07 313 #define NOTE_E3 165
lukeocarwright 1:766a293c9b07 314 #define NOTE_F3 175
lukeocarwright 1:766a293c9b07 315 #define NOTE_FS3 185
lukeocarwright 1:766a293c9b07 316 #define NOTE_G3 196
lukeocarwright 1:766a293c9b07 317 #define NOTE_GS3 208
lukeocarwright 1:766a293c9b07 318 #define NOTE_A3 220
lukeocarwright 1:766a293c9b07 319 #define NOTE_AS3 233
lukeocarwright 1:766a293c9b07 320 #define NOTE_B3 247
lukeocarwright 1:766a293c9b07 321 #define NOTE_C4 262
lukeocarwright 1:766a293c9b07 322 #define NOTE_CS4 277
lukeocarwright 1:766a293c9b07 323 #define NOTE_D4 294
lukeocarwright 1:766a293c9b07 324 #define NOTE_DS4 311
lukeocarwright 1:766a293c9b07 325 #define NOTE_E4 330
lukeocarwright 1:766a293c9b07 326 #define NOTE_F4 349
lukeocarwright 1:766a293c9b07 327 #define NOTE_FS4 370
lukeocarwright 1:766a293c9b07 328 #define NOTE_G4 392
lukeocarwright 1:766a293c9b07 329 #define NOTE_GS4 415
lukeocarwright 1:766a293c9b07 330 #define NOTE_A4 440
lukeocarwright 1:766a293c9b07 331 #define NOTE_AS4 466
lukeocarwright 1:766a293c9b07 332 #define NOTE_B4 494
lukeocarwright 1:766a293c9b07 333 #define NOTE_C5 523
lukeocarwright 1:766a293c9b07 334 #define NOTE_CS5 554
lukeocarwright 1:766a293c9b07 335 #define NOTE_D5 587
lukeocarwright 1:766a293c9b07 336 #define NOTE_DS5 622
lukeocarwright 1:766a293c9b07 337 #define NOTE_E5 659
lukeocarwright 1:766a293c9b07 338 #define NOTE_F5 698
lukeocarwright 1:766a293c9b07 339 #define NOTE_FS5 740
lukeocarwright 1:766a293c9b07 340 #define NOTE_G5 784
lukeocarwright 1:766a293c9b07 341 #define NOTE_GS5 831
lukeocarwright 1:766a293c9b07 342 #define NOTE_A5 880
lukeocarwright 1:766a293c9b07 343 #define NOTE_AS5 932
lukeocarwright 1:766a293c9b07 344 #define NOTE_B5 988
lukeocarwright 1:766a293c9b07 345 #define NOTE_C6 1047
lukeocarwright 1:766a293c9b07 346 #define NOTE_CS6 1109
lukeocarwright 1:766a293c9b07 347 #define NOTE_D6 1175
lukeocarwright 1:766a293c9b07 348 #define NOTE_DS6 1245
lukeocarwright 1:766a293c9b07 349 #define NOTE_E6 1319
lukeocarwright 1:766a293c9b07 350 #define NOTE_F6 1397
lukeocarwright 1:766a293c9b07 351 #define NOTE_FS6 1480
lukeocarwright 1:766a293c9b07 352 #define NOTE_G6 1568
lukeocarwright 1:766a293c9b07 353 #define NOTE_GS6 1661
lukeocarwright 1:766a293c9b07 354 #define NOTE_A6 1760
lukeocarwright 1:766a293c9b07 355 #define NOTE_AS6 1865
lukeocarwright 1:766a293c9b07 356 #define NOTE_B6 1976
lukeocarwright 1:766a293c9b07 357 #define NOTE_C7 2093
lukeocarwright 1:766a293c9b07 358 #define NOTE_CS7 2217
lukeocarwright 1:766a293c9b07 359 #define NOTE_D7 2349
lukeocarwright 1:766a293c9b07 360 #define NOTE_DS7 2489
lukeocarwright 1:766a293c9b07 361 #define NOTE_E7 2637
lukeocarwright 1:766a293c9b07 362 #define NOTE_F7 2794
lukeocarwright 1:766a293c9b07 363 #define NOTE_FS7 2960
lukeocarwright 1:766a293c9b07 364 #define NOTE_G7 3136
lukeocarwright 1:766a293c9b07 365 #define NOTE_GS7 3322
lukeocarwright 1:766a293c9b07 366 #define NOTE_A7 3520
lukeocarwright 1:766a293c9b07 367 #define NOTE_AS7 3729
lukeocarwright 1:766a293c9b07 368 #define NOTE_B7 3951
lukeocarwright 1:766a293c9b07 369 #define NOTE_C8 4186
lukeocarwright 1:766a293c9b07 370 #define NOTE_CS8 4435
lukeocarwright 1:766a293c9b07 371 #define NOTE_D8 4699
lukeocarwright 1:766a293c9b07 372 #define NOTE_DS8 4978
lukeocarwright 1:766a293c9b07 373
lukeocarwright 1:766a293c9b07 374 #endif