Nice! It seems you have also figured out a way to delete unused columns at the left. I will bluntly copy this for my Split into Separate Tracks Tool…
Hm, I think I’d wait until the tool has settled a bit. There is currently no ‘easy’ way to implement this in your own tool, you’d have to figure out a lot of stuff on your own.
But I can explain the basic concept, because that’s simple enough.
Step 1 extracts information and creates ‘voice-runs’ - tracking everything that happens between a notes being triggered to its release. That’s what all those ‘collection options’ are for.
Step 2 iterates through those voice-runs and sorts the data. Much easier to deal with voice runs than iterating through a pattern, line-by-line.
This approach makes it possible to preserve things like note-offs that belong to a given note, notes with glide commands and other special cases.
Another GIF showing how the built-in navigation between voice-runs works
(it selects anything matching the current_collection options_beneath the cursor position)
To use navigation, assign keybindings/MIDI mappings, or press arrow keys while the tool dialog is focused…
Hey Danoise thanks for that (another) amazing tool!
I’m want to report that i’m getting a scripting error when I try to merge:
Renoise\V3.1.0\Scripts\Tools\com.renoise.VoiceRunner.xrnx\main.lua’ failed in one of its notifiers.
Please contact the author (danoise [bjorn.nesby@gmail.com]) for assistance…
.\source/xLib/classes/xVoiceRunner.lua:1105: variable ‘run_idx’ is not declared
stack traceback:
[C]: in function ‘_error’
[string “local mt = getmetatable(_G)…”]:29: in function <[string “local mt = getmetatable(_G)…”]:24>
.\source/xLib/classes/xVoiceRunner.lua:1105: in function ‘merge_columns’
.\source/VR.lua:417: in function <.\source/VR.lua:364>
(tail call): ?
.\source/VR.lua:268: in function ‘do_merge’
.\source/VR_UI.lua:295: in function <.\source/VR_UI.lua:293>
Thanks woodpecking mantis! Tried to reproduce that one, but I couldn’t.
Could you perhaps share the pattern data? (copy to the clipboard and paste the XML here)
Oh, and I just discovered another issue, when you are trying to do a ‘normal’ sort and there aren’t enough visible note columns to begin with. The solution form now: expand columns before doing the sort…
Thanks woodpecking mantis! Tried to reproduce that one, but I couldn’t.
Could you perhaps share the pattern data? (copy to the clipboard and paste the XML here)
Oh, and I just discovered another issue, when you are trying to do a ‘normal’ sort and there aren’t enough visible note columns to begin with. The solution form now: expand columns before doing the sort…
Sorry, I’ve changed the pattern since that post, but I get the same result when trying to merge this (in the spoiler):
Here is the script error window:
I’ve blanked the username…
[details=“Click to view contents”] ‘C:\Users----------\AppData\Roaming\Renoise\V3.1.0\Scripts\Tools\com.renoise.VoiceRunner.xrnx\main.lua’ failed in one of its notifiers.
Please contact the author (danoise [bjorn.nesby@gmail.com]) for assistance…
.\source/xLib/classes/xVoiceRunner.lua:1105: variable ‘run_idx’ is not declared
stack traceback:
[C]: in function ‘_error’
[string “local mt = getmetatable(_G)…”]:29: in function
.\source/xLib/classes/xVoiceRunner.lua:1105: in function ‘merge_columns’
.\source/VR.lua:417: in function <.>
(tail call): ?
.\source/VR.lua:268: in function ‘do_merge’
.\source/VR_UI.lua:295: in function <.>
[/details]
</.></.>
Here is the xml for that pattern:
[details=“Click to view contents”]<?xml version="1.0" encoding="UTF-8"?>
<patternclipboard.blockbuffer doc_version=“0”>
If I may intrude, i got this error message as well; i think when trying to merge notes on a same line but different columns? (that was my uneducated conclusion)
That was with the prerelease version. Ver. 1.01 deletes notes when merging notes on the same line, giving the rightmost columns precedence
@Woodpecking Mantis: I think you need to use the lastest version of the tool?
It’s not perfect - normal sorting still has some unresolved problems - but merging should work as advertised.
That was with the prerelease version. Ver. 1.01 deletes notes when merging notes on the same line, giving the rightmost columns precedence
Yep, merging is supposed to be potentially destructive - squashing things into a single column, like you describe.
For the same reason it’s not trying to call itself a sort operation, because it doesn’t really care about note values.
Which is why, next to the normal and unique sorting mode, we should have a “compact” mode - packing things as tightly together as possible.
I wonder also if this merge process could be finetuned some more… Perhaps warn you when things are about to get lost - obviously, with a “don’t show this message again” checkbox.
And when you have multiple things happening in various note-columns, would there be cases where you’d want to keep something over something else?
I think the current approach (keeping the rightmost column) works OK, but I would still love to have some input on this.
This would be the featureset that I would want to “officially” release this tool with (final v1)
@Woodpecking Mantis: I think you need to use the lastest version of the tool?
It’s not perfect - normal sorting still has some unresolved problems - but merging should work as advertised.
Yep, merging is supposed to be potentially destructive - squashing things into a single column, like you describe.
For the same reason it’s not trying to call itself a sort operation, because it doesn’t really care about note values.
Which is why, next to the normal and unique sorting mode, we should have a “compact” mode - packing things as tightly together as possible.
I wonder also if this merge process could be finetuned some more… Perhaps warn you when things are about to get lost - obviously, with a “don’t show this message again” checkbox.
And when you have multiple things happening in various note-columns, would there be cases where you’d want to keep something over something else?
I think the current approach (keeping the rightmost column) works OK, but I would still love to have some input on this.
This would be the featureset that I would want to “officially” release this tool with (final v1)
You’re right, I assumed that I’ve updated through the auto-update tool, which I run each time I open Renoise without even looking at what I updating…
Its working now. Thanks for the support and congrats for this great work!
There’s a new version up (v1.02), which mostly fixes a number of bugs for the “normal” sorting mode.
So, starting with this version there should no longer be the risk of any lost notes as a result of doing a sort.
It also introduces an additional mode, “compact sort”, which is a more simplistic - but still non-destructive - sorting mode.
It works by reconstructing the pattern data, line by line. Unlike the normal sort, notes can appear “across columns”, but will always respect the high-low or low-high direction on each individual line.
This mode is the optimal choice if you want to sort notes by pitch but also, conserve space in the pattern editor.
When it comes to the normal sorting, I am aware of a few unresolved edge cases.
If you come across one, please tell (or even better: share the pattern data - copy the pattern and paste the clipboard here in this topic).