Start sequens from MIDI input signal

I like to start the Sonic Pi with ”RUN” and then the script is waiting for the MIDI in signal
/midi:craft_rhythm_craft_rhythm_midi_1_24_0/start

And then the script is starting and will ”RUN” to the the MIDI in signal
/midi:craft_rhythm_craft_rhythm_midi_1_24_0/stop

Then the script is ”STOP”
Is there a solution for this?