New Tool (3.5.4) Delete Unused Samples

Hello everyone!

I often use large multisample instruments in my songs and I needed a way to archive multiple versions of a song but at the smallest size possible. Years ago there was a tool that handled unused samples but stopped working at some point. So, “vibe coding” to the rescue and after lots of testing I thought I might share the tool with the community.

The tool deletes unused samples from the selected instrument or all instruments. Checks note and velocity ranges against the song sequence. Does not change keyzone mapping of remaining notes after deletion. Useful for large multisample instruments.

Tested on Renoise 3.5.4

DISCLAIMER: The tool is made using Claude AI. Feel free to edit and reupload the script if you find any bugs (which is very very likely). Always make a backup copy of your song before testing.

2 Likes

Nice tool!

I discovered one bug: It does not take phrases into account. I have one which is triggered only once, but which plays several of the samples from my instrument.

The same goes for slices. If you don’t play the original sample, but only the sliced ones, it thinks the sample is unused.

Hi Kristian!
I don’t work with phrases and when I use slices, I always render them. That’s why the tool does not work with phrases and slices. This is an updated (and untested) version of the tool that hypothetically scans phrases. You can try this or you can use Claude AI to create your custom version of the tool.
Thanks!

com.tool.DeleteUnusedSamplesCombined (1).xrnx (4.9 KB)

Version 1.3 just added. Now working with phrases and sliced samples. I did some tests myself but since I’m not familiar with phrases, it might not work 100% correctly.

MGDeleteUnusedSamples.xrnx (29.0 KB)

Thanks!

The slicing does indeed appear to have improved, but phrases are still buggy. I’m getting some of them detected, and some of them not, even within the same phrase. I’m not able to really see a pattern though, it seems random which are detected and which aren’t.

I’m probably not gonna spend more time on this. Using the data I got, and manually filtering it, I have reasonably good confidence that I have no unused samples left.

Hi Kristian,
I’m glad you found the tool useful.

Claude AI struggled with managing and detecting sliced samples so these kind of instruments are mostly left untouched.

Unfortunately, I can’t keep iterating the phrase detection algorithm and functionality since I’m not familiar with phrases in general.

As I said before though, you or anyone else can give it a try in refining the tool to properly work with phrases.

Nice tool ! And quite useful for my lazy recording workflow…

Maybe you could add a switch, that the tool only clears the unused samples in the instrument but keeps all the rest. (sample properties, keyzones, sample names,modulation, fx, etc…)

Thanks AQBreee!

Do you mean instead of deleting the unused samples, just clear their contents making them blank and keep names, slots etc?

Exactly.

Try this and let me know, I didn’t have the time to test it properly.

Added the option to “mute” unused samples and an option to rename the samples that were muted with a “[!]” prefix.

mg.delete.unused.v1.4.xrnx (30.2 KB)

1 Like

Seems to work so far.