-
Notifications
You must be signed in to change notification settings - Fork 7
/
cadencii-yawu
executable file
·36 lines (29 loc) · 1.06 KB
/
cadencii-yawu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# This is jCadencii (OS X & Linux) platform tools wrapper
# By default, Yawu was placed in ./build/wavtool-yawu relative.
# If you have moved these files, change it below.
YAWU_DIR="$(dirname "$0")"
YAWU_PATH="${YAWU_DIR}/build/wavtool-yawu"
# You may optionally set jCadencii's resampler setting to this script.
# If so, this script will detect it automatically,
# allowing more flexible configuration.
UTAU_RESAMPLER=(wine 'C:\Program Files\UTAU\resampler.exe')
# The output is redirected to the log file
YAWU_LOG=/tmp/cadencii-yawu.log
if echo -n "$3" | grep -q '[A-G]'
then
"${UTAU_RESAMPLER[@]}" "$@" 2>&1 | tee -a "${YAWU_LOG}"
else
"${YAWU_PATH}" "$@" 2>&1 | tee -a "${YAWU_LOG}"
if [ -e "$1" ]
then
# jCadencii does not use the real output file.
# Instead, it uses two temporary files,
# which the original wavtool generates during rendering.
#
# So let us regenerate these temporary files
# to satisfy jCadencii.
head -c 44 "$1" > "$1.whd"
tail -c +45 "$1" > "$1.dat"
fi
fi