New Tool (2.8 - 3.1): Reorder Notes By Pitch

NOTE: For a more advanced take on pattern note sorting, please take a look at this more recent tool by danoise:

https://www.renoise.com/tools/voicerunner



I released a very basic version of this before but have just got round to making it more complete and giving it, it`s own thread:



Shortcut:
Reorder Notes By Pitch

menu:
Tools > ledgers Script`s > Reorder Notes By Pitch


3.0 Version:
ledger.scripts.ReorderNotesByPitch_V0.9.xrnx

2.81 version:
ledger.scripts.ReorderNotesByPitch_Rns280_V0.71.xrnx

changelog

-v0.9
-Tidied up menus into a GUI for easier use
-Added ā€˜selection in trackā€™ (in pattern) range
-removed whole song range

0.71
There is a new preference menu entry under Tools:Ledger`s Scripts:Reorder Notes By Pitch in: ~Preserve Column Positions Enabled
If you uncheck this preference the reordering is done so that notes are left aligned in the track they are in.


You get three menu entries (under Tools:Ledger`s Scripts) and corresponding shortcuts, which all reorder the pattern notes by pitch over different ranges. With this updated version though the relative position of the notes is kept, so the note-offs etc are preserved properly.

Shortcuts and menu entries:
----------------------------------------
Reorder Notes By Pitch in Pattern Track

Just for the selected track in the current pattern

Reorder Notes By Pitch in Whole Track
Selected Track, all patterns

Reorder Notes By Pitch in Selected Patterns
All tracks in the pattern range selected in the sequencer. That means you can select all patterns and the re-ordering is applied to the whole song.


Status updates give progress as this can be quite a slow operation over large ranges.


My Other Scripts:

1 Like

Just tried it out to make sure it did what I thought it did, and THANK YOU! Itā€™s so annoying when you play like a big block chord and the notes are out of order, and manually rearranging them is a pain in the ass. This works perfectly, and they donā€™t even have to be on the same line.

Yes, I never even attempt doing it manually!

Good to hear it`s working as expected so far.

This is a previous version of the tool:

ā€“removed link as a feature in the full tool now

you can find the menu entry in the pattern editor: Re-Order Notes By Pitch TEST --works for track in pattern

Just to check this is the behaviour you would like as a preference?

Ok, can quite easily add the old behaviour as a preference, and yes I`m afraid the pic is a bit out of scope for the moment.

edit: dont know if youve seen it before but I made a tool that may be of interest called ticky roll:
http://forum.renoiseā€¦ool-ticky-roll/

no replacement for piano roll but can be useful for an overview.

0.71

As requested there is a new preference menu entry under Tools:Ledger`s Scripts:Reorder Notes By Pitch in: ~Preserve Column Positions Enabled
If you uncheck this preference the reordering is done so that notes are left aligned in the track they are in.

Hey, I hacked together a version which does the sorting differently,
I basically needed to be able to sort each unique note to a separate column

If you enter this

C-4 D-4 E-4 F-4
D-4 E-4 F-4
E-4 F-4

It will output this

C-4 D-4 E-4 F-4
--- D-4 E-4 F-4
--- --- E-4 F-4

Supports note-offs too, but obviously has a maximum of 12 unique notes per pattern-track
(and yeah, only works with pattern-track ATM).

Perhaps you could find a way to integrate these features into the tool? In any case, I have attached the modified file.

Cool, I`ll take a look,

Looks like a neat drums track sorter.

New version updated for 3.0:

http://forum.renoiseā€¦post__p__298705

Made some changes, still a WIP but a useful enough update to release I think.

Just one menu entry and shortcut now, the rest is done via the new GUI:

Shortcut:
[b]Reorder Notes By Pitch

[/b]menu:
Tools > ledgers Script`s > Reorder Notes By Pitch

  • v0.9
    -Tidied up menus into a GUI for easier use
    -Added selection in track (in pattern) range
    -removed whole song range

Hey ledger thanks for this script/tool. There seems to be a bug in the algorithm: Note-offs doesnā€™t seem to be moved correctly with the note. A note-off have to be moved always with the note before, hasnā€™t it? But this doesnā€™t happen here.

EDIT: No, the problem seems to be, if there is a note still playing on a column and another note appears in another column, this still hold-down/sustaining note needs to be taken care ofā€¦

And is it possible to have this tool directly with two shortest in the right-click-contextmenu like ā€œTrack->Order by pitchā€ and ā€œTrack->Order by pitch (left-align)ā€ ?

Of course I would prefer auto note-sorting natively done by Renoise already, optional, viewable already while recordingā€¦

EDIT: No, the problem seems to be, if there is a note still playing on a column and another note appears in another column, this still hold-down/sustaining note needs to be taken care ofā€¦

And is it possible to have this tool directly with two shortest in the right-click-contextmenu like ā€œTrack->Order by pitchā€ and ā€œTrack->Order by pitch (left-align)ā€ ?

Is the EDIT still a bug, I`m not quite sure what you are refering to?

Noted about the menus.

The note-offs are not moved along with the belonging note in any case, so the note offs will be mixed completely in a wrong way. For example if the notes do not play the same rhythm in each column, the result will be a bit chaotic. I think the algorithm needs to look for a new note if there is a note still playing in the column before/to the left. And if so, the target column moves one to the right and so on. So each column in the track needs a playing status, that will be deleted if a note-off appears.

I see what you are saying now,

I may have a look at this but it is unlikely to be soon to be honest.

I see what you are saying now,

I may have a look at this but it is unlikely to be soon to be honest.

Iā€™m regularly using both your version and my own modified one. So I could merge the two while fixing the remaining issues, if you donā€™t mind?

Iā€™m regularly using both your version and my own modified one. So I could merge the two while fixing the remaining issues, if you donā€™t mind?

That would be great danoise!

I`ll put it up in the first post with credit to you for the modification after.

That would be great danoise!

I`ll put it up in the first post with credit to you for the modification after.

Hi

Did this ever get merged in?

Also is this tool Midi Mappable?

cheers

Did this ever get merged in?

I started with a quick attempt but soon realized that I would not be able to fix the issues that this tool has.

So there will be no merged version, sorry.

Instead Iā€™ve been dedicating the last couple of weeks on a much more flexible alternative - one that could be integrated into any other tool that need note-sorting.

I would estimate that the work is 80% done. Will bump this thread once itā€™s ready for use.

danoise, that would be fantastic for me. Highly looking forward for your tool release!

That does sound great. Look forward to it.

Chrs