Hi. I was looking at this (since you suggested I could just modify it so that keyboard shortcuts do *2(double) and *0.5 (halve) to the pattern content).
Got two buttons to work in the Gui, and they do as you would expect (32 -> 64… or 64 -> 32, and processing).
[details=“Click to view contents”] ```
vb:button {
height = 32,
text = ‘Double’,
notifier = function()
valuebox_length.value = adjust_pattern_length(2/1)
resize_pattern(valuebox_length.value)
end
},
vb:button {
height = 32,
text = ‘Halve’,
notifier = function()
valuebox_length.value = adjust_pattern_length(1/2)
resize_pattern(valuebox_length.value)
end
},
Emboldened by this, I thought, if it's this easy to do, a keyboard shortcut will be roughly as difficult.. Well, not quite ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif)
renoise.tool():add_keybinding { name=“Pattern Editor:Pattern:Halve”,
invoke = function()
local valuebox_length = nil
valuebox_length.value = adjust_pattern_length(1/2)
resize_pattern(valuebox_length.value)
end }
renoise.tool():add_keybinding { name=“Pattern Editor:Pattern:Double”,
invoke = function()
local valuebox_length = nil
valuebox_length.value = adjust_pattern_length(2/1)
resize_pattern(valuebox_length.value)
end }
End up getting a
*** main.lua:298: attempt to index local 'valuebox_length' (a nil value)
*** stack traceback:
*** main.lua:298: in function <main.lua:296>
How should the keybinding code be modified so that I can just stop thinking about alt-g and alt-f in schismtracker and just use them in renoise? ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif)