From 54de1d245a98a8032e8c41089158321f6be58b1c Mon Sep 17 00:00:00 2001 From: Andrea Manni Date: Thu, 16 Apr 2015 15:45:41 +0200 Subject: [PATCH] ezo e RGB --- README | 78 ++++++++++----- .../rgb_1_all_color.ino} | 0 .../RGB_PWM.ino => rgb_2_pwm/rgb_2_pwm.ino} | 0 .../rgb_3_ReadASCIIString.ino} | 0 .../photo_5_calibration.ino | 1 + .../photo_7_tonePitchFollower.ino | 47 +++++++++ .../photo_7_tonePitchFollower_ino.ino | 64 +++++++++++++ .../piezo_mario_tune => libraries}/pitches.h | 0 .../piezo_1_tonePitchFollower.ino | 47 +++++++++ .../piezo_1_tonePitchFollower_ino.ino | 64 +++++++++++++ piezo/piezo_2_keyboard/piezo_2_keyboard.ino | 56 +++++++++++ .../piezo_3_toneMelody/piezo_3_toneMelody.ino | 55 +++++++++++ piezo/piezo_3_toneMelody/pitches.h | 95 +++++++++++++++++++ .../piezo_4_mario_tune.ino} | 0 piezo/piezo_4_mario_tune/pitches.h | 95 +++++++++++++++++++ 15 files changed, 579 insertions(+), 23 deletions(-) rename RGB_LED/{rgb_all_color/rgb_all_color.ino => rgb_1_all_color/rgb_1_all_color.ino} (100%) rename RGB_LED/{RGB_PWM/RGB_PWM.ino => rgb_2_pwm/rgb_2_pwm.ino} (100%) rename RGB_LED/{ReadASCIIString/ReadASCIIString => rgb_3_ReadASCIIString/rgb_3_ReadASCIIString.ino} (100%) create mode 100644 basic/analog_input/photo_7_tonePitchFollower/photo_7_tonePitchFollower.ino create mode 100644 basic/analog_input/photo_7_tonePitchFollower/photo_7_tonePitchFollower_ino/photo_7_tonePitchFollower_ino.ino rename {piezo/piezo_mario_tune => libraries}/pitches.h (100%) create mode 100644 piezo/piezo_1_tonePitchFollower/piezo_1_tonePitchFollower.ino create mode 100644 piezo/piezo_1_tonePitchFollower/piezo_1_tonePitchFollower_ino/piezo_1_tonePitchFollower_ino.ino create mode 100644 piezo/piezo_2_keyboard/piezo_2_keyboard.ino create mode 100644 piezo/piezo_3_toneMelody/piezo_3_toneMelody.ino create mode 100644 piezo/piezo_3_toneMelody/pitches.h rename piezo/{piezo_mario_tune/piezo_mario_tune.ino => piezo_4_mario_tune/piezo_4_mario_tune.ino} (100%) create mode 100644 piezo/piezo_4_mario_tune/pitches.h diff --git a/README b/README index 6601373..5f7f14d 100644 --- a/README +++ b/README @@ -47,72 +47,104 @@ presentati con i PWM. Debug Seriale ================================ -basic/serial_debug/serial_hello_world/ +- basic/serial_debug/serial_hello_world/ Digital input ================================ Cicli condizionali -basic/buttons/button_1 -basic/buttons/button_2_serial_debug/ +- basic/buttons/button_1 +- basic/buttons/button_2_serial_debug/ (pull down e pull up) Analog input ================================ -basic/analog_input/analogInput_1/analogInput_1.ino -basic/analog_input/analogInput_2_serial/analogInput_2_serial.ino +- basic/analog_input/analogInput_1/analogInput_1.ino +- basic/analog_input/analogInput_2_serial/analogInput_2_serial.ino Programmazione ================================ -Data types: http://www.ladyada.net/learn/arduino/lesson4.html +- Data types: http://www.ladyada.net/learn/arduino/lesson4.html fare byte - int - long -Magari uno script con serial print, eventualmente anche esadecimale +- Magari uno script con serial print, eventualmente anche esadecimale Analog Output ================================ Cicli iterativi while -basic/pwm/pwm_0_manuale/pwm_0_manuale.ino Dimostrativo -basic/pwm/pwm_1_while_byte/pwm_1_while_byte.ino -basic/pwm/pwm_1_soluzione_doppio_while_byte/pwm_1_soluzione_doppio_while_byte.ino +- basic/pwm/pwm_0_manuale/pwm_0_manuale.ino Dimostrativo +- basic/pwm/pwm_1_while_byte/pwm_1_while_byte.ino +- basic/pwm/pwm_1_soluzione_doppio_while_byte/pwm_1_soluzione_doppio_while_byte.ino Programmazione: operatori binari ================================ -programming/operators/operator_1_basic/operator_1_basic.ino -programming/operators/operator_2_comparison/operator_2_comparison.ino +- programming/operators/operator_1_basic/operator_1_basic.ino +- programming/operators/operator_2_comparison/operator_2_comparison.ino Analog Output ================================ Cicli iterativi For, operatore ternario -basic/pwm/pwm_2_for_loop/pwm_2_for_loop.ino +- Introduzione for loop: basic/pwm/pwm_2_for_loop/pwm_2_for_loop.ino +- basic/pwm/pwm_3_fade_reverser/pwm_3_fade_reverser.ino +- basic/pwm/pwm_4_analog_input/pwm_4_analog_input.ino + +State machine +================= +Gestione stato di un bottone +Simple multitasking con millis() e due blink contemporanei + +- basic/buttons/button_state_3/button_state_3.ino +- basic/buttons/button_state_4_state/button_state_4_state.ino + Programmazione: operatori logici -================================ +----------------------------------- -programming/operators/operator_3_logic/operator_3_logic.ino +- programming/operators/operator_3_logic/operator_3_logic.ino +State machine: And +------------------- -Analog Output -================================ +- basic/buttons/button_state_4_state_and_condition/button_state_4_state_and_condition.ino -basic/pwm/pwm_3_fade_reverser/pwm_3_fade_reverser.ino -basic/pwm/pwm_4_analog_input/pwm_4_analog_input.ino For loop ========== +Approfondimento su i cicli for, uso degli array + +- programming/loops/loop_3_multi_led/loop_3_multi_led.ino +- Array: programming/loops/loop_4_multi_led_array/loop_4_multi_led_array.ino +- sketchbook_andrea/programming/loops/ +- Random e interruzione del flusso del programma tramite if + + +Light sensor +=============== + +- basic/analog_input/photo_3_serial/ +- Calibrazione manuale: basic/analog_input/photo_4_calibrated/ +- Calibrazione automatica: basic/analog_input/photo_5_calibration/ +- Smoothing: basic/analog_input/photo_6_smooth/ +- basic/analog_input/photo_7_tonePitchFollower/ + +Piezo +======== +- Traduzione tra due percezioni: basic/analog_input/photo_7_tonePitchFollower/ +- Singole note e pull up: piezo/keyboard_three_pullup_buttons/ +- Melodia: piezo/piezo_3_toneMelody/ +- Melodia: piezo/piezo_4_mario_tune/ + -sketchbook_andrea/programming/loops/ -Random e interruzione del flusso del programma tramite if Status ========== @@ -125,8 +157,8 @@ Completata la parte di: State machine ================= -Gestione stato di un bottone -Simple multitasking con millis() e due blink contemporanei (questo si potrebbe +- Gestione stato di un bottone +- Simple multitasking con millis() e due blink contemporanei (questo si potrebbe fare anche dopo). diff --git a/RGB_LED/rgb_all_color/rgb_all_color.ino b/RGB_LED/rgb_1_all_color/rgb_1_all_color.ino similarity index 100% rename from RGB_LED/rgb_all_color/rgb_all_color.ino rename to RGB_LED/rgb_1_all_color/rgb_1_all_color.ino diff --git a/RGB_LED/RGB_PWM/RGB_PWM.ino b/RGB_LED/rgb_2_pwm/rgb_2_pwm.ino similarity index 100% rename from RGB_LED/RGB_PWM/RGB_PWM.ino rename to RGB_LED/rgb_2_pwm/rgb_2_pwm.ino diff --git a/RGB_LED/ReadASCIIString/ReadASCIIString b/RGB_LED/rgb_3_ReadASCIIString/rgb_3_ReadASCIIString.ino similarity index 100% rename from RGB_LED/ReadASCIIString/ReadASCIIString rename to RGB_LED/rgb_3_ReadASCIIString/rgb_3_ReadASCIIString.ino diff --git a/basic/analog_input/photo_5_calibration/photo_5_calibration.ino b/basic/analog_input/photo_5_calibration/photo_5_calibration.ino index db0d2b0..1cdc1b1 100644 --- a/basic/analog_input/photo_5_calibration/photo_5_calibration.ino +++ b/basic/analog_input/photo_5_calibration/photo_5_calibration.ino @@ -78,3 +78,4 @@ Domande: 1. Modificare lo sketch in modo che modifichi la luminosita' di un led via PWM tramite il valore letto dal sensore. 2. Come fare per costringere la variabile dentro un intervallo stabilito? + diff --git a/basic/analog_input/photo_7_tonePitchFollower/photo_7_tonePitchFollower.ino b/basic/analog_input/photo_7_tonePitchFollower/photo_7_tonePitchFollower.ino new file mode 100644 index 0000000..e74c7b3 --- /dev/null +++ b/basic/analog_input/photo_7_tonePitchFollower/photo_7_tonePitchFollower.ino @@ -0,0 +1,47 @@ +/* + Pitch follower + + Plays a pitch that changes based on a changing analog input + + circuit: + * 8-ohm speaker on digital pin 8 + * photoresistor on analog 0 to 5V + * 4.7K resistor on analog 0 to ground + + created 21 Jan 2010 + modified 31 May 2012 + by Tom Igoe, with suggestion from Michael Flynn + +This example code is in the public domain. + + http://arduino.cc/en/Tutorial/Tone2 + + */ + + +void setup() { + // initialize serial communications (for debugging only): + Serial.begin(9600); +} + +void loop() { + // read the sensor: + int sensorReading = analogRead(A0); + // print the sensor reading so you know its range + Serial.println(sensorReading); + // map the analog input range (in this case, 400 - 1000 from the photoresistor) + // to the output pitch range (120 - 1500Hz) + // change the minimum and maximum input numbers below + // depending on the range your sensor's giving: + int thisPitch = map(sensorReading, 400, 1000, 120, 1500); + + // play the pitch: + tone(9, thisPitch, 10); + delay(1); // delay in between reads for stability +} + + + + + + diff --git a/basic/analog_input/photo_7_tonePitchFollower/photo_7_tonePitchFollower_ino/photo_7_tonePitchFollower_ino.ino b/basic/analog_input/photo_7_tonePitchFollower/photo_7_tonePitchFollower_ino/photo_7_tonePitchFollower_ino.ino new file mode 100644 index 0000000..31d41a6 --- /dev/null +++ b/basic/analog_input/photo_7_tonePitchFollower/photo_7_tonePitchFollower_ino/photo_7_tonePitchFollower_ino.ino @@ -0,0 +1,64 @@ +/* +Pitch following + +The input from a photo resistor dictates the pitch of a piezo. + + + */ + +// These constants won't change: +const int sensorPin = A0; // pin that the sensor is attached to +const int ledPin = 9; // pin that the LED is attached to +int thisPitch ; + +// calibration variables: +int sensorValue = 0; // the sensor value +int sensorMin = 1023; // minimum sensor value +int sensorMax = 0; // maximum sensor value + + +void setup() { + // turn on LED to signal the start of the calibration period: + pinMode(13, OUTPUT); + digitalWrite(13, HIGH); + + // calibrate during the first five seconds + while (millis() < 5000) { + sensorValue = analogRead(sensorPin); + + // record the maximum sensor value + if (sensorValue > sensorMax) { + sensorMax = sensorValue; + } + + // record the minimum sensor value + if (sensorValue < sensorMin) { + sensorMin = sensorValue; + } + } + + // signal the end of the calibration period + digitalWrite(13, LOW); +} + +void loop() { + // read the sensor: + sensorValue = analogRead(sensorPin); + + // apply the calibration to the sensor reading + thisPitch = map(sensorValue, sensorMin, sensorMax, 120, 1500); + // map the analog input range (in this case, min - max from the photoresistor) + // to the output pitch range (120 - 1500Hz) + // change the minimum and maximum input numbers below + // depending on the range your sensor's giving: + + // in case the sensor value is outside the range seen during calibration + thisPitch = constrain(sensorValue, 120, 1500); + + + + // play the pitch: + tone(ledPin, thisPitch, 10); // Tone is built in function + delay(1); // delay in between reads for stability +} + diff --git a/piezo/piezo_mario_tune/pitches.h b/libraries/pitches.h similarity index 100% rename from piezo/piezo_mario_tune/pitches.h rename to libraries/pitches.h diff --git a/piezo/piezo_1_tonePitchFollower/piezo_1_tonePitchFollower.ino b/piezo/piezo_1_tonePitchFollower/piezo_1_tonePitchFollower.ino new file mode 100644 index 0000000..e74c7b3 --- /dev/null +++ b/piezo/piezo_1_tonePitchFollower/piezo_1_tonePitchFollower.ino @@ -0,0 +1,47 @@ +/* + Pitch follower + + Plays a pitch that changes based on a changing analog input + + circuit: + * 8-ohm speaker on digital pin 8 + * photoresistor on analog 0 to 5V + * 4.7K resistor on analog 0 to ground + + created 21 Jan 2010 + modified 31 May 2012 + by Tom Igoe, with suggestion from Michael Flynn + +This example code is in the public domain. + + http://arduino.cc/en/Tutorial/Tone2 + + */ + + +void setup() { + // initialize serial communications (for debugging only): + Serial.begin(9600); +} + +void loop() { + // read the sensor: + int sensorReading = analogRead(A0); + // print the sensor reading so you know its range + Serial.println(sensorReading); + // map the analog input range (in this case, 400 - 1000 from the photoresistor) + // to the output pitch range (120 - 1500Hz) + // change the minimum and maximum input numbers below + // depending on the range your sensor's giving: + int thisPitch = map(sensorReading, 400, 1000, 120, 1500); + + // play the pitch: + tone(9, thisPitch, 10); + delay(1); // delay in between reads for stability +} + + + + + + diff --git a/piezo/piezo_1_tonePitchFollower/piezo_1_tonePitchFollower_ino/piezo_1_tonePitchFollower_ino.ino b/piezo/piezo_1_tonePitchFollower/piezo_1_tonePitchFollower_ino/piezo_1_tonePitchFollower_ino.ino new file mode 100644 index 0000000..b5e9d24 --- /dev/null +++ b/piezo/piezo_1_tonePitchFollower/piezo_1_tonePitchFollower_ino/piezo_1_tonePitchFollower_ino.ino @@ -0,0 +1,64 @@ +/* +Pitch following + +The input from a photo resistor dictates the pitch of a piezo. + + + */ + +// These constants won't change: +const int sensorPin = A0; // pin that the sensor is attached to +const int ledPin = 9; // pin that the LED is attached to +int thisPitch ; + +// calibration variables: +int sensorValue = 0; // the sensor value +int sensorMin = 1023; // minimum sensor value +int sensorMax = 0; // maximum sensor value + + +void setup() { + // turn on LED to signal the start of the calibration period: + pinMode(13, OUTPUT); + digitalWrite(13, HIGH); + + // calibrate during the first five seconds + while (millis() < 5000) { + sensorValue = analogRead(sensorPin); + + // record the maximum sensor value + if (sensorValue > sensorMax) { + sensorMax = sensorValue; + } + + // record the minimum sensor value + if (sensorValue < sensorMin) { + sensorMin = sensorValue; + } + } + + // signal the end of the calibration period + digitalWrite(13, LOW); +} + +void loop() { + // read the sensor: + sensorValue = analogRead(sensorPin); + + // apply the calibration to the sensor reading + thisPitch = map(sensorValue, sensorMin, sensorMax, 120, 1500); + // map the analog input range (in this case, min - max from the photoresistor) + // to the output pitch range (120 - 1500Hz) + // change the minimum and maximum input numbers below + // depending on the range your sensor's giving: + + // in case the sensor value is outside the range seen during calibration + thisPitch = constrain(sensorValue, 120, 1500); + + + + // play the pitch: + tone(ledPin, thisPitch, 10); // Tone is built in function + delay(1); // delay in between notes +} + diff --git a/piezo/piezo_2_keyboard/piezo_2_keyboard.ino b/piezo/piezo_2_keyboard/piezo_2_keyboard.ino new file mode 100644 index 0000000..ae3aabd --- /dev/null +++ b/piezo/piezo_2_keyboard/piezo_2_keyboard.ino @@ -0,0 +1,56 @@ +/* + Melody keyboard with Input Pullup Serial + Plays a pitch that changes based on 3 digital inputs + + This example demonstrates the use of pinMode(INPUT_PULLUP). It reads a + digital input on pin 2 and prints the results to the serial monitor. + + Thecircuit: + * 3 buttons in pin 2,3,4 with no resistors + * Piezo on digital pin 9 + * Serial debug is available + + This example code is in the public domain + + Circuit: http://lab.piffa.net/schemi/piezo_2_keyboard_bb.png + + */ + + +int input[]= { + 1,2,3}; +int notes[] = { + 262, 392,880 }; // suona una prima, quinta, ottava in C4 + +// Carica un file di esempio con tutte le note +// #include "pitches.h"; +// int notes[] = {NOTE_C4, NOTE_G4,NOTE_A5 }; // suona una prima, quinta, ottava + +void setup(){ + //start serial connection + Serial.begin(9600); + //configure pin2/3/4 as an input and enable the internal pull-up resistor + pinMode(2, INPUT_PULLUP); + pinMode(3, INPUT_PULLUP); + pinMode(4, INPUT_PULLUP); + pinMode(9, OUTPUT); +} + +void loop(){ + for (int thisSensor = 2; thisSensor < 5; thisSensor++) { + int sensorReading = digitalRead(thisSensor); + if (sensorReading == LOW) { + Serial.println(thisSensor); + tone(9, notes[thisSensor -2], 50); // Notes array is translated + } + //delay(2); // eventuale delay + } +} +/* Domande + 1. Modificare le note suonate utilizzando come riferimento il file pitches.h: + suonare una prima, terza, quinta (C-E-G) + 2. Includere il file pitches.h . Come si potrebbe scrivere una melodia da far suonare + autnomamente ad Arduino? + */ + + diff --git a/piezo/piezo_3_toneMelody/piezo_3_toneMelody.ino b/piezo/piezo_3_toneMelody/piezo_3_toneMelody.ino new file mode 100644 index 0000000..a5c5701 --- /dev/null +++ b/piezo/piezo_3_toneMelody/piezo_3_toneMelody.ino @@ -0,0 +1,55 @@ +/* + Melody + + Plays a melody + + circuit: + * 8-ohm speaker on digital pin 8 + + created 21 Jan 2010 + modified 30 Aug 2011 + by Tom Igoe + +This example code is in the public domain. + + http://arduino.cc/en/Tutorial/Tone + + */ + #include "pitches.h" + +int piezoPin = 9 ; +// notes in the melody: +int melody[] = { + NOTE_C4, NOTE_G3,NOTE_G3, NOTE_A3, NOTE_G3,0, NOTE_B3, NOTE_C4}; + +// note durations: 4 = quarter note, 8 = eighth note, etc.: +int noteDurations[] = { + 4, 8, 8, 4,4,4,4,4 }; + +void setup() { + // iterate over the notes of the melody: + for (int thisNote = 0; thisNote < 8; thisNote++) { + + // to calculate the note duration, take one second + // divided by the note type. + //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc. + int noteDuration = 1000/noteDurations[thisNote]; + tone(piezoPin, melody[thisNote],noteDuration); + + // to distinguish the notes, set a minimum time between them. + // the note's duration + 30% seems to work well: + int pauseBetweenNotes = noteDuration * 1.30; + delay(pauseBetweenNotes); + // stop the tone playing: + noTone(piezoPin); + } +} + +void loop() { + // no need to repeat the melody. + // RESET to play again +} + +/* Domande +1. Codificare Twinkle twinkle little star +*/ diff --git a/piezo/piezo_3_toneMelody/pitches.h b/piezo/piezo_3_toneMelody/pitches.h new file mode 100644 index 0000000..55c7d54 --- /dev/null +++ b/piezo/piezo_3_toneMelody/pitches.h @@ -0,0 +1,95 @@ +/************************************************* + * Public Constants + *************************************************/ + +#define NOTE_B0 31 +#define NOTE_C1 33 +#define NOTE_CS1 35 +#define NOTE_D1 37 +#define NOTE_DS1 39 +#define NOTE_E1 41 +#define NOTE_F1 44 +#define NOTE_FS1 46 +#define NOTE_G1 49 +#define NOTE_GS1 52 +#define NOTE_A1 55 +#define NOTE_AS1 58 +#define NOTE_B1 62 +#define NOTE_C2 65 +#define NOTE_CS2 69 +#define NOTE_D2 73 +#define NOTE_DS2 78 +#define NOTE_E2 82 +#define NOTE_F2 87 +#define NOTE_FS2 93 +#define NOTE_G2 98 +#define NOTE_GS2 104 +#define NOTE_A2 110 +#define NOTE_AS2 117 +#define NOTE_B2 123 +#define NOTE_C3 131 +#define NOTE_CS3 139 +#define NOTE_D3 147 +#define NOTE_DS3 156 +#define NOTE_E3 165 +#define NOTE_F3 175 +#define NOTE_FS3 185 +#define NOTE_G3 196 +#define NOTE_GS3 208 +#define NOTE_A3 220 +#define NOTE_AS3 233 +#define NOTE_B3 247 +#define NOTE_C4 262 +#define NOTE_CS4 277 +#define NOTE_D4 294 +#define NOTE_DS4 311 +#define NOTE_E4 330 +#define NOTE_F4 349 +#define NOTE_FS4 370 +#define NOTE_G4 392 +#define NOTE_GS4 415 +#define NOTE_A4 440 +#define NOTE_AS4 466 +#define NOTE_B4 494 +#define NOTE_C5 523 +#define NOTE_CS5 554 +#define NOTE_D5 587 +#define NOTE_DS5 622 +#define NOTE_E5 659 +#define NOTE_F5 698 +#define NOTE_FS5 740 +#define NOTE_G5 784 +#define NOTE_GS5 831 +#define NOTE_A5 880 +#define NOTE_AS5 932 +#define NOTE_B5 988 +#define NOTE_C6 1047 +#define NOTE_CS6 1109 +#define NOTE_D6 1175 +#define NOTE_DS6 1245 +#define NOTE_E6 1319 +#define NOTE_F6 1397 +#define NOTE_FS6 1480 +#define NOTE_G6 1568 +#define NOTE_GS6 1661 +#define NOTE_A6 1760 +#define NOTE_AS6 1865 +#define NOTE_B6 1976 +#define NOTE_C7 2093 +#define NOTE_CS7 2217 +#define NOTE_D7 2349 +#define NOTE_DS7 2489 +#define NOTE_E7 2637 +#define NOTE_F7 2794 +#define NOTE_FS7 2960 +#define NOTE_G7 3136 +#define NOTE_GS7 3322 +#define NOTE_A7 3520 +#define NOTE_AS7 3729 +#define NOTE_B7 3951 +#define NOTE_C8 4186 +#define NOTE_CS8 4435 +#define NOTE_D8 4699 +#define NOTE_DS8 4978 + + diff --git a/piezo/piezo_mario_tune/piezo_mario_tune.ino b/piezo/piezo_4_mario_tune/piezo_4_mario_tune.ino similarity index 100% rename from piezo/piezo_mario_tune/piezo_mario_tune.ino rename to piezo/piezo_4_mario_tune/piezo_4_mario_tune.ino diff --git a/piezo/piezo_4_mario_tune/pitches.h b/piezo/piezo_4_mario_tune/pitches.h new file mode 100644 index 0000000..55c7d54 --- /dev/null +++ b/piezo/piezo_4_mario_tune/pitches.h @@ -0,0 +1,95 @@ +/************************************************* + * Public Constants + *************************************************/ + +#define NOTE_B0 31 +#define NOTE_C1 33 +#define NOTE_CS1 35 +#define NOTE_D1 37 +#define NOTE_DS1 39 +#define NOTE_E1 41 +#define NOTE_F1 44 +#define NOTE_FS1 46 +#define NOTE_G1 49 +#define NOTE_GS1 52 +#define NOTE_A1 55 +#define NOTE_AS1 58 +#define NOTE_B1 62 +#define NOTE_C2 65 +#define NOTE_CS2 69 +#define NOTE_D2 73 +#define NOTE_DS2 78 +#define NOTE_E2 82 +#define NOTE_F2 87 +#define NOTE_FS2 93 +#define NOTE_G2 98 +#define NOTE_GS2 104 +#define NOTE_A2 110 +#define NOTE_AS2 117 +#define NOTE_B2 123 +#define NOTE_C3 131 +#define NOTE_CS3 139 +#define NOTE_D3 147 +#define NOTE_DS3 156 +#define NOTE_E3 165 +#define NOTE_F3 175 +#define NOTE_FS3 185 +#define NOTE_G3 196 +#define NOTE_GS3 208 +#define NOTE_A3 220 +#define NOTE_AS3 233 +#define NOTE_B3 247 +#define NOTE_C4 262 +#define NOTE_CS4 277 +#define NOTE_D4 294 +#define NOTE_DS4 311 +#define NOTE_E4 330 +#define NOTE_F4 349 +#define NOTE_FS4 370 +#define NOTE_G4 392 +#define NOTE_GS4 415 +#define NOTE_A4 440 +#define NOTE_AS4 466 +#define NOTE_B4 494 +#define NOTE_C5 523 +#define NOTE_CS5 554 +#define NOTE_D5 587 +#define NOTE_DS5 622 +#define NOTE_E5 659 +#define NOTE_F5 698 +#define NOTE_FS5 740 +#define NOTE_G5 784 +#define NOTE_GS5 831 +#define NOTE_A5 880 +#define NOTE_AS5 932 +#define NOTE_B5 988 +#define NOTE_C6 1047 +#define NOTE_CS6 1109 +#define NOTE_D6 1175 +#define NOTE_DS6 1245 +#define NOTE_E6 1319 +#define NOTE_F6 1397 +#define NOTE_FS6 1480 +#define NOTE_G6 1568 +#define NOTE_GS6 1661 +#define NOTE_A6 1760 +#define NOTE_AS6 1865 +#define NOTE_B6 1976 +#define NOTE_C7 2093 +#define NOTE_CS7 2217 +#define NOTE_D7 2349 +#define NOTE_DS7 2489 +#define NOTE_E7 2637 +#define NOTE_F7 2794 +#define NOTE_FS7 2960 +#define NOTE_G7 3136 +#define NOTE_GS7 3322 +#define NOTE_A7 3520 +#define NOTE_AS7 3729 +#define NOTE_B7 3951 +#define NOTE_C8 4186 +#define NOTE_CS8 4435 +#define NOTE_D8 4699 +#define NOTE_DS8 4978 + + -- 2.39.2