[LAU] Simple loop playing from command line

david gnome at hawaii.rr.com
Tue Jan 11 08:53:10 UTC 2011


Ken Restivo wrote:
> I'm trying to figure out a way to play a simple loop from the command line. It doesn't need to be synchronized with anything (our drummer will be talking over it).
> 
> I found this archive:
> 
>  http://comments.gmane.org/gmane.comp.audio.ecasound.general/3843
> 
>  But there seems to be no "audioloop" in ecasound (I have  2.4.6.1-2 ).
> 
> The man page I have on my system mentions "-tl", so I tried that, and it zombified jack (not good).
> 
> Here is what I tried;
> 
> $ ecasound -f:f32_le,2,48000 -t:3600 -a:1 -i:audioloop,johnloop48.wav  -a:all -o jack_auto
>  does nothing, just tells me three tims that it is using realtime-scheduling:
>  - [ Engine init - Driver start ] 
> (eca-engine) Using realtime-scheduling (SCHED_FIFO:50).
> (eca-engine) Using realtime-scheduling (SCHED_FIFO:50).
> (eca-engine) Using realtime-scheduling (SCHED_FIFO:50).
> 
> Hmm. Goole says try "notransport". So I do.
> 
> $  ecasound -f:f32_le,2,48000 -G:jack,ecasound,notransport -tl -a:1 -i:audioloop,johnloop48.wav  -a:all -o jack_auto
> 	does nothing, just goes:
> 	- [ Engine init - Driver start ] 
> (eca-engine) Using realtime-scheduling (SCHED_FIFO:50).
> and then hangs, but at least that tells me only once that it's realtime-scheduling
> 
> OK, how about doing what the docs say?
> 
> $ ecasound -f:f32_le,2,48000 -G:jack,ecasound,notransport -tl -a:1 -i:johnloop48.wav  -a:all -o jack_auto
>   plays the loop once, then zombifies
>   (eca-engine) Using realtime-scheduling (SCHED_FIFO:50).
> zombified - calling shutdown handler
> (eca-engine) WARNING: Engine has raised an error! Possible causes: connection 
> ... lost to system services, unable to adapt to changes in operating environment, etc.
> - [ Controller/Batch processing finished (-3) ] --------------------------------
> ecasound: Warning! Errors detected during processing.
> (eca-control-objects) Disconnecting chainsetup: "command-line-setup".
> 
> At least I got sound out of it though.
> 
> Are there any other command-line tools I could use to loop a wav file, possibly simpler and less weird than ecasound?

mplayer -loop 0 filename.wav

0 says to loop forever. Use some other number to loop how many times you 
want, then have it stop.

The mplayer I have here (stock Debian Lenny) supports using JACK.

-- 
David
gnome at hawaii.rr.com
authenticity, honesty, community


More information about the Linux-audio-user mailing list