const int buzzerPin = 9; //where the buzzer is pluged in

const int songLength = 1; //how many notes long the song is
const int songLength1 = 7;
const int songLength2 = 6;
const int songLength3 = 4;
const int songLength4 = 6;
const int songLength5 = 7;
const int songLength6 = 5;
const int songLength7 = 6;
const int songLength8 = 5;
const int songLength9 = 8;
const int songLength10 = 3;
const int songLength11 = 6;
const int songLength12 = 3;
const int songLength13 = 5;
const int songLength14 = 3;
const int songLength15 = 8;
const int songLength16 = 14;
const int songLength17 = 1;
const int songLength18 = 1;
const int songLength19 = 1;

// section 0
char notes[] = " "; // notes played (Same for each section)

int beats[] = {1}; //the beat the notes are played at (same for each section)

// section 1
char notes1[] = "fFECDEF"; // a space represents a rest

int beats1[] = {4,4,2,1,1,2,2};

// section 2
char notes2[] = "fDcdha"; // a space represents a rest

int beats2[] = {4,4,8,4,4,2};

// section 3
char notes3[] = "fgah"; // a space represents a rest

int beats3[] = {1,1,2,2};

//section 4
char notes4[] = "aefgaf"; // a space represents a rest

int beats4[] = {2,1,1,2,2,8};
//section 5

char notes5[] = "fFECDEf"; // a space represents a rest

int beats5[] = {4,4,2,1,1,2,2};

//section 6
char notes6[] = "fDcdh"; // a space represents a rest

int beats6[] = {4,4,8,4,4};

//section 7
char notes7[] = "afgaha"; // a space represents a rest

int beats7[] = {2,1,1,2,2,2};

// section 8
char notes8[] = "efgaf"; // a space represents a rest

int beats8[] = {1,1,2,2,3};

//section 9
char notes9[] = "cacacaca"; // a space represents a rest

int beats9[] = {2,1,1,1,1,1,1,1};

//section 10
char notes10[] = "chc"; // a space represents a rest

int beats10[] = {1,1,1};

//section 11
char notes11[] = "hchchc"; // a space represents a rest

int beats11[] = {1,1,1,1,1,1};

//section 12
char notes12[] = "DDD"; // a space represents a rest

int beats12[] = {4,4,3};

//section 13
char notes13[] = "cacac"; // a space represents a rest

int beats13[] = {1,1,1,1,1};

//section 14
char notes14[] = "aca"; // a space represents a rest

int beats14[] = {1,1,1};
//section 15
char notes15[] = "hchchchc"; // a space represents a rest

int beats15[] = {1,1,1,1,1,1,1,1};

//section 16
char notes16[] = "hcDE"; // a space represents a rest

int beats16[] = {2,2,2,2};

//section 17
char notes17[] = "F"; // a space represents a rest

int beats17[] = {8};

//section 18
char notes18[] = " "; // a space represents a rest

int beats18[] = {4};

/* section 19
char notes19[] = " "; // notes played (Same for each section)

int beats19[] = {1}; //the beat the notes are played at (same for each section)

// section 20
char notes20[] = "fFECDEF"; // a space represents a rest

int beats20[] = {4,4,2,1,1,2,2};

// section 21

char notes21[] = "fDcdha"; // a space represents a rest

int beats21[] = {4,4,8,4,4,2};

// section 22
char notes22[] = "fgah"; // a space represents a rest

int beats22[] = {1,1,2,2};

//section 23
char notes23[] = "aefgaf"; // a space represents a rest

int beats23[] = {2,1,1,2,2,8};

// section 24
char notes24[] = " "; // notes played (Same for each section)
int beats24[] = {1}; //the beat the notes are played at (same for each section)

// section 25
char notes25[] = "fFECDEF"; // a space represents a rest

int beats25[] = {4,4,2,1,1,2,2};

// section 26

char notes26[] = "fDcdha"; // a space represents a rest

int beats26[] = {4,4,8,4,4,2};

// section 27
char notes27[] = "fgah"; // a space represents a rest

int beats27[] = {1,1,2,2};

//section 28
char notes28[] = "aefgaf"; // a space represents a rest

int beats28[] = {2,1,1,2,2,8};
//defining variables

// section 29

char notes29[] = " "; // notes played (Same for each section)

int beats29[] = {1}; //the beat the notes are played at (same for each section)

// section 30
char notes30[] = "fFECDEF"; // a space represents a rest
int beats29[] = {1}; //the beat the notes are played at (same for each section)
*/

int i;
int j;
int a;
int b;
int c;
int d;
int e;
int f;
int g;
int h;
int k;
int l;
int m;
int n;
int o;
int p;
int q;
int r;
int s;
int t;
int u;
int v;
/*int w;
int x;
int y;
int z;
int !;
int ?;
int $;
int #;
int ^; */

int tempo = 300; // the tempo of the song
#include <LiquidCrystal.h> // so we can use the Liqud Crysal library
LiquidCrystal lcd(12,11,5,4,3,2); //where the lcd is pluged in?

void setup() // set up function
{
pinMode(buzzerPin, OUTPUT); //says the the pin "buzzerpin" will be giving an output
lcd.begin(16, 2); //says where to start the lcd
lcd.clear(); //clear the lcd screen
lcd.print("Song: Somewhere"); // print this on the screen
lcd.setCursor(0,1);
lcd.print("over the rainbow");
}

void loop() //loop function, repeated over and over
{
lcd.setCursor(0,1); // set the cursor on the lcd ___

int i, duration; // ??????

// section 0
for (i = 0; i < songLength; i++) // step through the song arrays
{
duration = beats[i] * tempo; // length of note/rest in ms

if (notes[i] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes[i]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear(); // clear the screen
lcd.print("Some-where over"); // print this on the screen
lcd.setCursor(0,1);
lcd.print("the rain-bow");
//Same comments for every other section

// section 1

for (j = 0; j < songLength1; j++) // step through the song arrays
{
duration = beats1[j] * tempo; // length of note/rest in ms

if (notes1[j] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes1[j]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("way up high");
lcd.setCursor(0,1);
lcd.print("there's a land");
//section 2

for (a = 0; a < songLength2; a++) // step through the song arrays
{
duration = beats1[a] * tempo; // length of note/rest in ms

if (notes1[a] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes1[a]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}

lcd.clear();
lcd.print("that I heard of");
lcd.setCursor(0,1);
lcd.print(" ");

//section 3

for (b = 0; b < songLength3; b++) // step through the song arrays
{
duration = beats1[b] * tempo; // length of note/rest in ms

if (notes1[b] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes1[b]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("once in a lullaby");
lcd.setCursor(0,1);

// section 4
for (c = 0; c < songLength4; c++) // step through the song arrays
{
duration = beats4[c] * tempo; // length of note/rest in ms

if (notes4[c] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes4[c]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("Some-where over ");
lcd.setCursor(0,1);
lcd.print ("the rain-bow");// section 5
for (d = 0; d < songLength5; d++) // step through the song arrays
{
duration = beats5[d] * tempo; // length of note/rest in ms

if (notes5[d] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes5[d]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("skies are blue");
lcd.setCursor(0,1);
lcd.print("and the");
// section 6
for (e = 0; e < songLength6; e++) // step through the song arrays
{
duration = beats6[e] * tempo; // length of note/rest in ms

if (notes6[e] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes6[e]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("Dreams that you dare to dream");
lcd.setCursor(0,1);
lcd.print("dare to dream");
//section 7
for (f = 0; f < songLength7; f++) // step through the song arrays
{
duration = beats7[f] * tempo; // length of note/rest in ms
if (notes7[f] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes7[f]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("real-ly do come");
lcd.setCursor(0,1);
lcd.print("true");
//section 8
for (g = 0; g < songLength8; g++) // step through the song arrays
{
duration = beats8[g] * tempo; // length of note/rest in ms

if (notes8[g] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes8[g]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("someday ill wish" );
lcd.setCursor(0,1);
lcd.print("up-o; a star");
//section 9
for (h = 0; h < songLength9; h++) // step through the song arrays
{
duration = beats9[h] * tempo; // length of note/rest in ms

if (notes9[h] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes9[h]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("and wake up");
lcd.setCursor(0,1);
lcd.print(" ");
//section 10
for (k = 0; k < songLength10; k++) // step through the song arrays
{
duration = beats10[k] * tempo; // length of note/rest in ms

if (notes10[k] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes10[k]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("where the clouds are far");
lcd.setCursor(0,1);
lcd.print ("are far");
//section 11
for (l = 0; l < songLength11; l++) // step through the song arrays
{
duration = beats11[l] * tempo; // length of note/rest in ms

if (notes11[l] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes11[l]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("be-hind me---");
lcd.setCursor(0,1);
lcd.print(" ");
//section 12
for (m = 0; m < songLength12; m++) // step through the song arrays
{
duration = beats12[m] * tempo; // length of note/rest in ms

if (notes12[m] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes12[m]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("where troubles ");
lcd.setCursor(0,1);
lcd.print("melt");
//section 13
for (n = 0; n < songLength13; n++) // step through the song arrays
{
duration = beats13[n] * tempo; // length of note/rest in ms

if (notes13[n] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes13[n]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("like lem-on drops");
lcd.setCursor(0,1);
lcd.print(" ");
//section 14
for (o = 0; o < songLength14; o++) // step through the song arrays
{
duration = beats14[o] * tempo; // length of note/rest in ms

if (notes14[o] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes14[o]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("a-way a-bove the");
lcd.setCursor(0,1);
lcd.print("chimney tops");
//section 15
for (p = 0; p < songLength15; p++) // step through the song arrays
{
duration = beats15[p] * tempo; // length of note/rest in ms

if (notes15[p] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes15[p]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("thats where");
lcd.setCursor(0,1);
lcd.print("you'll find");
//section 16
for (q = 0; q < songLength16; q++) // step through the song arrays
{
duration = beats16[q] * tempo; // length of note/rest in ms

if (notes16[q] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes16[q]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes
}
lcd.clear();
lcd.print("me---");
lcd.setCursor(0,1);
lcd.print(" ");
//section 17
for (r = 0; r < songLength17; r++) // step through the song arrays
{
duration = beats17[r] * tempo; // length of note/rest in ms

if (notes17[r] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes17[r]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("WOW!");

//section 18
for (s = 0; s < songLength18; s++) // step through the song arrays
{
duration = beats18[s] * tempo; // length of note/rest in ms

if (notes18[s] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes18[s]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("Great Job");

// section 19

/*or (t = 0; t < songLength19; t++) // step through the song arrays
{
duration = beats19[t] * tempo; // length of note/rest in ms

if (notes19[t] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes19[t]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("way up high there's a land");
lcd.setCursor(0,1);
lcd.print("LEXI");
//section 20

for (u = 0; u < songLength20; u++) // step through the song arrays
{
duration = beats20[u] * tempo; // length of note/rest in ms

if (notes20[u] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes20[u]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}

lcd.clear();
lcd.print("that I heard of");
lcd.setCursor(0,1);
lcd.print("LEXI");

//section 21

for (v = 0; v < songLength21; v++) // step through the song arrays
{
duration = beats21[v] * tempo; // length of note/rest in ms

if (notes21[v] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes21[v]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("once in a lullaby");
lcd.setCursor(0,1);
lcd.print("LEXI");
// section 22
for (w = 0; w < songLength22; w++) // step through the song arrays
{
duration = beats22[w] * tempo; // length of note/rest in ms

if (notes22[w] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes22[w]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("Some-where over the rain- bow");
lcd.setCursor(0,1);
lcd.print("LEXI");
// section 23
for (x = 0; x < songLength23; x++) // step through the song arrays
{
duration = beats23[x] * tempo; // length of note/rest in ms

if (notes23[x] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(23[x]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes
}
lcd.clear();
lcd.print("skies are blue and the");
lcd.setCursor(0,1);
lcd.print("LEXI");
// section 24
for (y = 0; y < songLength24; y++) // step through the song arrays
{
duration = beats24[y] * tempo; // length of note/rest in ms

if (notes24[y] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes24[y]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("Dreams that you dare to dream");
lcd.setCursor(0,1);
lcd.print("LEXI");
//section 25
for (z = 0; z < songLength25; z++) // step through the song arrays
{
duration = beats25[z] * tempo; // length of note/rest in ms

if (notes25[z] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes25[z]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("real-ly do come true");
lcd.setCursor(0,1);
lcd.print("LEXI");
//section 26
for (! = 0; ! < songLength26; !++) // step through the song arrays
{
duration = beats26[!] * tempo; // length of note/rest in ms

if (notes26[1] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes26[!]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("someday I'll wish up-on a star");
lcd.setCursor(0,1);
lcd.print("LEXI");
//section 27
for (? = 0; ? < songLength27; ?++) // step through the song arrays
{
duration = beats27[?] * tempo; // length of note/rest in ms

if (notes27[?] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes27[?]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("and wake up");
lcd.setCursor(0,1);
lcd.print("LEXI");
//section 28
for ($ = 0; $ < songLength28; $++) // step through the song arrays
{
duration = beats28[$] * tempo; // length of note/rest in ms

if (notes28[$] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes28[$]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("where the clouds are far");
lcd.setCursor(0,1);
lcd.print("LEXI");
//section 29
for (# = 0; # < songLength29; #++) // step through the song arrays
{
duration = beats29[#] * tempo; // length of note/rest in ms

if (notes29[#] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes11[#]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes

}
lcd.clear();
lcd.print("be-hind me---");
lcd.setCursor(0,1);
lcd.print("LEXI");
//section 30
for (^ = 0; ^ < songLength30; ^++) // step through the song arrays
{
duration = beats30[^] * tempo; // length of note/rest in ms

if (notes30[^] == ' ') // is this a rest?
{
delay(duration); // then pause for a moment
}
else // otherwise, play the note
{
tone(buzzerPin, frequency(notes30[^]), duration);
delay(duration); // wait for tone to finish
}
delay(tempo/10); // brief pause between notes
*/
}
// We only want to play the song once, so we'll pause forever:

// If you'd like your song to play over and over,
// remove the above statement

int frequency(char note) //creates an integer called frequency that is a char note
{

const int numNotes = 12; //?????

char names[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C', 'h', 'F', 'E', 'D' }; //name of notes
int frequencies[] = {262, 294, 330, 349, 392, 440, 494, 523, 466, 698, 659, 587}; // frequency of each note

// section 0
for (i = 0; i < numNotes; i++) //????
{
if (names[i] == note) // ????
{
return(frequencies[i]); // return the frequency of i
}
}

//same comments for each section

//section 1
for (j = 0; j < numNotes; j++)
{
if (names[j] == note)
{
return(frequencies[j]);
}
}

//section 2
for (a = 0; a < numNotes; a++)
{
if (names[a] == note)
{
return(frequencies[a]);
}
}

//section 3
for (b = 0; b < numNotes; b++)
{
if (names[b] == note)
{
return(frequencies[b]);
}
}

//section 4
for (c = 0; c < numNotes; c++)
{
if (names[c] == note)
{
return(frequencies[c]);
}
}

// section 5
for (d = 0; d < numNotes; d++)
{
if (names[d] == note)
{
return(frequencies[d]);
}
}

//section 6
for (e = 0; e < numNotes; e++)
{
if (names[e] == note)
{
return(frequencies[e]);
}
}

//section 7
for (f = 0; f < numNotes; f++)
{
if (names[f] == note)
{
return(frequencies[f]);
}
}

//section 8
for (g = 0; g < numNotes; g++)
{
if (names[g] == note)
{
return(frequencies[g]);
}
}

//section 9
for (h = 0; h < numNotes; h++)
{
if (names[h] == note)
{
return(frequencies[h]);
}
}

// section 10
for (k = 0; k < numNotes; k++)
{
if (names[k] == note)
{
return(frequencies[k]);
}
}

//section 11
for (l = 0; l < numNotes; l++)
{
if (names[l] == note)
{
return(frequencies[l]);
}
}

//section 12
for (m = 0; m < numNotes; m++)
{
if (names[m] == note)
{
return(frequencies[m]);
}
}

//section 13
for (n = 0; n < numNotes; n++)
{
if (names[n] == note)
{
return(frequencies[n]);
}
}

//section 14
for (o = 0; o < numNotes; o++)
{
if (names[o] == note)
{
return(frequencies[o]);
}
}

//section 15
for (p = 0; p < numNotes; p++)
{
if (names[p] == note)
{
return(frequencies[p]);
}
}

//section 16
for (q = 0; q < numNotes; q++)
{
if (names[q] == note)
{
return(frequencies[q]);
}
}

// section 17
for (r = 0; r < numNotes; r++)
{
if (names[r] == note)
{
return(frequencies[r]);
}
}

//section 18
for (s = 0; s < numNotes; s++)
{
if (names[s] == note)
{
return(frequencies[s]);
}
}
// section 19
for (t = 0; t < numNotes; t++) //????
{
if (names[t]== note) // ????
{
return(frequencies[t]); // return the frequency of i
}
}

//same comments for each section

/*//section 20
for (u= 0; u< numNotes; u++)
{
if (names[u]== note)
{
return(frequencies[u]);
}
}

/* // section 5
for (d = 0; d < numNotes; d++)
{
if (names[d] == note)
{
return(frequencies[d]);
}
}

//section 6
for (e = 0; e < numNotes; e++)
{
if (names[e] == note)
{
return(frequencies[e]);
}
}

//section 7
for (f = 0; f < numNotes; f++)
{
if (names[f] == note)
{
return(frequencies[f]);
}
}

//section 8
for (g = 0; g < numNotes; g++)
{
if (names[g] == note)
{
return(frequencies[g]);
}
}

//section 9
for (h = 0; h < numNotes; h++)
{
if (names[h] == note)
{
return(frequencies[h]);
}
}

// section 10
for (k = 0; k < numNotes; k++)
{
if (names[k] == note)
{
return(frequencies[k]);
}
}

//section 11
for (l = 0; l < numNotes; l++)
{
if (names[l] == note)
{
return(frequencies[l]);
}
}*/

return(0); //return the code to the top
}

Sign up to vote on this title
UsefulNot useful