Based on some comments/suggestions on my previous tool, SwapChop, and repeated usage of that tool by myself, I’ve written another, similar, tool.
https://github.com/Neurogami/renoise-ng/tree/master/lua/com.neurogami.Alternator.xrnx
Alternator works much like SwapChop except it operates on a single track or note column.
(In both cases the idea is to automate quick-switching of volume/mute between note columns or tracks to get nice chopped and sliced sound.)
It stores the last-used values so that when you next use it you can re-apply the same values.
It has an option to “rotate” the set of values being inserted into the fx column. (It is not limited to just two values.)
This allows you to recreate the behavior of SwapChop (though it requires multiple application of the tool).
The main reason for isolating the insertion of values was that it simplified greatly the problem of determining the corresponding adjacent note column or track.
This tool makes two distinctions: Is an fx column selected (“I am to be applied to a track”) or is a note column selected (“I am to be applied to that note column”).
An example:
You select an fx column in a track
You enter, for the values to insert, ‘00’ ‘C0’ (i.e -inf and 0 db)
You generate a set of lines: every 4th line
You click “Go” and ‘L00’ and ‘LC0’ are inserted in the selected fx colum, at every 4th line, alternating each time.
Then you select some other track; it need not be adjacent.
The just-used values are pore-populated. You click “>>” next to the values list to rotate them right.
Since there are but two values this essentially swaps them.
You use the same line numbers as before and click ‘Go’
This is basically what SwapChop did (in fewer steps) but without requiring that the tracks or columns be adjacent. (You could repeat the example but using note columns if you like; these columns need not be in the same track.)
Big caveat: You need to watch for when the tool inserts ‘L00’ as the last fx since that essentially mutes that track from that point on.
Another neat feature: When applying values to a track, the tool automates the pre-fx volume. Any reverb, delay, etc that is on that track will continue.
I wanted to be able to get absolute drops to -inf volume, so if the tool is applied to a track fx column it will see if that track has a Gainer device named “ALTERNATOR”. If so then it applies the fx automation to that device instead of the pre-device track volume. Note: The hex for 0db is different between a Gainer and a track’s root volume. The tool assumes you are using “C0” for 0db (i.e. not muted). If the tool is being applied to the special gainer device then it looks specifically for “C0” as an fx value and uses '3F" (0db on a gainer) instead. All other values are treated as “00”. At some point I might implement some value mapping (since in theory the tool should be able to use more than just -inf and 0db as values).
It’s still new and likely buggy in some edge cases. After i use it more (i.e. “test” it) I will give it a proper tool release.