song 2: bass: Use volta repeat with segno.
[music/pretentious.git] / targets.mk
1 # Project root directory
2 TOP := $(dir $(lastword $(MAKEFILE_LIST)))
3
4 # What soundfont to use to generate the MIDI file
5 SOUNDFONT = $(HOME)/soundfonts/FluidR3GM.sf2
6 # Determine how many processors are present
7 CPU_CORES=`grep -m1 "cpu cores" /proc/cpuinfo | tr -cd '[:digit:]'`
8 # The command to run lilypond
9 LILY_CMD = lilypond -ddelete-intermediate-files -drelative-includes -djob-count=$(CPU_CORES)
10
11 wav: $(NAME).wav
12 ogg: $(NAME).ogg
13 guide: guide.wav
14
15 upload-ogg: ogg
16 scp $(NAME).ogg elephly.net:~/elephly.net/secret/band/$(NAME)/$(NAME).ogg
17
18 upload-wav: wav
19 scp $(NAME).wav elephly.net:~/elephly.net/secret/band/$(NAME)/$(NAME).wav
20
21
22 parts/%.pdf: parts/%.ly music/%.ly
23 $(LILY_CMD) $<
24
25 %.pdf: %.ly music/*.ly
26 $(LILY_CMD) $<
27
28 %.midi: %.ly music/*.ly
29 $(LILY_CMD) $<
30
31 %.wav: %.midi
32 fluidsynth -r 48000 -F $@ -l -R no -i -n -a alsa $(SOUNDFONT) $<
33
34 %-klick-mono.wav: %.tempo
35 klick -W $@ -f $<
36
37 %-klick.wav: %-klick-mono.wav
38 sox $< $@ channels 2
39
40 guide.wav: $(NAME)-klick.wav $(NAME).wav
41 sox --combine mix $(NAME)-klick.wav -v 0.25 $(NAME).wav $@
42
43 %.ogg: %.wav
44 oggenc $<