-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
convert.sh
executable file
·32 lines (32 loc) · 1.16 KB
/
convert.sh
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
#!/bin/bash
SOURCE="Ivy Audio - Piano in 162 sfz.zip"
SAMPLES="Ivy Audio - Piano in 162 sfz/Piano in 162 Samples"
TARGET="Audio Music Apps/Samples/Piano 162"
if ! test -f "$SOURCE"; then
echo "Put the '$SOURCE' file next to this script!"
exit 1
fi
if ! command -v brew &> /dev/null; then
echo "*** INSTALLING HOMEBREW"
$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
fi
brew install p7zip flac
echo "*** EXTRACTING"
if test "$1" = "test"; then
7za x "$SOURCE" -aos '-i!Ivy Audio - Piano in 162 sfz/Piano in 162 Samples/Ambient/PedalOffAmbient/01*'
7za x "$SOURCE" -aos '-i!Ivy Audio - Piano in 162 sfz/Piano in 162 Samples/Close/PedalOffClose/01*'
else
7za x "$SOURCE"
fi
echo "*** REMOVING ROUND ROBINS"
find "$SAMPLES" -name \*2Close.flac -exec rm {} \;
find "$SAMPLES" -name \*2Ambient.flac -exec rm {} \;
echo "*** CONVERTING TO WAV"
find "$SAMPLES" -name \*flac -exec flac -d -f {} \;
echo "*** REMOVING FLAC FILES"
find "$SAMPLES" -name \*.flac -exec rm {} \;
echo "*** MOVING FILES"
mv -f "$SAMPLES/Close" "$TARGET"
mv -f "$SAMPLES/Ambient" "$TARGET"
echo "*** DONE"
echo "Move samples from this folder to the Logic Pro samplers folder"