[Abcde-users] Error in do_batch_gain from version 2.7.1

Alan W. Kerr awkerr at aoc.nrao.edu
Thu Feb 11 20:43:25 GMT 2016


I was trying to figure out if I would prefer "normalize" or "replaygain" 
for my MP3 files.  So I was looking at how each worked, what were the 
default switches for for the various programs that each uses, what were 
the other optional switches, etc, etc, etc...  Then I found multiple 
problems with do_batch_gain...

First: *NOTHING* calls do_batch_gain!!!  So what is *supposed* to
        call it???
Second: the header lines says that the variable used are:
         MP3GAIN, MP3GAINOPTS, VORBISGAIN, VORBISGAINOPTS, MPCGAIN
         but *NONE* of these are used in do_batch_gain.
Third: do_batch_gain uses NORMALIZE and NORMALIZEOPTS.  It *looks*
        like it was supposed to be a parallel function to
        do_batch_normalize.  However, the header, variables, etc,
        were not changed.

So what is supposed to call do_batch_gain???
What editing was supposed to have been done to do_batch_gain?


Alan W. Kerr          awkerr at aoc.nrao.edu          Whee!(tm)


=====
in version 2.7.1, starting at line 1454
here is do_batch_gain and do_batch_normalize
=====

# do_batch_gain
# variables used:
# MP3GAIN, MP3GAINOPTS, VORBISGAIN, VORBISGAINOPTS, MPCGAIN
# FIXME #
do_batch_gain ()
{
	# The commands here don't go through run_command because they're never 
supposed to be silenced
	echo "Batch analizing gain in tracks: $TRACKQUEUE"
	(
	cd "$ABCDETEMPDIR"
	BLURB=
	TRACKFILES=
	for UTRACKNUM in $TRACKQUEUE
	do
		MP3FILES="$TRACKFILES track$UTRACKNUM.mp3"
	done
	# FIXME # Hard-coded batch option!
	$NORMALIZER -b $NORMALIZEROPTS $TRACKFILES
	RETURN=$?
	if [ "$RETURN" != "0" ]; then
		echo "batch-normalize: $NORMALIZER returned code $RETURN" >> errors
	else
		for UTRACKNUM in $TRACKQUEUE
		do
			echo normalizetrack-$UTRACKNUM >> status
		done
	fi
	)
}

# do_batch_normalize
# variables used:
# NORMALIZER, NORMALIZEROPTS
do_batch_normalize ()
{
	# The commands here don't go through run_command because they're never 
supposed to be silenced
	echo "Batch normalizing tracks: $TRACKQUEUE"
	(
	cd "$ABCDETEMPDIR"
	BLURB=
	TRACKFILES=
	for UTRACKNUM in $TRACKQUEUE
	do
		TRACKFILES="$TRACKFILES track$UTRACKNUM.wav"
	done
	# XXX: Hard-coded batch option!
	$NORMALIZER -b $NORMALIZEROPTS $TRACKFILES
	RETURN=$?
	if [ "$RETURN" != "0" ]; then
		echo "batch-normalize: $NORMALIZER returned code $RETURN" >> errors
	else
		for UTRACKNUM in $TRACKQUEUE
		do
			echo normalizetrack-$UTRACKNUM >> status
		done
	fi
	)
}




More information about the Abcde-users mailing list