This tool simplifies moving column entries (notes and effects) up and down in the Pattern Editor. Notes can be moved up/down either by 1 step or by 1 line. Effects can be moved up/down by 1 line.
com.pandabot.SuperNudge.xrnx (5.5 KB)
This tool simplifies moving column entries (notes and effects) up and down in the Pattern Editor. Notes can be moved up/down either by 1 step or by 1 line. Effects can be moved up/down by 1 line.
com.pandabot.SuperNudge.xrnx (5.5 KB)
Welcome to the forum and thanks for the script!
Nice work, dude 
Itās funny because I have an almost identical tool that Iāve been tinkering with for ages, just sitting in my own private unfinished scripts collection.
Points for using Death Grips in the video. Hope it doesnāt get flagged for copyright, but I havenāt heard this remix before. One of your own?
Shameless plug of my own unfinished Guillotine remix that I was messing with years ago: soundcloud)
Thanks man 
I took it from here:
Regarding the slow performance you mention in the video, I did take a quick look at your code but itās a bit difficult to track down exactly where some of the bottlenecks might be, simply due to how fractured everything is and broken down into multiple functions across multiple files.
Certainly not a bad way to work necessarily, but it does make debugging a little bit trickier.
I do feel like there probably are a few places where you can trim off some of the fat, though, to improve performance a bit.
For example, in matrix.lua populateMatrixForMovingDown() you have the following line nested within a loop:
local noteColumn = pattern.tracks[trackIndex].lines[lineIndex]:note_column(columnIndex)
Right off the bat, the [] table-based accessors will always be a bit slower than the () function-based accessors, so this change should immediately perform better:
local noteColumn = pattern:track(trackIndex):line(lineIndex):note_column(columnIndex)
Going a bit further, repeatedly looking up the same properties within loops can be improved by taking local references outside of the loop instead, so this:
for lineIndex = selection.start_line, lastIndex do
for trackIndex = selection.start_track, selection.end_track do
for columnIndex = firstColumn(trackIndex), lastColumn(trackIndex) do
if isNoteColumn(trackIndex, columnIndex) then
local noteColumn = pattern.tracks[trackIndex].lines[lineIndex]:note_column(columnIndex)
...
Could be rearranged slightly and improved like so:
for trackIndex = selection.start_track, selection.end_track do
local track = pattern:track(trackIndex)
for lineIndex = selection.start_line, lastIndex do
local line = track:line(lineIndex)
for columnIndex = firstColumn(trackIndex), lastColumn(trackIndex) do
if isNoteColumn(trackIndex, columnIndex) then
local noteColumn = line:note_column(columnIndex)
...
Further still, several things like the first and last columns are being repeatedly checked within the line loop, even though those properties should never change within that context, so we can avoid even more unnecessary lookups hereā¦
for trackIndex = selection.start_track, selection.end_track do
local track = pattern:track(trackIndex)
local firstCol = firstColumn(trackIndex)
local lastCol = lastColumn(trackIndex)
for columnIndex = firstCol, lastCol do
if isNoteColumn(trackIndex, columnIndex) then
for lineIndex = selection.start_line, lastIndex do
local line = track:line(lineIndex)
local noteColumn = line:note_column(columnIndex)
...
And so onā¦
I havenāt actually tried to implement those changes in your code, but hopefully you understand the basic premise behind what Iām getting at.
Can you add support for phrases, too?
@ffx āą² _ą² )āā©ā į¶ į¶øį¶įµįµ§āᵤ
No jk yeah thatās a good idea, I should. However unfortunately it doesnāt seem possible to get the position of the Edit Cursor from the api, so thatās really preventing me from using the Phrase Editor seriously. I put in a request here https://forum.renoise.com/t/the-api-wishlist-thread/29285
@dblue whoa itās much faster now! I implemented some of your improvements and updated the attachment above
whoa itās much faster now!
I just gave the new version a quick try and itās noticeably faster indeed!
Quite surprising what a few simple tweaks can do, eh? ![]()
Glad I could help in some way.
Cheers.
@ffx āą² _ą² )āā©ā į¶ į¶øį¶įµįµ§āᵤ
No jk yeah thatās a good idea, I should. However unfortunately it doesnāt seem possible to get the position of the Edit Cursor from the api, so thatās really preventing me from using the Phrase Editor seriously. I put in a request here https://forum.renoise.com/t/the-api-wishlist-thread/29285
Yeah pandabot, fuck you, too, very kindly. You funny asshole ![]()
just to remind myself how awesome this tool is - allowing us to bind delay column nudge!
Cheers & thanks @pandabot
So this is awesome but doesnāt seem to work on the first step of a pattern, or am I missing something?
edit: oh itās cause there was a note after it lol ![]()
Does anyone know if this tool works on Renoise 3.4.3?
Is this possible to make it work in the phrase editor as well?
API limitations make it impossible. thereās not enough control over phrases in the API, unfortunately. maybe later?
SuperNudge is one of the tools I am using all the time. This hasnāt been updated since a long time, and since Renoise 3.5 there have been additions to the api. And i saw that this is solving the issue that @esaruoho mentioned in the last post here.
As I work a lot in phrases editor, so I made HyperNudge, a script that works both in the pattern as well as in the phrase editor. In the phrase editor you can now nudge up/down by one line, one step, and you can also nudge all columns together up or down.
Also added Midi Mapping. So when you open the midimap panel in Renoise, all the nudge commands appear in there as well and are assignable to a midi controller.
Note: Pattern and phrase nudging are separate midi commands. you see them in the midi list. It is easy to assign the wrong one and then thinking it does not work (talking from own experience).
Credit to the SuperNudge creator obviously, thatās why Iām posting it here in the same thread. HyperNudge is based on that exact same idea, I just updated it with a few new features that are possible since the latest Renoise version.