Error code in program of MIDI trigger

Hello,
Noob here.
I'm getting a error while programming for triggering a MIDI note to a electric piano.
"error: 'noteOn' was not declared in this scope"

There are several of these.
so I compared the other noteOn scripts.
It seems to be the same except for changing the note.

Any ideas where to start looking.

Thank You,
CVH

error: 'noteOn' was not declared in this scope"

That means you have not declared the noteOn function.

However I assume that you think you have so post your code ( in code tags please ) and we will see if we can spot what you have done wrong.

Chobbs:
Hello,
Noob here.
I’m getting a error while programming for triggering a MIDI note to a electric piano.
“error: ‘noteOn’ was not declared in this scope”

There are several of these.
so I compared the other noteOn scripts.
It seems to be the same except for changing the note.

Any ideas where to start looking.

Thank You,
CVH

Using this code…
Errors are here
517:27: error:
526:27: error:

Also, Code offered from gist:7398948 · GitHub

digitalWrite(LaserPin, LOW);

digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(delaymotor);

digitalWrite(LaserPin, HIGH); //This is beam 6
delay(delaylaser);

if( (analogRead(0) > sensor ) && (f == 0) )

{

digitalWrite(13, HIGH);
noteOn(0x90, note6, 0x7F);
f++;
}

else if(analogRead(0) < sensor )

{
digitalWrite(13, LOW);
noteOn(0x90, note6, 0x00);
f = 0;
}

digitalWrite(LaserPin, LOW);

digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, HIGH);
delay(delaymotor);

digitalWrite(LaserPin, HIGH); //This is beam 5
delay(delaylaser);

if( (analogRead(0) > sensor ) && (e == 0) )

{
digitalWrite(13, HIGH);
noteOn(0x90, note5, 0x7F);
e++;
}

else if(analogRead(0) < sensor )

{
digitalWrite(13, LOW);
noteOn(0x90, note5, 0x00);
e = 0;
}

digitalWrite(LaserPin, LOW);

digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, HIGH);
digitalWrite(motorPin4, LOW);
delay(delaymotor);

digitalWrite(LaserPin, HIGH); //This is beam 4
delay(delaylaser);

if( (analogRead(0) > sensor ) && (d == 0) )

{
digitalWrite(13, HIGH);
noteOn(0x90, note4, 0x7F);
d++;
}

else if(analogRead(0) < sensor )

{
digitalWrite(13, LOW);
noteOn(0x90, note4, 0x00);
d = 0;
}

digitalWrite(LaserPin, LOW);

digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(delaymotor);

digitalWrite(LaserPin, HIGH); //This is beam 3
delay(delaylaser);

if( (analogRead(0) > sensor ) && (c == 0) )
{
digitalWrite(13, HIGH);
noteOn(0x90, note3, 0x7F);
c++;
}

else if(analogRead(0) < sensor )

{
digitalWrite(13, LOW);
noteOn(0x90, note3, 0x00);
c = 0;
}

digitalWrite(LaserPin, LOW);

digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(delaymotor);

digitalWrite(LaserPin, HIGH); //This is beam 2
delay(delaylaser);

if( (analogRead(0) > sensor ) && (b == 0) )

{
digitalWrite(13, HIGH);
“517:27: error:” noteOn(0x90, note2, 0x7F);
b++;
}

else if(analogRead(0) < sensor )

{
digitalWrite(13, LOW);
“526:27: error:” noteOn(0x90, note2, 0x00);
b = 0;
}

digitalWrite(LaserPin, LOW);

digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, HIGH);
delay(delaymotor);
}

// Back to top.

Hey I did say:-

Grumpy_Mike:
( in code tags please )

Why are you ignoring me? Please read How to use this forum

And why have you not posted ALL the code.

We don't like going off site for the code.

I don't see anywhere you define the noteOn function so you will get an error message.

Chobbs:
Any ideas where to start looking.

Yes. That isn't a complete program. You can tell because there's no setup() and no loop(). If you find the rest of the program it might compile.

Steve