Re: looking for command-line/scriptable mastering software

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22 November 2012 at 9:45, Eric Wong <normalperson@xxxxxxxx> wrote:

> I like using makefiles because I can make small edits to code, and when
> I run "make", it'll only rebuild the part of a project which changed.

Maybe some of the processing issues are those which your Makefile 
will attend to.  So, having a really good Makefile is essential.
I've attached an old Makefile of mine, which I won't call "good".
But, it enabled a lot of semi-automation.  I say "semi" because I
had to tailor a number of magic constants.

G'luck...

--
Kevin

# $Id: Makefile,v 1.27 2004/07/01 00:14:28 kevinc Exp kevinc $

############### TODO LIST ###############
#
#  1.  Sound file mastering issues:
#		DONE - Choose mail-order-bride version "fx" or previous ambiance
#		DONE - remove noise in tails. moderate:  PoV, IF, Pewter, CR
#		DONE - 			   mild:  NT, SL
#		DONE - confirm R/L swap on newest MoB
#		DONE - confirm R/L swap
#		DONE - confirm vocal centerings
#		DONE - renormalize inter-song volumes
#		decide CD song order
#
#########################################

############### TOP-LEVEL FILE DEFINITIONS ###############
INPUT:=		7th-island-fx.wav \
		chain-reaction-fx.wav \
		inner-face-fx.wav \
		mail-order-bride-fx.wav \
		no-time-fx.wav \
		ode-to-bela-human-fx.wav \
		pewter-sky-fx.wav \
		point-of-view-fx.wav \
		robs-strawman-13may02.wav \
		robs-strawman-12aug02.wav \
		robs-strawman-13may02-drums.1.wav \
		robs-strawman-13may02-drums.2.wav \
		robs-strawman-13may02-drums.3.wav \
		robs-strawman-13may02-drums.4.wav \
		robs-strawman-13may02-drums.5.wav \
		simple-life-fx.wav

FADES:=		$(INPUT:%.wav=%-norm-trim-fade.wav)
IMD5:=		$(INPUT:%.wav=%.md5)
ISTATS:=	$(INPUT:%.wav=%.stat)
LAMES:=		$(INPUT:%.wav=%.mp3)
NSTATS:=	$(INPUT:%.wav=%-norm.stat)
OMD5:=		$(INPUT:%.wav=%-done.md5)
OSTATS:=	$(INPUT:%.wav=%-done.stat)
OUTPUT:=	$(INPUT:%.wav=%-done.wav)
PADS:=		$(INPUT:%.wav=%-norm-trim-fade-pad.wav)
SNAMES:=	$(INPUT:%.wav=%)
TRIMS:=		$(INPUT:%.wav=%-norm-trim.wav)

############### EFFECTS CATALOG ###############

BREJ:=		-brej
FADE:=		-fade
HPF:=		-hpf
LR:=		-lr
NORM:=		-norm
NULL:=		
PAD:=		-pad
PAN:=		-pan
TRIM:=		-trim
VOL:=		-vol
WAV:=		.wav

############### PRESERVED INTERMEDIATES ###############

.PRECIOUS:	\
		%-done.wav \
		%-hpf.stat \
		%.stat \
		$(TOCMASTER) \
		%-vol.stat

############### PROGRAMS & PATHS ###############
CDRDAO=		/usr/bin/cdrdao
CDRDEV=		0,3,0
CDRDRV=		generic-mmc:0x0
CHMOD=		/bin/chmod
CP=		/bin/cp
ECHO=		/bin/echo
LAME=		/usr/bin/lame
LN=		/bin/ln
MD5SUM=		/usr/bin/md5sum
MV=		/bin/mv
NORMALIZE=	/usr/bin/normalize
RM=		/bin/rm -f
SOX=		/usr/bin/sox
TOCFILE=	gcdmaster-tracks.tmp
TOCMASTER=	gcdmaster-tracks
TOUCH=		/bin/touch

############### DEFAULT TARGET ###############

default: help

############### USER TARGETS ###############

help:
	@$(ECHO) "This Makefile is an aid in mastering song files."
	@$(ECHO) "Targets are:"
	@$(ECHO) ""
	@$(ECHO) " all		runs: imd5s istats omd5s ostats outputs & mp3s"
	@$(ECHO) " burn		burn a CD"
	@$(ECHO) " clean		removes interim files"
	@$(ECHO) " clobber	removes all recreatable files"
	@$(ECHO) " imd5s		MD5 checksum input files"
	@$(ECHO) " istats		report statistics on input files"
	@$(ECHO) " lames		encode MP3s using 'lame'"
	@$(ECHO) " nstats		report statistics for normalized songs"
	@$(ECHO) " omd5s		MD5 checksum output files"
	@$(ECHO) " ostats		report statistics on input files"
	@$(ECHO) " outputs	create final masters"
	@$(ECHO) ""

# @$(ECHO) " fades		fade out song endings"
# @$(ECHO) " trims		trim garbage from song starts"
	
all:		imd5s istats omd5s ostats outputs lames

burn:		$(TOCFILE)
		$(CDRDAO) write --speed 8 -v0 --device $(CDRDEV) \
			--driver $(CDRDRV) --buffers 10 $(TOCFILE)

clean:	
		-$(RM) fades
		-$(RM) imd5s
		-$(RM) istats
		-$(RM) lames
		-$(RM) mp3s
		-$(RM) nstats
		-$(RM) omd5s
		-$(RM) ostats
		-$(RM) outputs
		-$(RM) trims

clobber:	clean
		-$(RM) $(ISTATS)
		-$(RM) $(LAMES)
		-$(RM) $(NSTATS)
		-$(RM) $(OSTATS)
		-$(RM) $(OUTPUT)
		-$(RM) *-brej.wav
		-$(RM) *-fade.wav
		-$(RM) *-hpf.stat
		-$(RM) *-hpf.wav
		-$(RM) *-lr.wav
		-$(RM) *-norm.stat
		-$(RM) *-norm.wav
		-$(RM) *-pan.wav
		-$(RM) *-trim.wav
		-$(RM) *-vol.stat
		-$(RM) *-vol.wav
		-$(RM) *.md5
		-$(RM) *.mp3
		-$(RM) *.stat
		-$(RM) test.mp3
		-$(RM) test.wav

# This breaks clean-up of intermediate wave files
# fades:		$(FADES)
# 		-$(RM) $@
# 		-$(TOUCH) -f $@

imd5s:		$(IMD5)
		-$(RM) $@
		-$(TOUCH) -f $@

istats:		$(ISTATS)
		-$(RM) $@
		-$(TOUCH) -f $@

lames:		$(LAMES)
		-$(RM) $@
		-$(TOUCH) -f $@

nstats:		$(NSTATS)
		-$(RM) $@
		-$(TOUCH) -f $@

omd5s:		$(OMD5)
		-$(RM) $@
		-$(TOUCH) -f $@

ostats:		$(OSTATS)
		-$(RM) $@
		-$(TOUCH) -f $@

outputs:	$(OUTPUT)
		-$(RM) $@
		-$(TOUCH) -f $@

# This breaks clean-up of intermediate wave files
# trims:		$(TRIMS)
# 		-$(RM) $@
# 		-$(TOUCH) -f $@

############### SONG SPECIFIC CONTROL DEFINITIONS ###############

7th-island-fx-fade:=		t 0.1 6:11.010 0.2	# OK
7th-island-fx-hpf:=		10			# not needed
7th-island-fx-norm:=		0.3485			# OK
7th-island-fx-pan:=		-0.07			# OK
7th-island-fx-trim:=		0:10.118		# OK
7th-island-fx-samp:=		1:53-3:25		# approx.

chain-reaction-fx-fade:=	t 0.05 4:57.880 1.5	# OK
chain-reaction-fx-hpf:=		75			# OK
chain-reaction-fx-norm:=	0.3125			# OK
chain-reaction-fx-pan:=		0.20			# good enough
chain-reaction-fx-trim:=	0:06.376		# OK
chain-reaction-fx-samp:=	start-0:32ish, 4:36-end	# approx.

inner-face-fx-fade:=		t 0 3:04.599 2.8	# OK
inner-face-fx-hpf:=		90			# OK
inner-face-fx-norm:=		0.3418			# OK
inner-face-fx-pan:=		-0.15			# OK
inner-face-fx-trim:=		0:05.756		# OK
inner-face-fx-samp:=		start-1:38		# approx.

mail-order-bride-fx-fade:=	t 0 7:08.320 0.3	# 
mail-order-bride-fx-hpf:=	10			# not needed
mail-order-bride-fx-norm:=	0.3327			# 
mail-order-bride-fx-pan:=	0.25			# 
mail-order-bride-fx-trim:=	0:08.300 		# 
mail-order-bride-fx-samp:=	5:32-end		# approx.

no-time-fx-fade:=		t 0 5:10.800 0.45	# 5:10.300 0.45
no-time-fx-hpf:=		80			# OK
no-time-fx-norm:=		0.4370			# OK
no-time-fx-pan:=		0.35			# good enough
no-time-fx-trim:=		0:02.411		# OK
no-time-fx-samp:=		start-1:48		# approx.

ode-to-bela-human-fx-fade:=	t 0 3:09.600 0.8	# OK
ode-to-bela-human-fx-hpf:=	10			# not needed
ode-to-bela-human-fx-norm:=	0.3621			# OK
ode-to-bela-human-fx-pan:=	0.20			# OK
ode-to-bela-human-fx-trim:=	0:12.442		# OK
ode-to-bela-human-fx-samp:=	2:40-end		# approx.

pewter-sky-fx-fade:=		t 0 3:52.460 4.0	# OK
pewter-sky-fx-hpf:=		75			# OK
pewter-sky-fx-norm:=		0.3967			# OK
pewter-sky-fx-pan:=		-0.35			# OK
pewter-sky-fx-trim:=		0:04.947		# OK
pewter-sky-fx-samp:=		start-1:00		# approx.

point-of-view-fx-fade:=		t 0 4:47.200 1.2	# OK
point-of-view-fx-hpf:=		75			# OK
point-of-view-fx-norm:=		0.3651			# OK
point-of-view-fx-pan:=		-0.20			# OK
point-of-view-fx-trim:=		0:03.408		# OK
point-of-view-fx-samp:=		2:52-4:20		# approx.

robs-strawman-12aug02-fade:=	t 0.05 7:41.000 1.0	# OK
robs-strawman-12aug02-norm:=	0.38			# OK
robs-strawman-12aug02-pad:=	t 0 7:43.000		# OK
robs-strawman-12aug02-trim:=	0:5.5 			# OK

robs-strawman-13may02-fade:=	t 0.05 6:23.940 0.2	# OK
robs-strawman-13may02-pad:=	t 0 6:25.940		# OK
robs-strawman-13may02-norm:=	0.3485			# OK
robs-strawman-13may02-trim:=	0:5.1 			# OK

robs-strawman-13may02-drums.1-fade:=	t 0:1.0 1:52.9 1# OK
robs-strawman-13may02-drums.1-norm:=	0.36		# OK
robs-strawman-13may02-drums.1-pad:=	t 0 1:54.9	# OK
robs-strawman-13may02-drums.1-trim:=	0:1.0 1:53.9 	# OK

robs-strawman-13may02-drums.2-fade:=	t 0:1.0 0:58.38 1# OK
robs-strawman-13may02-drums.2-norm:=	0.35		# OK
robs-strawman-13may02-drums.2-pad:=	t 0 1:00.38	# OK
robs-strawman-13may02-drums.2-trim:=	0:0.42 0:58.8 	# OK

robs-strawman-13may02-drums.3-fade:=	t 0:1.0 0:46.8 1# OK
robs-strawman-13may02-drums.3-norm:=	0.32		# OK
robs-strawman-13may02-drums.3-pad:=	t 0 0:48.8	# OK
robs-strawman-13may02-drums.3-trim:=	0:0.3 0:47.1 	# OK

robs-strawman-13may02-drums.4-fade:=	t 0:0.5 0:46.88 1 # OK
robs-strawman-13may02-drums.4-norm:=	0.30		# OK
robs-strawman-13may02-drums.4-pad:=	t 0 0:48.88	# OK
robs-strawman-13may02-drums.4-trim:=	0:1.7 0:48.58	# OK

robs-strawman-13may02-drums.5-fade:=	t 0:0.5 0:48.38 1 # OK
robs-strawman-13may02-drums.5-norm:=	0.33		# OK
robs-strawman-13may02-drums.5-pad:=	t 0 0:50.38	# OK
robs-strawman-13may02-drums.5-trim:=	0:1.7 0:48.38	# OK

simple-life-fx-fade:=		t 0 5:43.300 0.1	# OK
simple-life-fx-hpf:=		75			# OK
simple-life-fx-norm:=		0.3838			# OK
simple-life-fx-pan:=		-0.20			# OK
simple-life-fx-trim:=		0:06.300		# OK
simple-life-fx-samp:=		start-2:00		# approx.

############### SECONDARY TARGETS ###############

# pan before normalzing
# normalize before trim or fade

7th-island-fx-done.wav:	\
	7th-island-fx-pan-norm-trim-fade-lr.wav
	-$(RM) $@
	$(MV) $< $@

chain-reaction-fx-done.wav:	\
	chain-reaction-fx-norm-trim-hpf-fade-lr.wav
	-$(RM) $@
	$(MV) $< $@

inner-face-fx-done.wav:	\
	inner-face-fx-pan-norm-trim-hpf-fade.wav
	-$(RM) $@
	$(MV) $< $@

mail-order-bride-fx-done.wav:	\
	mail-order-bride-fx-pan-norm-trim-fade-lr.wav
	-$(RM) $@
	$(MV) $< $@

no-time-fx-done.wav:	\
	no-time-fx-pan-hpf-norm-trim-fade-lr.wav
	-$(RM) $@
	$(MV) $< $@

ode-to-bela-human-fx-done.wav:	\
	ode-to-bela-human-fx-pan-norm-trim-fade-lr.wav
	-$(RM) $@
	$(MV) $< $@

pewter-sky-fx-done.wav:	\
	pewter-sky-fx-pan-norm-trim-hpf-fade.wav
	-$(RM) $@
	$(MV) $< $@

point-of-view-fx-done.wav:	\
	point-of-view-fx-pan-norm-trim-hpf-fade-lr.wav
	-$(RM) $@
	$(MV) $< $@

robs-strawman-12aug02-done.wav:	\
	robs-strawman-12aug02-norm-trim-fade-pad.wav
	-$(RM) $@
	$(MV) $< $@

robs-strawman-13may02-done.wav:	\
	robs-strawman-13may02-norm-trim-fade-pad.wav
	-$(RM) $@
	$(MV) $< $@

robs-strawman-13may02-drums.1-done.wav:	\
	robs-strawman-13may02-drums.1-norm-trim-fade-pad.wav
	-$(RM) $@
	$(MV) $< $@

robs-strawman-13may02-drums.2-done.wav:	\
	robs-strawman-13may02-drums.2-norm-trim-fade-pad.wav
	-$(RM) $@
	$(MV) $< $@

robs-strawman-13may02-drums.3-done.wav:	\
	robs-strawman-13may02-drums.3-norm-trim-fade-pad.wav
	-$(RM) $@
	$(MV) $< $@

robs-strawman-13may02-drums.4-done.wav:	\
	robs-strawman-13may02-drums.4-norm-trim-fade-pad.wav
	-$(RM) $@
	$(MV) $< $@

robs-strawman-13may02-drums.5-done.wav:	\
	robs-strawman-13may02-drums.5-norm-trim-fade-pad.wav
	-$(RM) $@
	$(MV) $< $@

simple-life-fx-done.wav:	\
	simple-life-fx-pan-norm-trim-hpf-fade-lr.wav
	-$(RM) $@
	$(MV) $< $@

test.wav:	inner-face-fx-done.wav
		-$(RM) $@
		$(SOX) $< $@ trim 0:13.000 0:10.000

test.mp3:	test.wav

############### PATTERN RULES ###############

%-brej.wav:	%.wav
		-$(RM) $@
		$(SOX) $< $@ bandreject 11500 2800

%-fade.wav:	%.wav
		-$(RM) $@
		$(SOX) $< $@ fade \
		$($(subst $(FADE),$(NULL),$(subst $(HPF),$(NULL),$(subst $(NORM),$(NULL),$(subst $(PAD),$(NULL),$(subst $(PAN),$(NULL),$(subst $(WAV),$(NULL),$(subst $(TRIM),$(NULL),$(@))))))))-fade)

%-hpf.stat	\
%-hpf.wav:	%.wav
		-$(RM) $(*)-hpf.wav $(*)-hpf.stat
		$(SOX) $< $(*)-hpf.wav highpass \
		$($(subst $(FADE),$(NULL),$(subst $(HPF),$(NULL),$(subst $(NORM),$(NULL),$(subst $(PAD),$(NULL),$(subst $(PAN),$(NULL),$(subst $(WAV),$(NULL),$(subst $(TRIM),$(NULL),$(*))))))))-hpf)
		( $(SOX) $(*)-hpf.wav -e stat 2>&1 ) > $(*)-hpf.stat

%.mp3:		%.wav
		-$(RM) $@
		$(LAME) --quiet --vbr-new -V 0 $< $@

%.md5:		%.wav
		-$(RM) $@
		$(MD5SUM) $< > $@

%-lr.wav:	%.wav
		-$(RM) $@
		$(SOX) $< $@ swap

%-norm.stat	\
%-norm.wav:	%.wav
		-$(RM) $(*)-norm.wav $(*)-norm.stat
		$(CP) $< $(*)-norm.wav
		$(CHMOD) u+w $(*)-norm.wav
		$(NORMALIZE) -q --amplitude=$($(subst $(FADE),$(NULL),$(subst $(HPF),$(NULL),$(subst $(NORM),$(NULL),$(subst $(PAD),$(NULL),$(subst $(PAN),$(NULL),$(subst $(WAV),$(NULL),$(subst $(TRIM),$(NULL),$(*))))))))-norm) \
		$(*)-norm.wav
		( $(SOX) $(*)-norm.wav -e stat 2>&1 ) > $(*)-norm.stat

%-pad.wav:	%.wav
		-$(RM) $@
		$(SOX) $< $@ fade \
		$($(subst $(FADE),$(NULL),$(subst $(HPF),$(NULL),$(subst $(NORM),$(NULL),$(subst $(PAD),$(NULL),$(subst $(PAN),$(NULL),$(subst $(WAV),$(NULL),$(subst $(TRIM),$(NULL),$(*))))))))-pad)

%-pan.stat	\
%-pan.wav:	%.wav
		-$(RM) $(*)-pan.wav $(*)-pan.stat
		$(SOX) $< $(*)-pan.wav pan \
		$($(subst $(FADE),$(NULL),$(subst $(HPF),$(NULL),$(subst $(NORM),$(NULL),$(subst $(PAD),$(NULL),$(subst $(PAN),$(NULL),$(subst $(WAV),$(NULL),$(subst $(TRIM),$(NULL),$(*))))))))-pan)
		( $(SOX) $(*)-pan.wav -e stat 2>&1 ) > $(*)-pan.stat

%.stat:		%.wav
		-$(RM) $@
		( $(SOX) $< -e stat 2>&1 ) > $@

%-trim.wav:	%.wav
		-$(RM) $@
		$(SOX) $< $@ trim \
		$($(subst $(FADE),$(NULL),$(subst $(HPF),$(NULL),$(subst $(NORM),$(NULL),$(subst $(PAD),$(NULL),$(subst $(PAN),$(NULL),$(subst $(WAV),$(NULL),$(subst $(TRIM),$(NULL),$(*))))))))-trim)

%-vol.stat	\
%-vol.wav:	%.wav
		-$(RM) $(*)-vol.wav $(*)-vol.stat
		$(SOX) -v 1.0 $< $(*)-vol.wav
		( $(SOX) $(*)-vol.wav -e stat 2>&1 ) > $(*)-vol.stat

$(TOCFILE):	$(TOCMASTER)
		-$(RM) $@
		$(CP) $< $@

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux