Skip to content

paulwellnerbou/sf-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Soundfont creation

This library aims to create a soundfont based on a directory containing sound files (.wav).

Current support:

Planned support:

  • Soundfont 2 sf2 (This will be more tricky, as it is a binary format, as Polyphone is able to convert sfz to sf2, I will postpone this)

Project setup

Creating a project specific virtual environment (recommended)

You can omit this step if you are ok with installing the dependencies system wide and go directly to the next step: Installing dependencies.

virtualenv venv
source venv/bin/activate

or, under Windows:

virtualenv venv
venv\Scripts\activate

Installing dependencies

pip install -r requirements.txt

Run

This will create a file soundfont.sfz alongside the wav files in the given directory.

python main.py sfz <directory-to-wave-files>

Run python main.py --help or python main.py <command> --help, where <command> can be sfz or decentsampler for now, to get the full list of arguments.

Automatic note detection and mapping of samples

The given samples are scanned for note names (A0 to C8). If a note name is found in a filename of a sample, the midi note for this sample will be set automatically.

In addition to that, in case of missing samples in between for certain notes an automatic distribution is calculated, so that all notes between A0 and C8 are covered.

If there are two samples for the same note available, a round robin/random change is assumed.

TODO and resources

  • Make automatic distribution over all midi notes from 21 to 108 optional, and add an option to configure the highest and the lowest, ideally relative to the hightest and lowest pitch of the samples
  • Detect pitch automatically (for melodic instruments at least), using https://pypi.org/project/crepe/

More SFZ Support

The best starting point for SFZ is https://sfzformat.com/.

DecentSampler support

An XML based format developed by David Hilowitz (see https://youtu.be/UxPRmD_RNCY).

  • Create an XML Schema for highlighting and autocompletion
  • Implement DecentSamplerWriter
  • Add options for UI (cover)
  • ...and effects

SF2 Support

This will get tricky, as this is a binary format with not too much examples. There are a few applications reading or even writing sf2 out there, at least at a very basic level. But as Polyphone is able to convert sfz to sf2, I will postpone this.

About

Soundfont creator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages