New tool (3.1): VoiceRunner

VoiceRunner

Advanced sorting of notes in the pattern/phrase editor

screenshot.png

Download : Grab it from the tool page(contains links to source code, issue tracker)

Planned features

  • Optimizing the ‘navigation buttons’. Currently they re-scan the pattern each time you press a button…
  • Sorting across pattern boundaries - retaining “open notes”. This is planned for v2 and will introduce a number of additional scopes.
  • Simplified API for script authors (use the voicerunner classes in your own tools)
  • Custom sorting - another v2 feature (custom column-names, ability tomap note+instrument combinations to specific columns)
2 Likes

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… :slight_smile:

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… :slight_smile:

fladd, do you have fancy detection code that I can borrow? :slight_smile:

EDIT: lol, n/m.

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… :slight_smile:

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.

Here’s a GIF showing how unique notes can “unfold” a column and squash it together again:
voice-runner-demo.gif?raw=1

Another GIF showing how the built-in navigation between voice-runs works
(it selects anything matching the current_collection options_beneath the cursor position)

voice-runner-navigation.gif?raw=1

To use navigation, assign keybindings/MIDI mappings, or press arrow keys while the tool dialog is focused…

Hm, but I totally missing now the ability to split the notes to different tracks! That was the purpose of the reorder-notes-tool.

Can you please add? :dribble: Also that automatically creation of a group is nice.

Also missing track context menu entry, personally I never look into tools menu, since it has no structure.

This tool is really cool and helpful, thank you.

Right, first bugfix release - v1.01

FIXED Sort 'Whole Phrase' could throw error
FIXED Merge 'Whole Pattern' could throw error
FIXED Sorting phrases without sample columns + 'unique instrument' option enabled now working
FEATURE Added context-menu entries to pattern/phrase editor

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>

Oh man! This is so great!

This should be implemented inside Renoise!

Thank you so much!

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…

Really nice tool this. Thorough.

thanks

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”>















C#4

04



































D-4

04



































G#4

01



































E-4

04



































E-4

04



































C#5

05



































OFF



































D#4

05

















OFF





























G-4

04























F-4

04























OFF



































G-4

04



































OFF































NoteColumn

true true true false true false false false

























































































































D#4

06

















OFF

















D#4

06

















OFF





















































OFF























D#4

06



















OFF















B-4

02



































D#4

02























D#4

02























D#4

02























OFF























OFF































NoteColumn

true true true false true false false false





















































































































































































































































































OFF































NoteColumn

true true true false true false false false





















































































































































































































































































OFF































NoteColumn

true true true false true false false false









































































































































































































































































































NoteColumn

true true true false true false false false









































































































































































































































































































NoteColumn

true true true false true false false false









































































































































































































































































































NoteColumn

true true true false true false false false









































































































































































































































































































NoteColumn

true true true false true false false false









































































































































































































































































































EffectColumn

false false false false false true true false









































































































































































































































































































EffectColumn

false false false false false true true false









































































































































































































































































































EffectColumn

false false false false false true true false







</patternclipboard.blockbuffer>
[/details]

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

Hope this helps!

@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).

Since no additional bugs were reported for a while, I’ve put it on the tools page.

splash-big_0.png

Aimed for that certain cinematic feeling :slight_smile:

Lol nice Logo :guitar: