Here four tools I wrote that add some functions to the sample editor. The code is largely inspired from Beatslaughter’s Mixer Utilities and from IT-Alien’s Add/Remove Silence tools, so many thanks to them!
Trim Silence will trim the silent parts at the beginning and/or the end of a sample. The start and end points are calculated using a simple threshold approach, nothing like transient detection, but you can specify different thresholds for start and end, add some fixed margin and make small fades. You can then choose to process the selected sample or all the samples in the current instrument, or all even all the samples of the song. The tool will automatically select the trimmed portion of the sample according to the actual threshold and margin values, so that you can have a preview before processing (without the fades though).
It’s useful for beatslicing : you can chop the samples roughly (or with the beatslicer tool) and then use Trim Silence to automatically do the fine editing on all your slices.
Rename Samples is a small modal window to rename your samples. If you add global keyboard shortcuts for selecting the next and previous samples (this tool adds keybindings for this), you can rename all your samples without touching your mouse.
Save Samples lets you specify a folder, and will save all the instruments samples in that folder, in wav or in flac. You can also choose to save all the samples of your song. The files are named after the names of the samples.
Batch Rename Sample is a tool for renaming samples. It lets you choose a prefix, and a start note, and will then rename the samples of the current instrument using a “prefix + note” pattern. The first sample gets the first note you specified, and the next ones go up by a half tone for each sample.
I know this is really a very specific function, that most of you will never use, but since I already wrote it for my needs, I share it!
As always, all comments and bug reports are welcome!
EDIT : uploaded version v0.7, which works only since RC3. Please make sure you’re using the latest version of renoise.
here is what i get when try to install this (renoise 2.6rc1)
'C:\Users\atx\AppData\Roaming\Renoise\V2.6.0\Scripts\Tools\com.bystrano.SampleUtilities.xrnx\' failed to load.
Please remove this tool or contact the author (bystrano) for assistance...
.\Classes/TrimSilence.lua:5: module 'ProcessSlicer' not found:
no field package.preload['ProcessSlicer']
no file '.\ProcessSlicer.lua'
no file 'C:\Program Files (x86)\Renoise 2.6.0rc1\lua\ProcessSlicer.lua'
no file 'C:\Program Files (x86)\Renoise 2.6.0rc1\lua\ProcessSlicer\init.lua'
no file 'C:\Program Files (x86)\Renoise 2.6.0rc1\ProcessSlicer.lua'
no file 'C:\Program Files (x86)\Renoise 2.6.0rc1\ProcessSlicer\init.lua'
no file 'C:\Users\atx\AppData\Roaming\Renoise\V2.6.0\Scripts\Libraries\ProcessSlicer.lua'
no file 'C:\Program Files (x86)\Renoise 2.6.0rc1\Scripts\Libraries\ProcessSlicer.lua'
no file '.\ProcessSlicer.dll'
no file 'C:\Program Files (x86)\Renoise 2.6.0rc1\ProcessSlicer.dll'
no file 'C:\Program Files (x86)\Renoise 2.6.0rc1\loadall.dll'
no file 'C:\Users\atx\AppData\Roaming\Renoise\V2.6.0\Scripts\Libraries\ProcessSlicer.dll'
no file 'C:\Program Files (x86)\Renoise 2.6.0rc1\Scripts\Libraries\ProcessSlicer.dll'
stack traceback:
[C]: in function 'require'
.\Classes/TrimSilence.lua:5: in main chunk
[C]: in function 'require'
main.lua:8: in main chunk
No worries m8, great stuff! I like the possibility to save all samples especially, though expected this option to appear in the right mouse click context area of in the instrument list
Also, I just tried to save samples out of an instrument to C:\TEMP , but it saved the samples in C:\ and ‘TEMP’ was put in front of the sample-names!
You won’t have this problem if you enter the "" after C:\TEMP, but you’re right, the tool should automatically add it when its omitted. I actually wanted it to be a browse directory panel provided by the OS, instead of text input, but renoise API only supports this for files, not directories…
And I will add a menu entry for the instrument list, I think it should be everywhere you can find the “Save Sample” option.
Ah, I see… I’m on a windows xp computer here and in the explorer window, directories don’t end with a \ …didn’t know this was customary, but I guess it would be cool if your script could add one automatically when omitted.
Nice!
(off-topic: Renoise has a ‘delete unused samples’ & ‘delete unused instrument’ option in the right mouse click context window in the instrument list → might be cool to have the option to save these samples like in Bystrano’s script)
I just uploaded a new version. I added some menu entries as suggested by Jonas, and fixed the Save All Sample tool, which would crash when given a non existing folder, among other weird stuff… It now prompts for folder creation and creates one or some if wanted. That would need some testing though, especially on Windows, since I don’t have a windows computer to test it.
Process/OK/Cancel buttons could use height:
local DIALOG_BUTTON_HEIGHT = renoise.ViewBuilder.DEFAULT_DIALOG_BUTTON_HEIGHT
Should we probably add a shortcut like “vb:dialogbutton” to make that easier?
Also a few buttons use:
pressed = function() --[[do something]] end
but should use
“notifier” or “released” instead of “pressed”
-> react on mouse button releases and not hits.
I just uploaded a new version of this tool.
TrimSilence should now be more responsive, and work well with big samples and high thresholds (well it still can take a lot of time…), and Save All Samples now has a browse button, as introduced in RC2.
Yeah that would be great! It’s a bit annoying to write all that stuff just for having a default behaviour…