Using MIDI with LDRs


I am currently working on a project using LDRs/photoresistors to create a MIDI instrument. The data is coming out of Arduino and in to Reaper through the Serial to MIDI converter. It is activating, however it is just constantly replaying the note instead of sustaining it. All it's really doing now is saying if the LDR value is under 30, play a note.

Is there any way we can make it sustain each note rather than it doing that? We have come to a bit of a standstill because of it.