|
@@ -1,9 +1,24 @@
|
|
1
|
+# ----------------------------------------------------------------------------
|
|
2
|
+# Copyright (c) 2024 Thomas Buck (thomas@xythobuz.de)
|
|
3
|
+# Copyright (c) 2024 Philipp Schönberger (mail@phschoen.de)
|
|
4
|
+#
|
|
5
|
+# This program is free software: you can redistribute it and/or modify
|
|
6
|
+# it under the terms of the GNU General Public License as published by
|
|
7
|
+# the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+# (at your option) any later version.
|
|
9
|
+#
|
|
10
|
+# This program is distributed in the hope that it will be useful,
|
|
11
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+# GNU General Public License for more details.
|
|
14
|
+#
|
|
15
|
+# See <http://www.gnu.org/licenses/>.
|
|
16
|
+# ----------------------------------------------------------------------------
|
|
17
|
+
|
1
|
18
|
inputs = $(wildcard *.svg)
|
2
|
19
|
|
3
|
|
-# outputs = $(inputs:%.svg=output/%_44100.wav)
|
4
|
|
-# outputs += $(inputs:%.svg=output/%_48000.wav)
|
5
|
|
-# outputs += $(inputs:%.svg=output/%_96000.wav)
|
6
|
|
-outputs += $(inputs:%.svg=output/%all.wav)
|
|
20
|
+outputs = $(inputs:%.svg=output/%.wav)
|
|
21
|
+outputs += $(inputs:%.svg=output/%_rotate.wav)
|
7
|
22
|
|
8
|
23
|
.PHONY: all
|
9
|
24
|
all: output ${outputs}
|
|
@@ -11,27 +26,16 @@ all: output ${outputs}
|
11
|
26
|
output:
|
12
|
27
|
mkdir output
|
13
|
28
|
|
14
|
|
-output/%_44100.wav: %.svg
|
15
|
|
- ./render.py -s 44100 -o $(@:%.svg=%_44100.wav) $<
|
16
|
|
-
|
17
|
|
-output/%_48000.wav: %.svg
|
18
|
|
- ./render.py -s 48000 -o $(@:%.svg=%_48000.wav) $<
|
19
|
|
-
|
20
|
|
-output/%_96000.wav: %.svg
|
21
|
|
- ./render.py -s 96000 -o $(@:%.svg=%_96000.wav) $<
|
|
29
|
+output/%.wav: %.svg
|
|
30
|
+ ./render.py -s 192000 -o $@ $<
|
22
|
31
|
|
23
|
|
-output/%_192000.wav: %.svg
|
24
|
|
- ./render.py -s 192000 -o $(@:%.svg=%_192000.wav) $<
|
25
|
|
-
|
26
|
|
-output/%all.wav: %.svg
|
|
32
|
+output/%_rotate.wav: %.svg
|
27
|
33
|
for number in {000..360..5} ; do \
|
28
|
34
|
./render.py -s 192000 -t 0.1 -o output/$(@F)_$$number.wav -r $$number $< ; \
|
29
|
35
|
done
|
30
|
|
- sox output/$(@F)_*.wav $@
|
31
|
|
- ffmpeg -f concat -safe 0 -i <( for f in output/$(@F)_*.wav; do echo "file '$$(pwd)/$$f'"; done ) output.wav
|
|
36
|
+ ffmpeg -f concat -safe 0 -i <( for f in output/$(@F)_*.wav; do echo "file '$$(pwd)/$$f'"; done ) $@
|
32
|
37
|
rm output/$(@F)_*.wav
|
33
|
38
|
|
34
|
|
-
|
35
|
39
|
.PHONY: clean
|
36
|
40
|
clean:
|
37
|
41
|
rm -rf output
|