a function-definition is not allowed here before '{' token

Despite my greatest efforts I have no idea why my code does not work. I believe it had to do with a single line of code that I accidentally deleted in recreating the code. My research has told me that the error message that I am receiving is either because there's a bracket missing or the code is too bad to work with. That's literally it: Most posts would tell someone to rewrite the whole damn thing and hope that fixes it. I checked all brackets and they were in order. Being provided with a reason as to why this error message would show up is what I am looking for.Any help you beautiful people would be willing to give is much appreciated.

int speakerPin = 2; //Speaker digital pin number
int buttonPin = 7; //Button digital pin number
int freq = 25; //Minimum frequency value
int freqMax = 25000; //Maximum frequency value
int val; //Variable for determining pushbutton status
int counter = 0; //Sets counter to determine when the void loop will cut out
int ledDigitalOne[] = {9, 10, 11}; //The three digital pins of the digital LED
int length = 15; // the number of notes
char notes[] = "Cbagfedcba "; // a space represents a rest
int beats[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
int tempo = 1;

const byte RED[] = {0, 255, 255}; //Because of direction of current,
const byte GREEN[] = {255, 255, 0}; //RGB values are opposite their
const byte YELLOW[] = {0, 255, 0}; //usual identities (i.e., white has an
const byte WHITE[] = {0, 0, 0}; //RGB code that should produce black)
const byte BLACK[] = {255, 255, 255}; //RGB code that should produce black)

void setColor(int* led, byte* color){ //Function that sets LED color values to
for(int i = 0; i < 3; i++){ //the values previously described
digitalWrite(led_, color*);_
_
}_
_
}_
_void setColor(int led, const byte* color){ //Function that outputs the LED color //and therefore lights the LED up_

* byte tempByte[] = {color[0], color[1], color[2]};*
* setColor(led, tempByte);*
* }*
void playTone (int tone, int duration){
_ for (long i = 0; i < duration * 1000L; i += tone * 2){_
* digitalWrite(speakerPin, HIGH);*
* delayMicroseconds(tone);*
* digitalWrite(speakerPin, LOW);*
* delayMicroseconds(tone);*
}
}
void playNote(char note, int duration) {
* char names[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C' };*
* int tones[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };*

* // play the tone corresponding to the note name*
* for (int i = 0; i < 8; i++) {*
_ if (names == note) {
playTone(tones*, duration);
}
}
}
void setup() {
Serial.begin(9600); //Allows the serial monitor to print to the screen*

* pinMode(speakerPin,OUTPUT); //Sets up digital pin 2 as the Piezo piece output*
* pinMode(buttonPin, INPUT ); //Sets up digital pin 7 as the button piece output*_

* for(int i = 0; i < 3; i++){*
_ pinMode(ledDigitalOne*, OUTPUT); //Set the three LED pins as outputs*
}_

void loop() {

* freq += 100; // add 100 to freq*
* if (freq > freqMax)*
* {*
* noTone(speakerPin);*
* freq = 25;*

* }*
* tone(speakerPin, freq);*
* delay(75);*
* val = digitalRead(buttonPin);*
if (val == HIGH){
* setColor(ledDigitalOne, BLACK);*
}else if (val == LOW && freq >= 13000 && freq <16000) {
* setColor(ledDigitalOne, RED);*
* counter++;*
}else if (val == LOW && freq >= 16000 && freq <19000) {
* setColor(ledDigitalOne, YELLOW);*
* counter++;*
}else if (val == LOW && freq >= 19000 && freq <22000) {
* setColor(ledDigitalOne, GREEN);*
* counter++;*
}else if (val == LOW && freq >= 22000) {
* setColor(ledDigitalOne, WHITE);*
* counter++;*
* }*
}

Maybe your code doesn't because of all the italics

My research has told me that the error message that I am receiving is either because there's a bracket missing or the code is too bad to work with

The error message you couldn't be bothered to tell us about?

Count your braces in setup.