George Sykes ELEC2645 project

Dependencies:   mbed

https://os.mbed.com/media/uploads/el18gs/pixil-frame-0.png

GHOST HUNTER

In a world of ghostly horrors there is much money to be made in underground ghost fighting rings. You've managed to get hold of a Ghostbuster, a special piece of equipment that allows you to catch, train and fight ghosts.

Instructions

Below you will find the instructions for the game. Please note that due to COVID-19 a large part of the game (fighting ghosts) could not be added as it would have required access to a second gamepad which i could not acquire.

Welcome screen

When first started you will be presented with a welcome screen

  • Pot 1 to adjust the contrast on the screen
  • Press A to continue.

Main menu

You have three options, catch ghosts (add ghosts to your inventory), inventory (sell ghosts) or settings(adjust the games settings).

  • Press X and B to move the selection up and down respectively
  • Press A to enter the selected submenu

Catch Ghost

Will now be presented with two challenges. In the first you need to find a ghost, in the second you catch it. Theses stages will start automatically.

Find ghost

Rotate the gamepad on its roll and pitch axis until all the LED's turn on. The ones on the left indicate roll and the right pitch.

  • Rotate the gamepad on it roll and pitch to light up the LED's

Catch ghost

Return the gamepad to a comfortable position and use the joystick to move the crosshairs onto the ghost sprite. When ready press the A button to catch the ghost. You will be told what kind of ghost you have captured and it will be added to your inventory.

  • Press A to catch the ghost
  • Move the joystick to move the crosshairs

Inventory

The inventory allows you to view your ghosts and sell them.

  • Use Pot 1 to scroll through the ghosts
  • Pot 2 to scroll up and down the details of the individual ghosts
  • Press X to prepare to sell a ghost and press again to confirm, if you don't press again the sale screen will disappear after 5 seconds
  • Press Start to return to the main menu

Settings

This menu allows you to adjust some of the settings of the game.

  • Press X to go up one option
  • Press B to go down one option
  • Press A to enter the selected submenu
  • Press Start to return to the main menu

Contrast

Set the contrast of the LCD screen, the contrast will adjust on this screen so you can see the effect (contrast is bounded between 0.4 and 0.6).

  • Pot 1 to increase or decrease the contrast
  • Press A to set the contrast

Button Delay

Set the minimum time between button presses; if this is too low the game will detect two button presses when there was only one, too high and the buttons will seem unresponsive. So as to ensure these issues do not occur while changing the setting button X temporarily operates on the new delay but none of the others will until A is pressed.

  • Pot 1 to increase or decrease the delay
  • Press X to test the new delay, this will toggle the small circle to be filled in or unfilled
  • Press A to save the setting
Committer:
el18gs
Date:
Tue May 26 13:37:32 2020 +0000
Revision:
17:3ebcf7bba112
Parent:
2:eaf245af2aae
Final Submission. I have read and agreed with Statement of Academic Integrity.

Who changed what in which revision?

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