[SOLVED] How do I set a shortcut for "Insert a new sample"?

i’m wondering what the shortcut for this is? if there’s no shortcut, is there a way of doing it from the LUA API?
Screenshot 2024-04-03 at 15.04.04

image
Should do the trick as long keyboard focus has been given to the sample area

Seems ‘Insert’ keybinding is bound to the widget in the child frame.
Yes you can add keybindings to tools:

** renoise.tool():add_keybinding(keybinding_definition_table)

** Renoise Lua API

edit

solved it.

renoise.song().instruments[renoise.song().selected_instrument_index]:insert_sample_at(1)

is the way of inserting a new sample at.
thanks, @Jek

1 Like

While not personally interested in Renoise LUA. Something like this perhaps.

I would try Retrieving and Printing the several ‘keybinding_definition_tables’.
Then use the ‘add_keybinding’ Method to create the Callback Function.

i have it working rn:

function addSampleSlot(amount)
for i=1,amount do
renoise.song().instruments[renoise.song().selected_instrument_index]:insert_sample_at(i)
end
end

renoise.tool():add_keybinding{name="Global:Paketti:Add Sample Slot to Instrument", invoke=function() addSampleSlot(1) end}
renoise.tool():add_keybinding{name="Global:Paketti:Add 84 Sample Slots to Instrument", invoke=function() addSampleSlot(84) end}

one creates one slot, one creates 84 slots (that’s the max that drumkit apparently wants to have…

it’s better to have a global shortcut that works everywhere. as i do now, thanks y’all for the help! :slight_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.