“Delete Unused Patterns” take the throw to remove the empty patterns that you can see in Matrix Pattern (same as for tracks).If the user deletes a pattern manually has already eliminated it, already it is not in use.Why the deleted pattern “remains hidden”, if you can do it undo (CTRL+Z).Which is the reason?
In Renoise, removing a pattern from the sequence doesn’t delete it as such.
And that’s a very good thing: if removing some pattern from the sequence deleted it, a simple shortcut like CTRL+Left/Right shortcut could cause you to unintentionally remove patterns from the song.
So…they tend to hang around…“how” they do it is is the important part to understand.
Renoise has two modes: sorted and unsorted. To most people, “sorted” would be the obvious choice: a list of numbers, gradually increasing as you get further down the list (well, unless you include pattern aliases which can reference earlier patterns). Unsorted is cool to have when you’re old-school and want to use pattern numbers instead of names.
Imagine you are in unsorted mode and have yourself two patterns, first is 0 and second is 999. Now obviously inserting a new pattern is not possible (will display that error) because we already have a thousand patterns. If you do a sort() on this sequence, the sequence is compacted to just 2 patterns. You’ll have 998 patterns available - as expected.
But even with the sorted mode, patterns can stick around. This is where it gets a little complicated - if the pattern was removed from the sequence, and not empty, it will still retain it’s index after a sort.
Imagine that this time you are in sorted mode and have yourself two patterns, first is 0 and second is 999. You enter a note into pattern #999 and then you click “minus” to remove it from the sequence.
Being in sorted mode, you could then assume that running sort() would result in pattern indices being compacted to two patterns? At least, that’s how I understand you.
But the truth is, it will hang around too - still be present at #999 and so you’ll have a total of 1000 patterns. Why?
Well, otherwise tools could break all over the place. Because, as we have established, patterns are not removed - they hang around.
And a tool might work on memorized patterns indices - including patterns that are not actually in the pattern sequence, but just “hanging around”. For example, a tool might use a “temporary pattern” to do something before copying it into the actual pattern. There are many possible scenarios, as I’m sure you could imagine.
But, if Renoise did change the pattern indices that were not included in the pattern sequence, tools would have no way of knowing. Because, as far as pattern-indices go, a tool can only listen to notifications from the pattern sequence itself.
I’m not sure if this is the only technical reason it’s working like it is, but the bottom line is that this is a source of confusion for users.
The error messages could do a better job explaining why it happens and what can be done.