Skip to content

Latest commit

 

History

History
111 lines (86 loc) · 5.45 KB

FOLDER ENVIRONMENT SPECIFICATION.md

File metadata and controls

111 lines (86 loc) · 5.45 KB

SFZBuilder needs a specific folder environment to make this work. This document specificies:

  • What it should have
  • What you can do
  • What you cannot do

Check the SFZBuilder Factory Library Demo as a reference: https://huggingface.co/datasets/michl1149/SFZBuilder-Factory-Library-Demo/tree/main

STRUCTURE

The init SFZBuilder folder can be found here: https://github.com/michael02022/sfzbuilder-init-folder

SFZBuilder (root)
├───MappingPool
│   └──Pack 1
│      └──MSamples
│      │  └──(any folders)
│      │      └──Map.sfz
│      └──PSamples
│         └──(any folders)
│             └──Map.sfz
├───Presets
│   └──Pack 1 Presets
│      └──(any folders)
│         └──Preset.sfz
└───Projects
│   └──Pack 1 Projects
│      └──(any folders)
│         └──Preset.sfzproj
└───Wavetables
    └──Pack 1 Wavetables
          └──(any numered files in WAV format)

Root folder

This is basically the environment for all these files. You can put this folder on whatever ubication of your drive. It's the capsule for all the presets made.

MappingPool folder

This is where ALL the mappings are stored. The name of the folders should at least have:

  • Author
  • Name of the pack

Example: NiceSounds - Texture Collections

Pack folder

Under this folder, you can organize the maps whatever you want, also you can store documentation, readmes, licenses and so on to give information to the user.

MSamples/PSamples folder

It's important to store the mappings under one of these two categories.

MSamples means Mapping Samples. These are supposed to be instruments that are chromatic, melodic (pianos, winds, electric, synths).

PSamples means Percussion Samples. Only non-melodic percussion samples allowed (snares, hats, cymbals, fx).

Conditions for the mappings

Whatever you put the samples, the sfz file mapping ALWAYS should be in the same folder as the samples. The SFZ map files must load the samples in the same place. You can also use subfolders in the sample= opcode if in this way you think is more organized for the type of instrument. Example: sample=subfolder/my_sample.wav

Another must is these must cover the entire MIDI value spectrum for key and velocity (0 - 127).

And this is likely a suggestion, but your end-user will be grateful and it's about to number the SFZ mappings in their name. Example:

01 Saxello Sus.sfz
02 Saxello Vib.sfz
03 Saxello Stac.sfz

Opcodes allowed

This is not exactly a strict rule, technically you are free to use the opcodes you want, but you have to keep in mind at least these basic opcodes to make sure another players (and samplers with SFZ imports) can load these mappings and let the mappings being flexible as possible when a preset is made.

The maximum header for these mappings is <region>, everything should be at <region> level

The essential opcodes for mappings are:

  • sample
  • pitch_keycenter
  • lokey
  • hikey
  • key (if is used to simplify the mapping)
  • tune
  • offset (if needed)
  • pan (if the stereo samples are separated mono samples)

lovel/hivel are allowed, but maps with seperated dynamics would be nice to have for flexibility reasons.

seq_length seq_position lorand hirand are allowed too.

For percussion instruments (AND 1 sample-only instruments) only is allowed lovel/hivel (do not write pitch_keycenter key lokey hikey), everything else will be written in the preset, for flexibility reasons.

These opcodes should be present if FLAC/OGG files are involved (not all sfz players/importers support this metadata for those formats):

  • loop_mode
  • loop_type
  • direction
  • loop_start
  • loop_end

For oneshot samples, at least with melodic ones (like winds, brass and so on), you can write secret loop points only using loop_start loop_end for them where only are enable if the preset has a defined loop_mode opcode.

Also, for instruments with natural tuning (pianos to put an example), it's recommendeded to preserve both versions of it (one that is artificially tuned and the original) since there are people who would rather use the natural tuning. This can be made when you have the exact same name of the mapping but adding --TN, and the --TN one being of course, the same mapping but with tune opcodes. Example:

01 Grand Piano.sfz
01 Grand Piano --TN.sfz

Preset folder

This folder is where you store the presets generated by SFZBuilder (technically you could make them manually too). You can store the presets whatever you want, only make sure all is under a folder of the same name as your pack to avoid confusion/unorganization.

Projects folder

This is where you store the project files (.sfzproj) from SFZBuilder, is optional if you want to share them or not to the end user. This is automatically generated each time you save a SFZ file in Presets folder.

Wavetables folder (sfizz feature)

Here is where you store the waveform files, being WAV files no longer than 3000 samples/frames. You can make .sfz files which contains multiple waveforms to form a mapping with them.

How to share a pack

Basically you should preserve this structure with all the stuff needed to make everything work. And that's what you are going to share to the end user. So the end user would just cut-paste your pack into their local SFZBuilder environment folder and there you go. The end user has installed your pack ready to use and make new presets with them.