The new function capi:stop-sound stops a sound from playing. You could use this to interrupt playing a MIDI file.
capi:stop-sound