Skip to content

Lossless version with .flac files #6

@kmturley

Description

@kmturley

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions