apuntes_Arduino/buzzer/graduacion/graduacion.ino

166 lines
3.8 KiB
Arduino
Raw Normal View History

2021-01-05 00:15:16 -03:00
// Credit:
// Midi to Arduino Converter
// - Andy Tran (extramaster), 2015
// https://www.extramaster.net/tools/midiToArduino/
//
// Process:
// Midi -> Midi tracks -> Note mappings -> Frequency
//
// CC0
// Set this to be the pin that your buzzer resides in. (Note that you can only have one buzzer actively using the PWM signal at a time).
int tonePin = 11;
void setup() {
}
void midi() {
tone(tonePin, 466, 450.0);
delay(500.0);
tone(tonePin, 466, 450.0);
delay(500.0);
tone(tonePin, 440, 225.0);
delay(250.0);
tone(tonePin, 466, 225.0);
delay(250.0);
tone(tonePin, 523, 376.171875);
delay(417.96875);
delay(82.03125);
tone(tonePin, 391, 900.0);
delay(1000.0);
tone(tonePin, 349, 826.171875);
delay(917.96875);
delay(82.03125);
tone(tonePin, 311, 450.0);
delay(500.0);
tone(tonePin, 311, 450.0);
delay(500.0);
tone(tonePin, 293, 225.0);
delay(250.0);
tone(tonePin, 311, 225.0);
delay(250.0);
tone(tonePin, 349, 376.171875);
delay(417.96875);
delay(82.03125);
tone(tonePin, 261, 1800.0);
delay(2000.0);
tone(tonePin, 293, 900.0);
delay(1000.0);
tone(tonePin, 329, 225.0);
delay(250.0);
tone(tonePin, 349, 450.0);
delay(500.0);
tone(tonePin, 391, 179.296875);
delay(199.21875);
delay(50.78125);
tone(tonePin, 523, 900.0);
delay(1000.0);
tone(tonePin, 349, 900.0);
delay(1000.0);
tone(tonePin, 466, 450.0);
delay(500.0);
tone(tonePin, 466, 450.0);
delay(500.0);
tone(tonePin, 466, 225.0);
delay(250.0);
tone(tonePin, 440, 450.0);
delay(500.0);
tone(tonePin, 391, 179.296875);
delay(199.21875);
delay(50.78125);
tone(tonePin, 349, 1575.0);
delay(1750.0);
delay(250.0);
tone(tonePin, 466, 450.0);
delay(500.0);
tone(tonePin, 466, 450.0);
delay(500.0);
tone(tonePin, 440, 225.0);
delay(250.0);
tone(tonePin, 466, 225.0);
delay(250.0);
tone(tonePin, 523, 376.171875);
delay(417.96875);
delay(82.03125);
tone(tonePin, 391, 900.0);
delay(1000.0);
tone(tonePin, 349, 900.0);
delay(1000.0);
tone(tonePin, 311, 450.0);
delay(500.0);
tone(tonePin, 311, 450.0);
delay(500.0);
tone(tonePin, 293, 225.0);
delay(250.0);
tone(tonePin, 311, 225.0);
delay(250.0);
tone(tonePin, 349, 376.171875);
delay(417.96875);
delay(82.03125);
tone(tonePin, 261, 1800.0);
delay(2000.0);
tone(tonePin, 293, 900.0);
delay(1000.0);
tone(tonePin, 329, 225.0);
delay(250.0);
tone(tonePin, 349, 450.0);
delay(500.0);
tone(tonePin, 391, 179.296875);
delay(199.21875);
delay(50.78125);
tone(tonePin, 523, 900.0);
delay(1000.0);
tone(tonePin, 349, 900.0);
delay(1000.0);
tone(tonePin, 622, 450.0);
delay(500.0);
tone(tonePin, 622, 450.0);
delay(500.0);
tone(tonePin, 622, 225.0);
delay(250.0);
tone(tonePin, 587, 450.0);
delay(500.0);
tone(tonePin, 523, 179.296875);
delay(199.21875);
delay(50.78125);
tone(tonePin, 587, 1800.0);
delay(2000.0);
tone(tonePin, 391, 675.0);
delay(750.0);
tone(tonePin, 391, 225.0);
delay(250.0);
tone(tonePin, 440, 225.0);
delay(250.0);
tone(tonePin, 466, 450.0);
delay(500.0);
tone(tonePin, 523, 179.296875);
delay(199.21875);
delay(50.78125);
tone(tonePin, 349, 900.0);
delay(1000.0);
tone(tonePin, 466, 900.0);
delay(1000.0);
tone(tonePin, 466, 900.0);
delay(1000.0);
tone(tonePin, 466, 900.0);
delay(1000.0);
tone(tonePin, 622, 450.0);
delay(500.0);
tone(tonePin, 587, 900.0);
delay(1000.0);
tone(tonePin, 523, 450.0);
delay(500.0);
tone(tonePin, 466, 1800.0);
delay(2000.0);
}
void loop() {
// Play midi
midi();
}