Midi controller, LED status with push buttons

Hello, I have built a midi controller set up like this

it has modes of record, play and also overdub. I plan to use it in ableton live with mobius. The circuit I have built has a led to show if the pedal is in record mode or play mode

Record mode HIGH
play mode LOW

my code at the moment is: Dropbox - File Deleted

I want a led above track 1, 2, 3 and 4 to show the status of each track, I'm using common cathode 4 leg leds (without wiring the blue as I don't need it)

So I need the led to light up green when the track is playing and light up red when recording and possibly light up red also when overdubbing. each pedal is sending a midi note when pressed. I don't know if this is possible or not? it just gets complicated trying to keep track at what state the controller is at and also each track

any help would be great because I don't know where to even start with this. Here are the notes for each button. first notes on and off are in play mode and the second notes on and off are in record mode

Record Button

Midi Monitor Message

00:00:35.357 From Scarlett 18i8 USB Note On 1 E-1 69
00:00:35.537 From Scarlett 18i8 USB Note Off 1 E-1 0

Mobius 2 Midi Control Script

Target Triger
PLAY MODE REC-PLAY (16) 1:E -1

Stop Button

Midi Monitor Message

00:13:34.313 From Scarlett 18i8 USB Note On 1 G-2 69
00:13:34.372 From Scarlett 18i8 USB Note Off 1 G-2 0

Mobius 2 Midi Control Script

Target Triger
PLAY MODE STOP (7) 1:G -2

Undo Button

Midi Monitor Message

00:29:08.264 From Scarlett 18i8 USB Note On 1 F3 1
00:29:08.431 From Scarlett 18i8 USB Note Off 1 F3 0

Mobius 2 Midi Control Script

Target Triger
Function:Undo 1:F 3

Mode Button

Midi Monitor Message

00:50:54.124 From Scarlett 18i8 USB Note On 1 B-1 1
00:50:54.217 From Scarlett 18i8 USB Note Off 1 B-1 0
00:50:55.499 From Scarlett 18i8 USB Note On 1 C2 1
00:50:55.593 From Scarlett 18i8 USB Note Off 1 C2 0

Mobius 2 Midi Control Script

Target Triger
PLAY MODE MODE (23) 1:B-1
RECORD MODE MODE (48) 1:C 2

Clear Button

Midi Monitor Message

00:56:13.702 From Scarlett 18i8 USB Note On 1 C♯-2 69
00:56:13.813 From Scarlett 18i8 USB Note Off 1 C♯-2 0

Mobius 2 Midi Control Script

Target Triger
Function:Clear 1:C#-2

Track 1 Button

Midi Monitor Message

12:09:32.491 From Scarlett 18i8 USB Note On 1 G♯-1 1
12:09:32.716 From Scarlett 18i8 USB Note Off 1 G♯-1 0
12:41:54.328 From Scarlett 18i8 USB Note On 1 D♯2 1
12:41:54.422 From Scarlett 18i8 USB Note Off 1 D♯2 0

Mobius 2 Midi Control Script

Target Triger
PLAY MODE TRACK1 (20) 1:G#-1
RECORD MODE TRACK1 (51) 1:D#2

Track 2 Button

Midi Monitor Message

12:39:18.785 From Scarlett 18i8 USB Note On 1 A-1 1
12:39:18.873 From Scarlett 18i8 USB Note Off 1 A-1 0
12:42:20.222 From Scarlett 18i8 USB Note On 1 D2 1
12:42:20.344 From Scarlett 18i8 USB Note Off 1 D2 0

Mobius 2 Midi Control Script

Target Triger
PLAY MODE TRACK2 (21) 1:A -1
RECORD MODE TRACK2 (50) 1:D 2

Track 3 Button

Midi Monitor Message

12:39:37.325 From Scarlett 18i8 USB Note On 1 A♯-1 1
12:39:37.377 From Scarlett 18i8 USB Note Off 1 A♯-1 0
12:42:37.913 From Scarlett 18i8 USB Note On 1 C♯2 1
12:42:38.053 From Scarlett 18i8 USB Note Off 1 C♯2 0

Mobius 2 Midi Control Script

Target Triger
PLAY MODE TRACK3 (22) 1:A# -1
RECORD MODE TRACK3 (49) 1:C#2

Sorry forgot to add the fourth button notes and command

came across this I think it's on the same lines as what I need
https://forum.arduino.cc/index.php?topic=360607.15

I don't know if this is possible or not?

Yes it is.

There has been a few such projects, this is one of them Recording Lights are looking for advice || help - Audio - Arduino Forum

This is the code from the link, is this what I need?

byte incomingByte;
byte noteByte;
byte velocityByte;
byte noteOn=0x90;

void setup(){
Serial.begin(38400);
pinMode(12,OUTPUT);
}

void loop()
{
if(Serial.available () > 2){
incomingByte = Serial.read();
noteByte = Serial.read();
velocityByte = Serial.read();
if (incomingByte == noteOn & noteByte == 95 & velocityByte ==127){
digitalWrite(12,HIGH);
}
else if (incomingByte == noteOn & noteByte == 93 & velocityByte ==127){
digitalWrite(12,LOW);
}
}
}

is this what I need?

No. Read that code, you need to change what it responds to, into what your system sends.

any help would be great because I don't know where to even start with this.

This is help, it is where to start, like you asked for.
If you want someone to write the code for you then post in the Gigs and Collaboration section and say what you are prepared to pay.