Uiui. So geht das nicht
Normalerweise mach man das mit array

DIM led (30) as Byte
dim led_nummer as byte

IF midi_note > 29 then
led_nummer = midi_note - 29
led(led_nummer) = midi_lautstarke
end if