Here is a current WIP including impulse style octave editing, pgup/dn navigation, and set selection to current instrument.
[luabox]
â Thanks to suva for the function per octave declaration loop 
â http://www.protman.com
for oct=0,9 do
renoise.tool():add_keybinding {
name = "Pattern Editor:Impulse:Set Note to Octave " ⌠oct,
invoke = function() Octave(oct) end
}
end
renoise.tool():add_keybinding {
name = âPattern Editor:Impulse:Set Selection to Current Instrumentâ,
invoke = function() SetInstrument() end
}
renoise.tool():add_keybinding {
name = âPattern Editor:Impulse:Jump Lines Upâ,
invoke = function() Jump(-1) end
}
renoise.tool():add_keybinding {
name = âPattern Editor:Impulse:Jump Lines Downâ,
invoke = function() Jump(1) end
}
renoise.tool():add_keybinding {
name = âPattern Editor:Impulse:Shrinkâ,
invoke = function() Shrink() end
}
function Shrink()
end
â Emulates Impulse Tracker style pgup/dn where it locks the cursor within the pattern boundaries, and jumps more logically from the last row when pgup.
function Jump(Dir)
local new_pos = 0
local song = renoise.song()
local lpb = renoise.song().transport.lpb
local pat_lines = renoise.song().selected_pattern.number_of_lines
new_pos = song.transport.edit_pos
new_pos.line = new_pos.line + lpb * 2 * Dir
if (new_pos.line < 1) then
new_pos.line = 1
else if (new_pos.line > pat_lines) then
new_pos.line = pat_lines
end
end
if ((Dir == -1) and (new_pos.line == pat_lines - ((lpb * 2)))) then
new_pos.line = (pat_lines - (lpb*2) + 1)
end
song.transport.edit_pos = new_pos
end
â Emulates Impulse Trackerâs direct access to the octave column. Optimally, I use alt+0 - 9. It also obeys edit step and makes for interesting arpeggiations and variations.
function Octave(new_octave)
local new_pos = 0
local song = renoise.song()
local editstep = renoise.song().transport.edit_step
new_pos = song.transport.edit_pos
if ((song.selected_note_column ~= nil) and (song.selected_note_column.note_value < 120)) then
song.selected_note_column.note_value = song.selected_note_column.note_value % 12 + (12 * new_octave)
end
new_pos.line = new_pos.line + editstep
if new_pos.line <= song.selected_pattern.number_of_lines then
song.transport.edit_pos = new_pos
end
end
â Simply adds a shortcut to set the current selection to the current instrument.
â thanks vV and taktik for help using the iterator more efficiently
function SetInstrument()
local EMPTY_INSTRUMENT = renoise.PatternTrackLine.EMPTY_INSTRUMENT
local pattern_iter = renoise.song().pattern_iterator
local pattern_index = renoise.song().selected_pattern_index
for _,line in pattern_iter:lines_in_pattern(pattern_index) do
â will be nil when a send or the master track is iterated
local first_note_column = line.note_columns[1]
if (first_note_column and
first_note_column.instrument_value ~= EMPTY_INSTRUMENT and
first_note_column.is_selected)
then
first_note_column.instrument_value = renoise.song().selected_instrument_index - 1
end
end
end
[/luabox]