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