New Tool: Sample Knife

The Sample Knife is bunch of tools for cutting in the sample editor.

The extension includes:

  • A status of your selection length in seconds (press ! to refresh sadly)
  • Four buttons for nudging selection without changing it’s length.
  • Fast buttons ("<<" and “>>”) will skip selection start to end or end to start.
  • Slow buttons will nudge by a given amount of samples (1000 default - set in the valuefield above).
  • Three basic cutting options:
  • Hard Cut - Cuts the selected part to a new sample and leaves the unselected parts joined.
  • Cross Cut - Cuts from start of sample to selection end to a new sample. Leaves a copy from selection start to end of sample.
  • Split Edges - Cuts from start of sample to start of selection to a new sample. Deletes selection. Leaves a copy from selection end to end of

1341 sampleknife_demo.png

Any ideas and comments would be appreciated.

1 Like

nice one. will try it out. might be useful to combine this one with the beatslicer?

when i read the title, the first thing i thought was ‘random cuts!’. this would ofcourse only be useful on certain samples, but it is a nice feature i think. if you cut a complex drumloop up at random and play with the pieces it can get you some strange and wonderful results.

Great tool, thanks!

If you want to make the selection status update automatically, just add this at the end of the show_main_gui function in gui.lua :
[luabox]
function update_gui()

if not (range == renoise.song().selected_sample.sample_buffer.selection_range) then
range = renoise.song().selected_sample.sample_buffer.selection_range
statustext.text = math.floor((range[2] - range[1])/44.1)/1000 … " sec"
end
end

renoise.tool().app_idle_observable:add_notifier(update_gui)
[/luabox]

Johann also made a selection tool for the sample editor, check it here:

Cut with style! Looks great.

Checks to “renoise.song().instruments[].samples[].sample_buffer.has_sample_data” are missing right now. Tool causes and error when opened on an empty sample.

std::logic_error: 'can not access properties of a sample buffer with no sample data.'  
stack traceback:  
 [C]: ?  
 [C]: in function '__index'  
 [string "do..."]:36: in function <[string "do..."]:35>  
 .\gui.lua:138: in function <.\gui.lua:13>  

And one of my favorite nit picking: renoise.tool():add_menu_entry { name = “Sample Editor:Sample Knife” } -> name = “Sample Editor:Sample Knife…”

A small gui cosmetics proposal: Renoise supports part of the unicode symbol set in its GUI, so you can use text = “◂”, text = “▸” for the buttons.

Planned, yes. But BMPs do the job just fine for now in buttons. Plain black is used as transparency color.

thanks will test this out