New Plugin: SimSam, a simple (re)sampler based on SFZ

Hello,

Here is my first plugin for the MOD: SimSam, by ēffē

It is a sampler based on SFZ files, which also resamples notes that are not available as WAV, as long as their lower/upper 4th/5th are available.

My initial goal was to fill up the need of having a MIDI piano, for which I’m using the Salamander Grand Piano samples. The ones recorded from a Francis Bacon are also included.

The WAV files have been converted to mono, PCM16 in order to reduce the memory footprint. The padding zeros at the end have been trimmed.

ADSR envelopping is supported, though for the piano samples, the fadeout parameters should be enough. If attack, release and decay are left to 0ms, the sustain level acts as a simple gain and the complete WAV note is played as long as it is ‘on’.

This plug-in depends on libsndfile.

Velocity interpolation is currently ongoing, though the GUI control is already there. The idea is to interpolate the velocity gain based on the ones defined on the SFZ. This is particularly relevant when there are very few velocity groups available (for example, the Francis Bacon piano).

I tested on Linux and on my MODEP setup. I’m still trying to build it for the DUO, which I have, but so far I’ve had some difficulties.

The code is available here: https://gitlab.com/edwillys/simsam

Any feedback is welcome :slight_smile:

screenshot-sfz-player

9 Likes

Currently the WAV files are stored in the same git repo as the code. I’m thinking about putting them in a different one with references to them as individual submodules.

I’ve found quite a few more free piano samples here:

This would take a few GB of flash though. Any ideas on this could be integrated into the MOD, with an option to select which samples to include?

1 Like

Wish i had the technical language and know how to make this a reality

As it is not yet on the plugin store, the only way would be to manually copy the files via ssh to your MOD. It is not hard, but if you’ve never dealt with ssh before it is also not very straightforward. If you’re interested I can try to help.

Wow, this would be huge! To have a high quality piano on the Mod would be incredible. I’m excited for my Dwarf, as I’m sure it can handle the CPU load… I try to keep my Duo at 70%-80% as it starts clipping if there are too many effects.

I cleaned up the repo so that it is no longer bloated with the WAV samples. Now it references them as submodules, which can be updated individually. I added the details to the readme as well. The indexing of the instruments are hard coded for the time being, as there is currently no way to dynamically inform the GUI. If the samples are not present, the GUI will simply show “Failed to load samples…”

And, as a bonus, I added the Steinway & Sons samples based on this link. It was actually a bit painful, as the samples needed quite a lot of filtering and trimming.

Regarding CPU load, it shouldn’t take much actually. It depends on the number of samples that are loaded vs the missing ones that are resampled. The more resampled ones, the higher the load is. Of course the polyphony also plays a role here. I’ll try to build it for the Duo to get the real numbers.

2 Likes

really looking forward to this Ed

This is a very dope plugin!

Just slightly off-topic, but we have sfizz already working. (a great fit for the file handling feature. the plugin does disk-streaming, so memory is kept reasonably low)
I am glad that exists, since the other big/decent sfz player, linuxsampler, would be a pain in terms of licensing.

EDIT: working internally, obviously file handling is not here yet.

1 Like

Nice to hear that sfizz is working!

SimSam is currently not fully SFZ compliant and only supports basic tags. I focused more on the resampling and ADSR. In a near future also the velocity modulation. I’m adding the SFZ features as they deem necessary and am trying to make it simple.

Regarding the memory footprint, that is of course one drawback. To compensate for that, the supported samples are mono 16 bits. For the DUO this might become a bottleneck though, maybe if some reverb and delay is added on top. It might make sense to adapt the SFZ just to load the “base” samples to make most use of the resampling. Streaming directly from the file was not really an option for me as I was testing with MODEP quite a lot and there is reads from the SD card.

2 Likes

LV2 has the capability to have separately bundled presets. So you could just have a folder with the samples and the TTL describing the preset and the plugin it belongs to. If the mod store is set up for it then people can just choose which presets they want to install.

1 Like

Exactly, that is the way it is done now :wink:

2 Likes