Tutorials‎ > ‎

How to make a sample library

IMPORTANT FOR ENCHANT CONTRIBUTION: If you are contributing for Enchant! or another Stardream mainstream soundfont, please also follow the instructions in green. Discretionary instructions are in yellow, they are not required. Things that are not recommended for contribution for Stardream projects are in red. Things that must NEVER be done are marked in dark red.
What you'll need:
Instrument samples.
Software to edit sample libraries. This depends on the format of sample library used.

1. Choose the instrument to make a sample library of. Once this is done, go to 2.
Record an instrument which is sampleless. Example: Bosendorfer 290 "imperial", Yamaha CFX, other Concert Grand Pianos.
Record an instrument which does not sound good in Enchant!. Example: Zampona (only 1 sample in Enchant! or SD.)
Record an instrument with "Resynth!" in its name in Enchant!, the "Resynth!" means that the instrument has been resynthesised using a synthesiser. Example: Shamisen.
Record an instrument which already exists in Enchant! to a higher quality. Example: Viola, Cello.
You can:
Record any brand of instrument. However, note that the specific models listed on this page are preferred. 
Record an instrument which is similar to a sampleless instrument. It will be counted as a different instrument to the sampleless instrument however.
Record an instrument which already exists in Enchant! if the quality is not as good. Example: A Yamaha C5 if it falls below the quality level of the existing Salamander Grand Piano. In this case, if we needed a Yamaha C5, we would just use the Salamander Grand Piano.
Record from an existing sample library. Example: Anything which is commercial, or a rompler.
Rip samples from a video game. Example: SNES/N64 soundfonts. 
Use Crisis. Self explanatory. The best way to avoid using Crisis is to avoid downloading it!
2. Do samples of the instrument exist? If yes, go to 3. If no, go to 7.
Find a commercial sample library.
Find video game soundfonts or video game sound samples.
3. Find the samples of the instrument that you want to use, and the license.
Use existing samples under a suitable license (GPL, CC-BY, CC0, MIT, Public Domain and any other licenses listed as free in the license matrix). Examples: Salamander Grand Piano (CC-BY 3.0/4.0)
Record your own instrument. Example: My Venova YVS 100.
Use uncompressed samples (or samples compressed in a lossless format, like FLAC). Example: WAV, FLAC, AIFF (if you must).
You can:
Record using any microphone you like. 
Use samples which are under a non-free license (Examples include: "Non-commercial use only", No-derivatives, CC Sampling (Plus), the "Philharmonia restriction" or samples with "no license").
Use samples which are compressed in a lossy format, like MP3 or OGG. These methods of compression permanently damage the sample. Before saving the samples, find out if the file format that will be used is "lossy" or "lossless".
Use video game sound samples. These are copyrighted by the game developer.
Use Crisis. Self explanatory. The best way to avoid using Crisis is to avoid downloading it!
4. Does the license allow you to redistribute, modify and convert the samples? If all of the answers are yes, go to 5. Otherwise, find other samples to use. If you can't find any other samples, go to 9.
Use samples under a copyleft license compatible with the GPL.
Combine sounds which are all compatible with GPL. The final product must be licensed under a license compatible with all the licenses of the sources.
You can:
Use a permissive license, as long as it is compatible with the GPLV3. However, please note that others can use your samples to create a non-free soundfont!
Use samples which have a restrictive license. Examples include CC noncommercial, sampling (plus), the "Philharmonia restriction" (a prohibition on distribution of samples "as-is") and CC noderivatives. GPL-incompatible licenses like the four clause BSD license (with the infamous "advertising clause") are also not suitable for Enchant!.
Use commercial sound libraries or video game samples. The sole proprietor of such commercial sound libraries is the creator. In the case of video game samples, the three proprietors of the samples are the composer of the video game's soundtrack, the game developer and the game publisher.
Use Crisis. Self explanatory. The best way to avoid using Crisis is to avoid downloading it!
5. Compile the samples into a sample library.
Use SF2 or SFZ.
If you want the highest quality, use a feature rich sampler format, like SFZ.
If you want something which is easy to redistribute, use a monolithic format like SF2 (or a libre lossless compressed version like SF4, because these open source compressed versions can be decoded by many programs). SF4 is not supported widely yet, and the license for this is "pure" GPLV2 instead of GPLV2 or later (like the Linux kernel). The SF4 tool was developed from source code derived from an older version of the now famous Polyphone soundfont editor.
Sometimes, samples on their own can be used, but usually, SFZ is better than just samples on their own. So, if you want to distribute samples on their own, consider assembly into an SFZ instrument.
You can:
Share a sample library in multiple formats, including unsuitable formats listed below. Just make sure that at least one of the formats is listed as a suitable format above.
Use GIG. Less programs support this format. GIG can be converted to WAV using specialised free (libre) software, but it is very time consuming and it requires Linux.
Use NKI or EXS. Only commercial products can understand these formats. If the file is non-monolithic, it may be possible to extract the samples. EXS samples further have the disadvantage that the samples are in AIFF format, and must be converted. 
Use the Soundfont format for round robin samples (or similar features not found in SF2). Soundfont was designed in 1994, where no one would think about these features. Soundfont never got these features because they needed to retain backwards compatibility with the 1994 sound hardware that Soundfont was designed for.
Use a proprietary compressed version of Soundfont (Examples: SFPACK, SFOGG, SFARK, SF2PACK). Specific programs must be used to decode such versions of Soundfont (SFPack tool, Falcosoft player, SFArk tool, BassMidi. All four of these are closed source and non-free. SFPack, SFArk and Bassmidi will allow commercial use if you donate to them, however the Falcosoft player can't be used for commercial purposes at all, even with donation.).
Use a lossy compressed version of Soundfont, free or non-free (Examples: SFOGG, SF3). Quality is irrevocably lost if such a format is used.
Use SFZ or other non-monolithic formats if you want to make the sample library easy to redistribute. SFZ requires much more files than monolithic formats like SF2.
Use a lossy compression algorithm, even if it's free, like OGG or OPUS. Quality is irrevocably lost.
6. Select a license which is compatible with the license that the samples are. Refer to the licensing matrix below. Now go to 10.
Release samples to the public domain (Using something like CC0). Avoid using WTFPL, CC0 is fine. Since Musical Artifacts does not have a CC0 option, just use the public domain option. LFZ, please add a Creative Commons Zero option to the license field for Musical Artifacts. You added Creative Commons 3.0, so do this, please!
License samples under permissive licenses (An example is MIT or 2/3 clause BSD). Beware, if you want the samples to stay freely licensed, avoid using such a permissive license, as anyone can use them in their proprietary products. Note that 4 clause BSD is incompatible with the GPL.
License samples under free, GPL-compatible copyleft licenses. Remember that an exception similar to "If you change the samples and release them as a sample library, the license must be the same, but if you make a composition using this sample library, you may choose to license the composition under any license" is required. Otherwise, the sample library would be useless for commercial use, even if it was permitted. This is recommended, because it allows users to use the samples for anything, but prevents users from licensing the soundfont under more restrictive or non-free licenses.
When publishing to Musical Artifacts with samples which already exist, choose a license which is compatible with the license of the source items, or choose "Various Licenses"!
Place a license text in an SF2 file. If this is done, the license on the soundfont itself overrides the license on the website which hosts the soundfont.
Create compilations of many different freely licensed soundfonts into one soundfont (All sources must be attributed).
You can:
Use a permissive license, as long as it is compatible with the GPLV3. However, please note that others can use your samples to create a non-free soundfont!
Relicense free samples under non-free licenses (Examples include: "Non-commercial use only", No-derivatives, CC Sampling (Plus), the "Philharmonia restriction" or samples with "no license").
Use CC-BY-SA 4.0. If you use CC-BY-SA 4.0, it will not be accepted into Stardream projects. However, CC-BY-SA 4.0 samples may be accepted into Enchant!.
Use CC-BY 3.0. Use CC-BY 4.0 instead.
Use WTFPL. Just use CC0.
Use CC-BY 2.5 or older versions of CC-BY. Use 3.0 or 4.0 licenses instead (4.0 is recommended), as these are DFSG compatible.
Use CC-BY-SA 3.0. This is incompatible with the GPL. Use CC-BY-SA 4.0, or GPLV3 with exception instead. Note that CC-BY-SA 4.0 samples will not be accepted into Stardream projects!
Attempt to relicense copylefted works (GPL, CC-BY-SA or anything with something which is similar to "Derivatives must be licensed under the same license as the original samples") to an incompatible license.
License GPL'd content (with or without exception), as CC-BY-SA.
License samples under free licenses which are GPL-incompatible. (An example is the "4 clause BSD" license).
Record from an existing sample library. In this case, the samples made have an "All Rights Reserved" copyright to the original sample library creator, and cannot be used! Remember, even though most variants of the BSD license have "All Rights Reserved", they are still free. 
Use commercial sound libraries or video game samples. The sole proprietor of such commercial sound libraries is the creator. In the case of video game samples, the three proprietors of the samples are the composer of the video game's soundtrack, the game developer and the game publisher.
Create compilations of existing soundfonts without crediting the original sources. We cannot determine sources of samples easily, so do not do it!
On Musical Artifacts, ignore the license field. This is when non-free items are falsely licensed under CC-BY 3.0 or other free licenses. Choose "grey area", "All Rights Reserved" or the appropriate CC license for non-free items.
7. Do you have the instrument that you want to make a sample library of? If yes, go to 8. If no, go to 9.
Record an instrument which you have.
Buy an instrument which you want to make a sample library of.
8. Record your instruments. When you've done, go to 5.
Record at 16 bit sample depth or higher. Examples: 16 bit, 24 bit, 32 bit (if you're an audiophile)
Record at 44100Hz or higher. Examples: 44100Hz, 48000Hz, 96000Hz, 192000Hz, do you need anymore than that?
Record stereo samples in most cases (except electric instruments with only a mono output, some synth basses and some synth leads). Some electric instruments have stereo pickups, sample from both channels if possible. If it is dual mono, mix all samples to true mono, as it saves space.
Record all notes playable by the instrument (if space is an issue, every three semitones, six semitones or octave can be done, just make sure that there is as little noticeable sound change between samples as possible). As a guideline, use at least 3-4 samples/octave for acoustic instruments and at least 2-3 samples/octave for synth instruments. 
Record different articulations (they may be useful to make different types of patches, like megavoices).
Record samples without any DSP effects (without reverb or chorus). If we need to add any effects, we will add them itself. The only exception is room reverb and ambience.
Record many different dynamics (If this is not possible, filtered velocity layers can be created).
Use LMMS to control a freely licensed synthesiser VST, like Surge, Dexed or even Zynaddsubfx.
Record single notes ("one shot" samples). There are some exceptions, like drum rolls, tremolo strings and more.
If an electric instrument has only a mono output, record in mono. Do not attempt to convert the sound to stereo using DSP reverb.
Collect information about the instrument which is being sampled. This is also requested by FreePats. Read the FreePats guidelines at How to Contribute, and How to Record an Instrument
Record round robin samples. They won't be usable in SF2, however it is always better to make such samples available.
You can:
Record using more than two microphones. Please label the location of each of the microphones, as the result will be converted to stereo.
Use a single microphone for stereo recording. There is no difference between using two mono microphones and a single stereo microphone in terms of sample quality.
Record at a non-standard sampling rate or bit depth. As long as it is above 44100Hz and 16 bit, it's fine! 
Record at 8 bit sample depth. This is not high enough quality for Enchant!. Also, an 8 bit sample takes as much space as a 16 bit sample in soundfonts, as soundfonts can only support 16 or 24 bits.
Record at 32000Hz or lower. This causes a muffled sound, and may make it difficult to establish sample loop points.
Record mono samples (unless for electric instruments with only mono outputs, some synth basses and some synth leads). Note that electric grands have two outputs, but are dual mono unless you engage the tremolo.
Record dual mono samples. This is where samples are saved as stereo (2 channels), but each channel has exactly the same sample data in it as each other. This is a waste of space, and it takes time to remove the duplicate channel.
Record electric instruments through an amplifier. Not using an amplifier increases the variations of the electric instrument sound which can be made using a virtual amplifier software like Guitarix, however this only runs on Linux! If you are running Windows, Audacity distortion or LMMS effects may be used.
Add DSP effects. If DSP effects are not used in the samples, we can add the DSP effects ourselves, increasing the amount of variations available from the sample set.
Use Guitar Rig. We can use virtual amplifier software like Guitarix/LMMS to amplify unamplified guitar samples.
Skip so many notes in recording that there are major sound changes between samples. 
Use virtual MIDI cables on Windows, as they are non-free. There are many virtual MIDI cables available for Linux. If you must use Windows, a MIDI or USB-only keyboard (the latter is not recommended) can be purchased.
Avoid recording loops. Single notes/"one shot" samples are much better in terms of flexibility, because they can be assembled into loops. If loops must be done, remember to record in many different tempos. 
Use DSP reverb to convert a mono output from an electric instrument to stereo.
Record chords. Just don't do it! Instead, record single notes. If we need chords, we can create them from multiple samples, and re-record the result. Chords are far less useful than single notes.

9. If no samples exist and you do not have the instrument, unfortunately the instrument is considered "sampleless", that is to say, no samples exist. You can resynthesise the instrument with a virtual analog or FM synthesiser. Examples include Dexed, Surge and Zynaddsubfx. Once you have finished resynthesising the instrument, go to 5. 
Use as many features as you want (except features using already existing PCM samples) to create a realistic instrument.
Use real hardware analog/digital synthesisers or virtual analog/digital synthesisers. FM can also be used.
If this is not realistic enough, you can combine subtractive synthesis (the method which most analog and virtual analog synthesisers use) and FM synthesis (used in digital synthesisers), with a freely licensed PCM sample attack (examples include strings spicatto and brass staccato). This is called "linear arithmetic" synthesis. Remember, always use realistic and freely licensed PCM sample attacks, NEVER ones which have came out of something like a "Roland D-50".
Make your own wavetables for the wavetable functions of synthesisers.
If using software, try to use a specific (and libre) synthesiser. For Linux, Bristol Synthesisers are recommended.
You can:
Use a generic synthesiser like Surge or ZynAddSubFX. These are suitable for simulation of all synthesiser types.
Use Synister for instruments which are not bass sounds. This software synthesiser is unsuitable for Enchant! because even though it is a powerful software synthesiser, and it is freely licensed, there is a massive issue with aliasing, therefore sounds are not as good.
Use the preset wavetables of the wavetable function of any synthesiser, even in libre synthesisers like Surge. The wavetables may not be under the same license as the program itself. It is okay to use custom made wavetables.
If you have a Rompler or sample based synthesiser, DON'T sample from it, even if you've made your own patches. The samples which your patch is based on is copyrighted to the manufacturer. Therefore, both you and the equipment manufacturer own copyrights to the patch, and so it is not possible to license the samples under a free license.
If you have a "linear arithmetic" synthesiser (one of the most common LA synths is the "Roland D-50"), DON'T use the sample portion of the synthesiser. The samples are copyrighted, and both you and the manufacturer own the copyrights. "Super LA" used in the "Roland D-70" is purely PCM samples (not related at all to the D-50's synthesis system), so do not sample from there at all, as the D-70 is a rompler.
10. Your sample library is done!

The licensing matrix:
Public domain (CC0) samples can be released under any license, free or non-free, as well as be released into the public domain. They can be used in a proprietary soundfont.
Samples under a "permissive" license (MIT, BSD, Apache, CC-BY) can be released under the same license as the original sample, any copyleft license or any non-free license. They can be used in a proprietary soundfont.
Samples under a "weak copyleft" license (LGPL), can only be released under the same license as the original sample, however it can be used in a proprietary soundfont. 
Samples under a "strong copyleft" license (GPL, Artistic License, Free Art License, CC-BY-SA) can only be released under the same license as the original sample. They cannot be used in a proprietary soundfont.
Samples under a non-free license (any license that prohibits commercial usage, commercial distribution, creation of derivatives of the samples or redistribution of the samples, examples are CC Sampling Plus, CC-BY-NC, CC-BY-NC-ND or proprietary EULA) may only be used under the conditions shown in the license, but it is not recommended to use such samples in a sample library, as they place down restrictions on what end users can use them for.

Sample moderation will be performed before samples are added to Enchant!. All samples will be checked for these:
  •  Are the samples original? (This means if the samples are not from third party, non-free, commercial or unknown sources)
  •  Is the sampled instrument sampleless/restricted? (Do free samples already exist)
  •  Are the samples in a lossless format? (Lossy formats are not acceptable due to the quality loss incurred by lossy formats)
  •  What license are the samples under? (Are they GPL compatible? Examples of free but incompatible licenses include the 4 clause BSD license. Samples under a "BSD license" without the number of clauses given cannot be used either, as 4 clause is default)
  •  Do the samples sound better than the existing samples? (We will take into account the amount of detail of the sampling procedure)
  •  If resynthesised, which synthesiser is used? (A free software synthesiser must be used. No Native Instruments or Arturia please.
  •  What is the sample rate and bit depth? (The minimum is 44.1khz 16 bit)
  •  Is it mono, stereo or surround? (Instruments cannot be mono, with a few exceptions)
  •  How large are the samples? (Samples which are too large may have to be abridged in order to be used in Enchant!)
  •  Are there any round robin samples? (Even though they can't be used for their original purpose in soundfonts, they may be usable to make different variations of instruments. Therefore, this is not strictly necessary) 

A "Philharmonia Restriction" is the condition which is imposed on the (UK) Philharmonia Orchestra samples, in addition to CC-BY-SA, which prohibits the use of the samples "as-is". This prohibits conversion to a sample library.

Adapted from these diagrams by Elf of Happy and Love. 
These diagrams are Copyright © 2019, 2020 Elf of Happy and Love. All Rights Reserved.