d.adler@posteo.de:

On 21.05.2017 14:14, Kjetil Matheussen wrote:
...
>
> By using jack_capture instead of ecasound, this should be enough:
>
> jack_capture --jack-transport
> jack-smf-player -n foo.mid &
> sleep 5
> echo locate 0 | jack_transport
> echo play | jack_transport

I also had jack_capture in mind first, it always stopped though whenever
a sleep command finished that had been issued after it.  Thus, being
lazy, I used something else instead of investigating this.
It turns out that jack_capture's --no-stdin option does the magic.


That's interesting. Maybe it has something to do with the piping.

Another alternative would be to open
jack_capture in a new terminal. Then you also
avoid cluttering the terminal with text output
from both jack_capture and jack-smf-player:

xterm -e jack_capture --jack-transport &
jack-smf-player -n foo.mid &
sleep 5
echo locate 0 | jack_transport
echo play | jack_transport