Jump to content


Photo

New Tool (3.1) SuperNudge

nudge

  • Please log in to reply
8 replies to this topic

#1 pandabot

pandabot

    Member

  • Normal Members
  • PipPip
  • 19 posts

Posted 17 December 2017 - 22:39

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.

Attached Files


Edited by pandabot, 08 August 2018 - 04:52.

  • danoise, Ledger, Djeroek and 6 others like this

#2 Ledger

Ledger

    Guruh Motha Fakka Knows More About Renoise Than Taktik

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3647 posts
  • Gender:Male

Posted 17 December 2017 - 23:07

Welcome to the forum and thanks for the script!


  • Neurogami and pandabot like this

--> Lua for newbies <--

My Scripts On Forum

Top Tip!

 

cpu : Xeon 1231 v3, os : Win 7 64bit, audio: Audient iD4
posts as 4tune @ KvR and some other music related sites


#3 dblue

dblue

    Dodgy Geezer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5829 posts
  • Gender:Male
  • Location:Berlin
  • Interests:Code. Music. Graphics.

Posted 17 December 2017 - 23:38

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)
  • Ledger and pandabot like this

#4 pandabot

pandabot

    Member

  • Normal Members
  • PipPip
  • 19 posts

Posted 17 December 2017 - 23:53

Thanks man :D

 

I took it from here:

 


Edited by pandabot, 17 December 2017 - 23:54.


#5 dblue

dblue

    Dodgy Geezer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5829 posts
  • Gender:Male
  • Location:Berlin
  • Interests:Code. Music. Graphics.

Posted 18 December 2017 - 00:09

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.
  • danoise and pandabot like this

#6 ffx

ffx

    Composes without Wires burns Directly from Brain to DVD that is already in Store Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3520 posts
  • Gender:Not Telling

Posted 18 December 2017 - 00:28

Can you add support for phrases, too?


  • pandabot likes this

Test system: macOS 10.13.4, HFS+. Firewire Audio, i7 4770, 8GB Ram, GTX1050 2GB, 48kHz
GUI Automation RecorderNative DSP Context MenuTuned ShortcutsUnified Value Shift And Transpose | Jump To From Send Modified (Docs) | Quick Template | Nisanmol's Groove Tool FixedThemes


#7 pandabot

pandabot

    Member

  • Normal Members
  • PipPip
  • 19 posts

Posted 18 December 2017 - 01:57

@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 http://forum.renoise...hread/?p=362950

 

@dblue whoa it's much faster now! I implemented some of your improvements and updated the attachment above


  • dblue likes this

#8 dblue

dblue

    Dodgy Geezer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5829 posts
  • Gender:Male
  • Location:Berlin
  • Interests:Code. Music. Graphics.

Posted 18 December 2017 - 07:51

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.

#9 ffx

ffx

    Composes without Wires burns Directly from Brain to DVD that is already in Store Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3520 posts
  • Gender:Not Telling

Posted 18 December 2017 - 11:41

@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 http://forum.renoise...hread/?p=362950

 

 

 

Yeah pandabot, fuck you, too, very kindly. You funny asshole :)


Test system: macOS 10.13.4, HFS+. Firewire Audio, i7 4770, 8GB Ram, GTX1050 2GB, 48kHz
GUI Automation RecorderNative DSP Context MenuTuned ShortcutsUnified Value Shift And Transpose | Jump To From Send Modified (Docs) | Quick Template | Nisanmol's Groove Tool FixedThemes