-
Notifications
You must be signed in to change notification settings - Fork 0
/
makeTestFiles.bat
57 lines (40 loc) · 1.58 KB
/
makeTestFiles.bat
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@ECHO OFF
REM makeTestFiles - renders several MIDI files with standard FluidSynth
REM and pedantic FluidSynth File Converter
SET scriptDirectory=%~dp0.
SET configuration=Release
IF NOT "%1"=="" SET configuration=%1
SET platform=Windows-AMD64\%configuration%
SET sampleRateList=44100 48000
REM === path of standard FluidSynth ===
SET fsProgram=CALL fluidsynth
REM === path of (pedantic) fluidsynth file converter ===
SET fsfcProgram=%scriptDirectory%\..\targetPlatforms\%platform%
SET fsfcProgram=%fsfcProgram%\FluidSynthFileConverter
SET fsfcProgram=%fsfcProgram%\FluidSynthFileConverter
SET soundFont=SimpleTestSoundfont.SF2
SET prefixList=test_bass test_drums test_keyboard
PUSHD %scriptDirectory%
FOR %%i IN (%prefixList%) DO CALL :renderMidiFile %%i
POPD
GOTO :EOF
REM ============================================================
:renderMidiFile
SET prefix=%1
REM iterate over all sample rates
FOR %%s IN (%sampleRateList%) DO CALL :renderMidiFileWithSampleRate %prefix% %%s
GOTO :EOF
REM --------------------
:renderMidiFileWithSampleRate
SET prefix=%1
SET sampleRate=%2
SET renderOptions=-R 0 -C 0 -g 1.0 -O float -r %sampleRate%
SET midiFile=%prefix%.mid
SET inputFileList=%midiFile% %soundFont%
SET waveFile=FSFC-%prefix%-%sampleRate%.wav
ECHO == render %waveFile% with pedantic converter
%fsfcProgram% %renderOptions% -F %waveFile% %inputFileList%
SET waveFile=FS-%prefix%-%sampleRate%.wav
ECHO == render %waveFile% with standard fluidsynth
%fsProgram% -q -n -i %renderOptions% -F %waveFile% %inputFileList%
GOTO :EOF