Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert .wav to .flac #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kmturley
Copy link

@kmturley kmturley commented Feb 12, 2022

Problem
.wav files are high-quality lossless audio files and the preferred choice for music production. They come at a cost. of filesize:
Screen Shot 2022-02-11 at 4 31 57 PM

Solution
.flac uses lossless compression. FLAC files are smaller than corresponding PCM-encoded WAV files, since PCM doesn't allow for lossless compression and just represents the data as-is.
Screen Shot 2022-02-11 at 4 32 02 PM

The main SFZ players support flac as it is part of the ARIA spec:
https://sfzformat.com/opcodes/sample.html#formats

Examples of other SFZ instruments using the .flac format:
https://github.com/sfzinstruments/virtuosity_drums/tree/master/Samples/room/kick
https://github.com/sfzinstruments/WilkinsonAudio.NakedDrums/tree/master/Wilkinson%20Audio/Naked%20Drums/Samples
https://github.com/sfzinstruments/SalamanderGrandPiano/tree/master/Samples

I converted all .wav to .flac using the following commands:

brew install ffmpeg
for file in $(find . -type f -name '*.wav'); do ffmpeg -i "$file" "${file%.*}.flac"; done
find . -type f -name '*.sfz' -exec sed -i '' s/wav/flac/g {} +
find . -type f -name '*.txt' -exec sed -i '' s/wav/flac/g {} +
find . -type f -name '*.wav' -type f -delete

This PR is the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant