Lossless version with .flac files
Currently samples are .ogg vorbis format:
- Vorbis Audio
- Stereo
- 44100 Hz
- 192k/s https://github.com/musescore/mdl/blob/master/resources/sound/MDL_samples/auxiliary/agogo_high_F.ogg
Ogg Vorbis is a lossy format which is not ideal for high-quality sounding performances/recordings.
Within the SFZ and Soundfont world it is a standard to share instruments in a lossless format such as:
- .wav
- .flac https://github.com/sfzinstruments
You can create a "compact" lossy version by converting .flac back to .ogg afterwards using the commands.
-
Convert .flac to .ogg using ffmpeg
for file in $(find . -type f -name '*.flac'); do ffmpeg -i "$file" -b:a 192k "${file%.*}.ogg"; done -
replace all references of flac to ogg in sfz files
find . -type f \( -iname \*.sfz -o -iname \*.txt \) -exec sed -i -e 's/flac/ogg/g' {} \; -
Delete the old .flac files
find . -type f -name '*.flac' -type f -delete
This can be run in GitHub CI such as: https://github.com/studiorack/studiorack-workflows/blob/main/.github/workflows/sfz.yml#L97
Of course none of this is possible without the lossless versions being the originals