Github says midi start/stop was added a couple months ago. Are you updated to the most recent version?
EDIT - although looking at the code, I don’t see actual midi start/stop anywhere - just clock start/stop
Clock should be sent if you have the params CLOCK section set to midi. Start/Stop may NOT be being sent tho… so something like this would be needed in the foulplay script:
(totally untested code)
m.event = function(data)
local d = midi.to_msg(data)
if d.type == "start" then
if stopped then
clock.transport.start()
end
elseif d.type == "continue" then
if not stopped then
clock.transport.stop()
else
clock.transport.start()
end
end
if d.type == "stop" then
clock.transport.stop()
end
end