You know St. Peter won't call my name, freebsd-questions!
2011/01/03 20:23:38 -0800 Joseph Olatt <j...@eskimo.com> => To Frank Shute :
JO> On Sun, Dec 26, 2010 at 05:09:30PM +0000, Frank Shute wrote:
JO> > 
JO> > I generally play my tracks of an album like so:
JO> > 
JO> > for track in $(cat trombone_shorty-backatown.m3u); do
JO> > mplayer $track
JO> > done
JO> > 
JO> > They then play in the correct order.
JO> > 
JO> > How would I go about randomising the order of play using
JO> > sh (preferably) or perl?

I have several tens of thousands of MIDI files from 90s. They are too many for 
'random play' feature of the Timidity++ which is used with 'eawpats', the GUS 
patches.
Here is my bash script to play them in random order:
===
#!/usr/local/bin/bash
IFS='
'
fns=(`find ~/mid/ -iname '*.mid'`)
while :; do 
        timidity -a -OdS -in -j -t 1251 -E t -p a -R 500 -EFreverb=127 -EFns=4 
${fns[$((${#f...@]}*$random/32767))]}
done
===

Of course I miss the 'Previous track' functionality.

73! Peter pgp: A0E26627 (4A42 6841 2871 5EA7 52AB  12F8 0CE1 4AAC A0E2 6627)
--
http://vereshagin.org
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to