0% found this document useful (0 votes)
99 views10 pages

Tsubasa Wo Kudasai Arduino Code

This document contains code to play the song "Tsubasa Wo Kudasai (Give Me Wings)" on an Arduino Uno board. It defines note frequencies and durations, and then uses the tone() and delay() functions to play the song's intro, two verses and chorus. The code defines notes for the song melody and uses pin 12 on the Arduino to generate the tones with precise durations matching the song structure and rhythm.

Uploaded by

api-372297110
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views10 pages

Tsubasa Wo Kudasai Arduino Code

This document contains code to play the song "Tsubasa Wo Kudasai (Give Me Wings)" on an Arduino Uno board. It defines note frequencies and durations, and then uses the tone() and delay() functions to play the song's intro, two verses and chorus. The code defines notes for the song melody and uses pin 12 on the Arduino to generate the tones with precise durations matching the song structure and rhythm.

Uploaded by

api-372297110
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

/*Tsubasa Wo Kudasai (Give Me Wings)

Performed by Megumi Hayashibara


From Evangelion 2.0 (2011)*/

void setup() {

//defining note tones in hertz


double g4 = 392.00;
double a4 = 440.00;
double b4 = 493.88;
double c5 = 523.25;
double d5 = 587.33;
double e5 = 659.26;
double f5 = 698.46;
double fSharp5 = 739.99;
double g5 = 783.99;
double a5 = 880.00;
double b5 = 987.77;
double c6 = 1046.50;
double d6 = 1174.66;
double e6 = 1318.51;
double f6 = 1396.91;

// defining tone lengths in milliseconds


int dottedWhole = 4500;
int wholeNote = 3000;
int dottedDottedHalf = 2625;
int dottedHalf = 2250;
int eighthHalf = 1875;
int halfNote = 1500;
int dottedQuarter = 1125;
double quarterSixteenth = 937.5;
int quarterNote = 750;
int eighthNote = 375;
int triplet = 250;
double sixteenthNote = 187.5;

//defining pin on Arduino Uno


int pin = 12;

// intro
tone(pin, e5);
delay(quarterNote);
noTone(pin);

tone(pin, g4);
delay(sixteenthNote);
noTone(pin);

tone(pin,c5);
delay(eighthNote);
noTone(pin);

tone(pin,e5);
delay(sixteenthNote);
noTone(pin);

tone(pin,f5);
delay(eighthNote);
noTone(pin);

tone(pin,e5);
delay(eighthNote);
noTone(pin);

tone(pin,d5);
delay(eighthNote);
noTone(pin);

tone(pin,e5);
delay(eighthNote);
noTone(pin);

tone(pin,d5);
delay(quarterNote);
noTone(pin);

tone(pin,c5);
delay(quarterNote);
noTone(pin);

tone(pin,g4);
delay(quarterNote);
noTone(pin);

tone(pin,g4);
delay(quarterNote);
noTone(pin);

tone(pin,f5);
delay(quarterNote);
noTone(pin);

tone(pin,a4);
delay(sixteenthNote);
noTone(pin);

tone(pin,c5);
delay(eighthNote);
noTone(pin);

tone(pin,f5);
delay(sixteenthNote);
noTone(pin);

tone(pin,g5);
delay(eighthNote);
noTone(pin);

tone(pin,f5);
delay(eighthNote);
noTone(pin);

tone(pin,e5);
delay(eighthNote);
noTone(pin);

tone(pin,d5);
delay(eighthNote);
noTone(pin);

tone(pin,c5);
delay(halfNote);
noTone(pin);

tone(pin,b4);
delay(halfNote);
noTone(pin);

// verse 1

tone(pin,e5);
delay(eighthNote);
noTone(pin);

tone(pin,g5);
delay(eighthHalf);
noTone(pin);

tone(pin,a5);
delay(triplet);
noTone(pin);
tone(pin,g5);
delay(triplet);
noTone(pin);

tone(pin,fSharp5);
delay(triplet);
noTone(pin);

tone(pin, g5);
delay(dottedDottedHalf);
noTone(pin);

tone(pin,g5);
delay(eighthNote);
noTone(pin);

tone(pin,a5);
delay(eighthHalf);
noTone(pin);

tone(pin,a5);
delay(eighthNote);
noTone(pin);

tone(pin,g5);
delay(eighthNote);
noTone(pin);

tone(pin,f5);
delay(eighthNote);
noTone(pin);

tone(pin,g5);
delay(dottedDottedHalf);
noTone(pin);

tone(pin,g5);
delay(eighthNote);
noTone(pin);

tone(pin,fSharp5);
delay(quarterNote);
noTone(pin);

tone(pin,d6);
delay(quarterNote);
noTone(pin);
tone(pin,d6);
delay(dottedQuarter);
noTone(pin);

tone(pin,c6);
delay(eighthNote);
noTone(pin);

tone(pin,g5);
delay(dottedDottedHalf);
noTone(pin);

tone(pin,g5);
delay(eighthNote);
noTone(pin);

tone(pin,fSharp5);
delay(quarterNote);
noTone(pin);

tone(pin,d6);
delay(quarterNote);
noTone(pin);

tone(pin,d6);
delay(dottedQuarter);
noTone(pin);

tone(pin,c6);
delay(eighthNote);
noTone(pin);

tone(pin,c6);
delay(halfNote);
noTone(pin);

tone(pin,b5);
delay(halfNote);
noTone(pin);

//verse 2

tone(pin,e5);
delay(eighthNote);
noTone(pin);

tone(pin,g5);
delay(eighthHalf);
noTone(pin);

tone(pin,a5);
delay(triplet);
noTone(pin);

tone(pin,g5);
delay(triplet);
noTone(pin);

tone(pin,fSharp5);
delay(triplet);
noTone(pin);

tone(pin, g5);
delay(dottedDottedHalf);
noTone(pin);

tone(pin,g5);
delay(eighthNote);
noTone(pin);

tone(pin,a5);
delay(eighthHalf);
noTone(pin);

tone(pin,a5);
delay(eighthNote);
noTone(pin);

tone(pin,g5);
delay(eighthNote);
noTone(pin);

tone(pin,f5);
delay(eighthNote);
noTone(pin);

tone(pin,g5);
delay(dottedDottedHalf);
noTone(pin);

tone(pin,g5);
delay(eighthNote);
noTone(pin);

tone(pin,fSharp5);
delay(quarterNote);
noTone(pin);

tone(pin,d6);
delay(quarterNote);
noTone(pin);

tone(pin,d6);
delay(dottedQuarter);
noTone(pin);

tone(pin,c6);
delay(eighthNote);
noTone(pin);

tone(pin,g5);
delay(dottedDottedHalf);
noTone(pin);

tone(pin,g5);
delay(eighthNote);
noTone(pin);

tone(pin,fSharp5);
delay(quarterNote);
noTone(pin);

tone(pin,d6);
delay(quarterNote);
noTone(pin);

tone(pin,d6);
delay(dottedQuarter);
noTone(pin);

tone(pin,c6);
delay(eighthNote);
noTone(pin);

tone(pin,c6);
delay(wholeNote);
noTone(pin);

// chorus

tone(pin,b5);
delay(dottedHalf);
noTone(pin);
tone(pin,c6);
delay(eighthNote);
noTone(pin);

tone(pin,d6);
delay(eighthNote);
noTone(pin);

tone(pin,e6);
delay(eighthNote);
noTone(pin);

tone(pin,e6);
delay(eighthNote);
noTone(pin);

tone(pin,f6);
delay(sixteenthNote);
noTone(pin);

tone(pin,e6);
delay(eighthNote);
noTone(pin);

tone(pin,d6);
delay(quarterSixteenth);
noTone(pin);

tone(pin,e6);
delay(eighthNote);
noTone(pin);

tone(pin,d6);
delay(eighthNote);
noTone(pin);

tone(pin,c6);
delay(eighthNote);
noTone(pin);

tone(pin,c6);
delay(eighthNote);
noTone(pin);

tone(pin,d6);
delay(sixteenthNote);
noTone(pin);
tone(pin,c6);
delay(eighthNote);
noTone(pin);

tone(pin,b5);
delay(quarterSixteenth);
noTone(pin);

tone(pin,b5);
delay(eighthNote);
noTone(pin);

tone(pin,g5);
delay(eighthNote);
noTone(pin);

tone(pin,a5);
delay(quarterNote);
noTone(pin);

tone(pin,c6);
delay(eighthNote);
noTone(pin);

tone(pin,a5);
delay(eighthNote);
noTone(pin);

tone(pin,g5);
delay(quarterNote);
noTone(pin);

tone(pin,c6);
delay(quarterNote);
noTone(pin);

tone(pin,d6);
delay(dottedHalf);
noTone(pin);

tone(pin,e6);
delay(sixteenthNote);
noTone(pin);

tone(pin,c6);
delay(eighthNote);
noTone(pin);
tone(pin,b5);
delay(sixteenthNote);
noTone(pin);

tone(pin,c6);
delay(dottedWhole);
noTone(pin);
}

void loop() {

// not needed for this song, but required to run the program

You might also like