Please,

I use the following script to play abc:

###########################################################################

use strict;
use File::Basename;

my $filename = shift;
my $volume   = shift;
  $volume++;
my $repeats  = shift;
my $midi_file= "/tmp/".basename($filename);
my $au_file  = "/tmp/".basename($filename).".au";

print "midi = $midi_file\n";
print "au_file = $au_file\n";
print "volume = $volume, repeats = $repeats\n";

if (-e $filename) {
 system("abc2midi $filename -o $midi_file 1> /dev/null 2> /dev/null");
}

system("timidity -L /usr/share/timidity -Ou -o$au_file $midi_file > /tmp/timidity 2> /dev/null");
system("chmod 777 $au_file"); # so they can be erased by anyone later


for (my $c = 0; $c <= $repeats; $c++ ) {
     system("play -v $volume $au_file ");
}

###########################################################################

It works fine, but insists on repeating a wee snatch of the last part of the tune when it has finished.

If I try:

play -v 1 /tmp/my_audio_file.au

it does exactly the same thing.

If I try:

play -v 1 some_downloaded_audio_file.au

everything is fine and it has no spurious repeats.

Any hints ?

Thanks.

Joe Mc Cool


To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

Reply via email to