This forum is now locked and moved (back) to Plogue's forum
I'm creating an sfz generator for Philharmonia Orchestra...please help?
  • I'm creating some freeware to work with the creative commons Philharmonia Orchestra sample library. 

    So far it indexes all of the instruments, lengths, dynamics, and default pitch from all of the sample files.  It then downloads the mp3 samples and converts them into WAV format, then re-organizes them into a file structure.  Everything gets stored locally into a sqlite database.

    All of this is finished and is working fine:

    Image #1
    Image #2
    Image #3

    I'm feeling a bit frustrated now though when it comes time to generate SFZ's.  I can easily create SFZ files from the raw data since it's all nicely indexed and organized now.  However I'm not sure what a good instrument is supposed to look like, conceptually speaking.

    For a given instrument, I have 1 to N lengths which each have 1 to N dynamics.  There is a 1 to 1 relationship between the instrument's combined length-dynamic and the articulation.  The samples are split out by pitch and also have a 1 to 1 relationship to the instrument's length-dynamic.

    Can someone please explain to me conceptually how this works?  Something basic, like some an exmple of what an XML file or OOP interface of what an actual instrument might look like using the data I've indexed.

    I really want to start making quality instruments from that sample library and give others the ability to do so too.  I have good computer skills; my major shortcoming here is a lack of understanding of sound design theory and terminology.  I want to create a tool that makes it easy to work with this particular sample library by automating as much as possible and making it easy to hand-tweak the areas that require more finesse. 

    My goal here is to reduce barriers to entry for those who are on a limited budget but who lack the tech skills to create sfz files from scratch.

    If someone can just point me in the right direction, I'd be super appreciative.

  • The simplest sfz file looks like this:

    That tells the sample player to trigger a sample called "mySample.wav" (located in the same folder as the .sfz file) on any MIDI Note On event and play it until the respective MIDI Note Off.

    There are sfz opcodes that allow you to restrict when a sample plays.  For example, to limit the velocity range, you use lovel and hivel.  Or to limit the note range, you use lokey and hikey.

    All this and more is documented -- for SFZ 1.0 format -- in a couple of places:

    SFZ 1.0 may well give you everything you need.  If you want to look into what SFZ 2.0 gives you, you can get that from the Official SFZ 2.0 specification in chapter 13 and Appendix of the book “Cakewalk
    Synthesizers: From Presets to Power User – 2nd Edition"
    by Simon Cann. Whilst no official documentation is available online, the LinuxSampler project does have a list of opcodes, which is quite useful:
  • Thanks for the links.  I guess I'll just start throwing optcode spaghetti on the wall to see
    what sticks, and just brute force this thing, since the documentation is
    way too sparse and I don't feel like spending $30 on a book to just
    read one chapter of it.

  • The book is no "how to" guide, either.  You need to sit down an analyse what you're trying to do.  Once you've got the structure in mind, translating to SFZ is very straight-forward usually.  It's seeing the many, many bits of wood for the generally forestry that's the trick.  Based on the structures in your pictures:

    1) For each instrument, issue a <group> section (just to avoid possible complications later)
    2) For each note * velocity:
     a) Issue a <region> section
     b) Issue the lokey, hikey and pitch_keycenter opcodes for the note range and sampled note value
     c) Issue the lovel and hivel opcodes for the velocity range
     d) issue the "sample=relative\path\to\sample.wav" opcode

    Of course, the above doesn't really scratch the surface of the possibilities for controlling what SFZ will do but it will get your mapping produced.
  • I guess what I have is working, it just isn't playing quite right, so I'm still fooling around with opcodes to get it to do the right attack/release

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!