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

Lossless version with .flac files #6

Open
kmturley opened this issue Oct 7, 2022 · 0 comments
Open

Lossless version with .flac files #6

kmturley opened this issue Oct 7, 2022 · 0 comments

Comments

@kmturley
Copy link

kmturley commented Oct 7, 2022

Currently samples are .ogg vorbis format:

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:

You can create a "compact" lossy version by converting .flac back to .ogg afterwards using the commands.

  1. Convert .flac to .ogg using ffmpeg
    for file in $(find . -type f -name '*.flac'); do ffmpeg -i "$file" -b:a 192k "${file%.*}.ogg"; done

  2. 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' {} \;

  3. 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

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

No branches or pull requests

1 participant