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