deciding on sampled instrument file formats and workflow

If you are new here check this forum first, your question may have been answered.
RELATED
PRODUCTS

Post

Hi, I'm just getting started with creating some sampled instruments. (I play accordion and there seem to be very few software accordion instruments, so I'd like to make one.)

I'm on a Mac. I've used Logic Pro a little and got something promising using Quick Sampler. Now I'd like to make an instrument with multiple samples. It seems like this will involve recording some audio where I play a lot of notes and then chopping it up into a lot of small files. I need to decide how to record it and chop it up.

Logic Pro's full Sampler is intended for multi-sample instruments, but I don't like the UI all that much and don't really get the workflow. It doesn't have recording built in like Quick Sampler, and I also ultimately don't want my software instrument to be tied to Logic Pro, because I'd like to share it for free as a SoundFont or SFZ file and have an opportunity to use it however I like. (Sforzando seems promising?) I don't see obvious options for converting Logic Pro EXS files into something else? It seems to be a proprietary dead end.

I also tried recording using Logic Pro's audio track type, and the editing is confusing enough that I'm not inclined to use it unless I can see how it's actually good for this sort of thing.

I have heard of Kontakt but not tried it. It seems pricey and also uses a proprietary file format. Is it another dead end?

Going back to the beginning, I'm quite comfortable with Audacity and would just as well use that for the actual recording, except that after chopping off one sample, I'd like make sure that I can loop it, and it doesn't seem to know about loops, or at least not about saving the loop as part of the sample file. (This seems to be possible in theory with aiff files, but I don't know how widely supported the "Instrument Chunk" is in that format. I can find nothing saying that Audacity knows about it.)

So, how do I put this together? What's a good way to create a directory of nicely named sample files, and then define an instrument to try it out, so I don't end up stuck in one application? I'd rather not edit loop offsets in an sfz file by hand if there's a better way.

Post

Kontakt 6 and later closed the format completely though samples can be left unencrypted. EXS can be converted to other formats with Chicken Systems Translator. It's pricey but if you send me the EXS I'll convert it for you. Kontakt used to be able to import EXS but I don't think 6+ can any longer. And you'd be converting to a closed format anyway.

SFZ is the most open format and support for opcodes varies, though you should be able to rely on envelopes, multisamples, and keyswitches/articulations. See https://sfzformat.com/ for the most complete information. There are some GUI editors but I personally find it easier to use a good text editor. Sforzando is good to test in, it's the closest to a reference implementation. Note it converts it internally to Plogue's ARIA format but this doesn't affect anything else in any way.

As for recording individual notes, that is one of the most grueling parts. It helps to very organized. Write down a plan of what notes you are recording, how you will name the files, etc.. The filename depends on the nature of the instrument. Velocity, round robins, etc.. So it could look something like acc-036-127-03.aif. So that would be MIDI note, target velocity, and round robin number. Make sure you zero-space so it can be processed in alphabetical order.

Then it's recording and splitting and saving files with the filename. Personally I use REAPER which makes it really easy. I can Dynamic Split the recording into individual note items. Then I use a rename tool (ReaNamer) to programmatically name the items with incrementing values. I use MIDI note to make it easy for me. Then I can render items and use the item name for the filename via wildcards. When I sample a hardware synth it's even easier. I have MIDI notes to trigger it and regions already defined. Then I render using a region render matrix. If you use some other tool it will likely be more painful.

You know what's more grueling than that? Finding and creating good loop points. Sound Forge has a really good loop point tool but it's a lot just for that purpose. Endless Wave is free and is available on Windows and Mac. https://www.kvraudio.com/product/endles ... ern-bojahr

SFZ needs to know the loop point start and end samples even if loop info is embedded so make sure you record that somewhere so you can copy-paste into the SFZ file. I use Notepad++ since it has a column mode that makes pasting the info in easy but it's Windows-only.

Post

skybrian wrote: Tue Aug 23, 2022 5:04 am I have heard of Kontakt but not tried it. It seems pricey and also uses a proprietary file format. Is it another dead end?
It is pricey ($400, though it's on sale now for $200 and can be bought for less with a cross-grade deal) and making an instrument to it I believe (not sure) is also. And in many ways IMO it sucks. Not a fan. That said, making an instrument for Kontakt (if you insist on making an instrument that has to be played in a sampler) will I think reach a larger audience than SFZ or any other sampler format.

Post

Thanks for the advice!

> if you insist on making an instrument that has to be played in a sampler

I'm not insisting on anything yet. Is there an alternative I should be considering?

Maybe I'll learn Reaper later, but to get started, I'm using Audacity for recording and chopping up samples and Logic Pro for making a sampled instrument to try out the samples. (I may end up redoing the second part when I make an SFZ file later.)

A tip for anyone who comes later: Audacity has a labels feature that makes it a little easier to create the files. I can select a region of the recording and use Command-B to create a label, and give it the name of the file I want to make. (I also use Amplify to normalize the volume.) When everything is labelled, it has an "Export Multiple..." menu item that will create all the files at once in a folder. I also keep the Audacity project file as a record of where the samples came from.

Post

@yellowmix: Good article! :tu:

But one point is wrong:
yellowmix wrote: Tue Aug 23, 2022 6:56 am SFZ needs to know the loop point start and end samples even if loop info is embedded so ...
SFZ, for instance Sforzando, automatically sees embedded loop points and plays
the samples correctly.
free mp3s + info: andy-enroe.de songs + weird stuff: enroe.de

Post

enroe wrote: Fri Sep 02, 2022 3:00 pm But one point is wrong:
yellowmix wrote: Tue Aug 23, 2022 6:56 am SFZ needs to know the loop point start and end samples even if loop info is embedded so ...
SFZ, for instance Sforzando, automatically sees embedded loop points and plays
the samples correctly.
That's great, but not all SFZ players will do this. While we're on the topic, Sforzando has some extra opcodes you cannot count on existing on other SFZ players (sfzformat site notes which ones). You can require Sforzando specifically but if you want to make it more accessible you'd want to put those loop points in or at least warn people so they don't think your instruments sound weird when it doesn't.

Not sure if you're aware of other SFZ players. I target Alchemy, MSoundFactory, Falcon (since I can process further/layer). If it loads on all of them then I consider it a good baseline. Others to possibly check: Synthmaster 2. I'm forgetting a bunch of others. Oh, DecentSampler is basically SFZ with more metadata for images and zipped.

Post

Endless Wave seems like a reasonable way to put the loop points into the sample files. But I'm wondering if there's a good way to automatically extract them out into a chunk that can be pasted into an SFZ file? I have been copying each number by hand. It's not too bad for the limited number of samples I've been using, but a bit annoying.

By the way, for anyone else looking to set up a workflow, Pianobook has a "how to sample" procedure that seems pretty good; I think their strategy of taking samples using the circle of fifths is a reasonable compromise. You'll have to adapt it if you're not sampling a piano, though. https://www.pianobook.co.uk/resources/how-to-sample/

Post

skybrian wrote: Fri Sep 02, 2022 6:40 pm Endless Wave seems like a reasonable way to put the loop points into the sample files. But I'm wondering if there's a good way to automatically extract them out into a chunk that can be pasted into an SFZ file? I have been copying each number by hand. It's not too bad for the limited number of samples I've been using, but a bit annoying.

By the way, for anyone else looking to set up a workflow, Pianobook has a "how to sample" procedure that seems pretty good; I think their strategy of taking samples using the circle of fifths is a reasonable compromise. You'll have to adapt it if you're not sampling a piano, though. https://www.pianobook.co.uk/resources/how-to-sample/
Most (if not all) SFZ sample players read the loop data straight from the Wav file. Although you "can" manually add the loop points in an SFZ, most SFZ players can't use that opcode. In other words, you shouldn't have to manually add the loop points into the SFZ file. :)
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

Post

yellowmix wrote: Fri Sep 02, 2022 5:52 pm Not sure if you're aware of other SFZ players. I target Alchemy, MSoundFactory, Falcon (since I can process further/layer). If it loads on all of them then I consider it a good baseline. Others to possibly check: Synthmaster 2. I'm forgetting a bunch of others. Oh, DecentSampler is basically SFZ with more metadata for images and zipped.
Hmm, you're right.

I'm referring to the current, advanced SFZ samplers:

1. Sforzando
2. sfizz
3. Decent Sampler

These recognize loop points embedded in wav automatically
and play them accordingly.
free mp3s + info: andy-enroe.de songs + weird stuff: enroe.de

Post

The problem with embedded WAV loop points is that if you convert the samples to FLAC it's easy to lose the loop data. I think most converters just discard it without telling you. You have to use the --keep-foreign-metadata switch, which is experimental.

But at least Sforzando and Sfizz support FLACs with embedded loop points, so there's that.

Still, I think it would be better to specify the loop data in the .sfz file. That way you don't have to worry about audio format shenanigans.

audiojunkie wrote: Fri Sep 02, 2022 6:48 pm Although you "can" manually add the loop points in an SFZ, most SFZ players can't use that opcode.
That just sounds bizarre to me. Loops are such a basic feature that I would expect every sampler to support that opcode.
I know that Sforzando does and IIRC Sfizz does too. I don't know about others, though.

Post

As strange as it sounds, of all of the sample players out there, I think only the two you mentioned support the actual loop opcode. It was bizarre to me too. I’m just glad these sfz parsers/players pull the metadata from the sample file. But it’s not a bad thing altogether—as long as the metadata can be read, there shouldn’t be a problem. 🙂
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

Post

Along with Sforzando, I use the SFZ Player [1] for VCV Rack and it does support the loop_start and loop_end opcodes. So, good enough for my purposes. (So far I've been unable to get Sfizz to work on my machine.)

I see that along with loop_start and loop_end, there are also aliases for them: loopstart and loopend. And then there is loop_mode and loopmode, which I didn't set explicitly, but it seems to work automatically.

For the players that seem not to support loop opcodes, maybe they would work if you used the right combination?

[1] https://library.vcvrack.com/squinkylabs ... ylabs-samp

Post

audiojunkie wrote: Wed Sep 07, 2022 4:08 pmI’m just glad these sfz parsers/players pull the metadata from the sample file. But it’s not a bad thing altogether—as long as the metadata can be read, there shouldn’t be a problem. 🙂
Right. Maybe it's not a problem after all, just something to keep in mind when converting samples.

skybrian wrote: Fri Sep 02, 2022 6:40 pmEndless Wave seems like a reasonable way to put the loop points into the sample files. But I'm wondering if there's a good way to automatically extract them out into a chunk that can be pasted into an SFZ file? I have been copying each number by hand. It's not too bad for the limited number of samples I've been using, but a bit annoying.
I just remembered that if you import a SF2 into Sforzando it converts it to SFZ and creates loop points data in the .sfz file. So you could get your loops extracted this way, by first converting your stuff to SF2. But it looks like the samples are all joined into a single .wav file in the end, so IDK if this is of any use. :shrug:

Post

skybrian wrote: Wed Sep 07, 2022 6:29 pm Along with Sforzando, I use the SFZ Player [1] for VCV Rack and it does support the loop_start and loop_end opcodes. So, good enough for my purposes. (So far I've been unable to get Sfizz to work on my machine.)

I see that along with loop_start and loop_end, there are also aliases for them: loopstart and loopend. And then there is loop_mode and loopmode, which I didn't set explicitly, but it seems to work automatically.

For the players that seem not to support loop opcodes, maybe they would work if you used the right combination?

[1] https://library.vcvrack.com/squinkylabs ... ylabs-samp
Cool!! I don’t think VCV Rack is listed on the sfzformat.com webpage. We need to let DSmolken know so that he can add it to the list of players. :)
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

Post

Over all, despite its idiosyncrasies (all formats have them), I truly believe SFZ is the best and most supported format outside of the proprietary Kontakt format. Almost all SFZ players support a common base of essential opcodes. If a person wants to build a library of instruments that are never likely to go away or die from lack of support, this open format is truly the one to use. I’m currently trying to compile an essential list of basic opcodes that are fully compatible across the majority of sfz players. My ultimate goal is to have a list of opcodes, that if a developer sticks to, there should be no compatibility problems with with using these sfz instruments with any of the common players. For example: Linuxsampler, Sfizz, Liquidsfz, sfzero, Sforzando, etc.

Some developers develop for sforzando specifically. I want to be clear that there isn’t a problem with that—only Sforzando (and maybe a couple of other sfz players) support all of the sfz opcodes. Those developers differentiate themselves from other developers’ products by offering these advanced features. But instruments developed with these features are limited to Sfz players that support these features. They won’t work in a cross compatible way that instruments developed specifically for common opcode support can. The common opcode support is where my interest lies. 🙂
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

Post Reply

Return to “Getting Started (AKA What is the best...?)”