iPlug2 Forum

Sampler - iPlug2?

I’m new to iPlug2 and coding. My first plugin project I want to create a Sampler Plugin. Can this be done with iPlug2?

Sure you can. I’ve made a few myself. You need to duplicate the IPlugInstrument example and work from there.

Eh Ric. Thanks for the reply! What do you mean by duplicate the iplugin instrument example?? I’m really new to programming. I’m not familiar with much programming terminology. Sorry.

But gad to know I can create a sampler with iPlug and I see you have the experience. How difficult is it ? When it comes to creating a sampler? I’m sure by the third sampler you created the process was easier than the first.

One more question do you know of some tutorials, source code or info that could help me in creating my first sampler plugin ever lol I’m not finding much information on how to really get started with iPlug2.

If you don’t have much experience and you want to make a sampler I’d perhaps recommend you look at HISE or sfizz . IPlug2 is a plugin framework, it doesn’t include much to simplify making a sampler, although it is of course possible

After you install IPlug2 you can go to the Terminal (Command in Windows), go to the Examples folder and execute the duplicate.py script. This is the “getting started” link (on the right there is a link for Windows):

But even before that, I’d suggest that if you don’t have programming experience then you start by learning C++ first. Making audio plugins is probably 99% coding, there’s no way around it. Once you do that you can try to create an Instrument plugin, i.e., a plugin that receives MIDI messages and transforms them into audio.

I personally don’t know how detailed the MIDI functions are in IPlug2 because I like to do it all myself, using my own functions and strutcs, &c. But IPlug2 tackles the most difficult part of all, which is to wrap your programme into a fully working plugin.

When it comes to coding a sampler I’ve found that there’s probably three main methods that you need to concentrate on:

  1. Reading audio files. If the samples you want to play are predetermined then you can get the plugin to read them at startup, otherwise you can let the user open files from their browser.
  2. Process MIDI messages. Here you will be creating and destroying voices, and initialise them depending of the note, velocity, &c.
  3. Fill your output buffer with the sampled sounds according to the voices created on step 2.

I don’t know if this is the best approach but I’ve managed to create the samplers I needed rather quickly.

You helped me out so much! Thanks. The guidelines You layer out make all the sense. Even though I know very little C++ I’m up for the challenge. I never back down from anything. My learning curve has always been… You can’t survive a jungle until you live there. I’m going all in! I’m tired of having all these creations in my mind developed… only to see them years later done 1/4 of the way. I chose to create a sampler as my first project strategically because my 2nd Project is the ONE!

Thanks again I appreciate your help more than you know. I’m sure you’ll be hearing from me again shortly :joy:

1 Like

What deterred me from HISE was JUCE because I don’t like JUCE at all and HISE = JUCE lol I had a JUCE License believe it or not though I’m novice I was making it work. BUT! I began to have the same problems/issues that others who have waaaaaay more experience than me in C++ were having. Then so many in forum said they were leaving juce and I remember before I got the license I was told to steer far away from juce by so many vets in C++ but I just had to taste for myself smh :rofl: Lets just say when it comes to JUCE I’ll take common sense over intelligence any day. You’re going to have problems with learning anything that’s new to you. This is normal. What’s NOT normal is creating something and then delivering it with NO road map. Expecting others to just understand what’s going on in your brain… when you’re the only one that takes residence there lol my ex-girlfriend used to do that a lot. Bad communication skills :rofl::weary:

I remember when I got the license it was just before JUCE 5 was released. Literally every tutorial had Errors couldn’t use anything Lol no lie “Ric” helped me more (the message you can “see below”) than anyone on the JUCE staff and forum board. “Then when I sent them an email to cancel my License they never confirmed saying they indeed cancelled my license” I had to email them for a confirmation. I’m no ones coin or margin. Especially when you have no class and zero tact. So I may not know C++/JUCE like everyone BUT when it comes to business and CARING for people I’m King.

You, (not iPlug2) are why I’ve decided to build here. I deal with sincere, dedicated people not machines. Thanks for your work and I don’t believe in limits so push iplug to what’s not possible :100: