Put a bunch of your own samples into a convenient “Instrument”

So this program does run on my PC just fine, but I’m too impatient to figure out the UI. It seems to want me to specify three different folders? Could you tell me how to use it? Or, alternatively, if you feel like it you can build my c2 branch which I just updated to load absolute paths. Although I’ve only tested it with windows paths…

I built the c2 branch on my mac and it still doesn’t play anything with an absolute path. If you want to try my tool, just click the plus sign to add a source folder, then click the destination folder button to set a folder where the sfz will go, the click the big Get random samples now! button.

also the log msg says “could not get play info pitch [number] vel64”

Ok, I’ll need to test on a Mac. I assume the absolute paths start with a forward slash on a Mac? Or do I need to handle the home squiggle?

And I’ll try your tool again. Thx. Oh, and could you post a line of the sfz? Like one region or something?

For mac testing I have the borrow my wife’s computer. May not get to it today, but I will over the weekend.

update: oh my! my parser gets very confused by forward slashes. I think I’ve been lucky so far the most SFZ are made of PC, so they tend to have ..\foo\x.wav rather than the equally valid (to me anyway) ../foo/x.wav because even that would confuse my parser (well actually my lexer, but same thing). Glad you helped me find that!

This new test should not have failed :wink:

static void testLexMacPath() {
    auto lex = SLex::go("sample=/abs/path.wav");
    assert(lex);
    assertEQ(lex->items.size(), 3);
    assert(lex->items[2]->itemType == SLexItem::Type::Identifier);
    SLexIdentifier* ident = static_cast<SLexIdentifier*>(lex->items[2].get());
    assertEQ(ident->idName, "/abs/path.wav");
}

If you feel like trying again it may work. But it’s cool if you don’t feel like it. I’ll check over the weekend.

It works!!! Thank you for fixing that! Now I can make random weird sfz files… :grin:

Oh, cool! thanks for helping out. Maybe you should make a separate post for your program. I see a bit of chatter around about various modules that let you play the contents of a folder. Seems there is some interest in that. thanks again for finding this issue. I’ll bet there are a few SFZ out there that use forward slash. Which I was interpreting as a comment :wink:

update - oh, I guess I need to get a fix out before your program will work :wink:

At the risk of incurring The Wrath for discussing another piece of software, I will offer that I have found its ability to convert Kontakt libraries a bit less reliable. Also, it cannot read a library built for Kontakt 6+ because they started encrypting them.

I think the moderators would agree that it’s ok to talk about other software that works so closely with VCV. At least I’m going with that assumption.

re encryption: yes, you are going to find that a LOT, esp with the commercial libraries that cost a lot of money. It looks to me like sometimes they make a custom Kontakt player mainly as a form of copy protection. At least these libraries a usually obviously labeled as only paling in kontakt.

As far as conversions - are you using the venerable chicked converter? I suspect that many of these conversion will have the same problem I have with Pianobook. The instruments are just too complicated for my simple code to understand.

The thing I am seeing most often that causes me problems are crossfades mapped to MIDI continuous controllers. Ideally I would like to implement that, but as a shorter term step I want to at least pick a more plausible set of regions and throw away the others. My current logic for figuring out what to do when multiple regions (samples) that play at the same time is… I was going to say “a clever heuristic”, but “dumb” is probably more accurate.

You’re exactly right – the biggest hurdle is that complicated things do not necessarily translate well to simpler things. Or in this case, sampler things. (I’ll show myself out.)

LOL. but yes. Hopefully the next version of SFZ player will do a better job.