Documentation:
-- Selection range as visible in the automation editor. always valid.
-- returns the automation range no selection is present in the UI.
renoise.song().patterns[].tracks[].automation[].selection_start, _observable
-> [number >= 1 <= automation.length+1]
renoise.song().patterns[].tracks[].automation[].selection_end, _observable
-> [number >= 1 <= automation.length+1]
-- Get or set selection range. when setting an empty table, the existing
-- selection, if any, will be cleared.
renoise.song().patterns[].tracks[].automation[].selection_range[], _observable
-> [array of two numbers, 1-automation.length+1]
The selection range of the automation editor seems somewhat useless. It seems that it only serves to select an area within a pattern. It is not possible to do any operation by selecting several patterns at the same time. This seems a bit confusing to me to handle. The user may end up with several patterns with small selected areas, which becomes a bit unmanageable. However, it is not possible to select several patterns at the same time to operate at the same time with several patterns at the same time, for example, to rectify ramps that occupy several patterns, which is widely used in automation.
So, I’ve noticed that the automation editor API does not allow you to select an area, for example, an entire pattern, if it does not exist "…create_automation(parameter)"and therefore, the definition of the parameter.
-- Creates a new automation for the given device parameter.
-- Fires an error when an automation for the given parameter already exists.
-- Returns the newly created automation. Passed parameter must be automatable,
-- which can be tested with 'parameter.is_automatable'.
renoise.song().patterns[].tracks[]:create_automation(parameter)
-> [renoise.PatternTrackAutomation object]
So, through the LUA code, it is not possible to deselect several patterns and leave it clean? When selected, the code creates something, which would then touch destroy if it is not selected. Imagine a valuebox from 1 to 32 that allows you to select 32 or 64 or all the patterns in the sequence within the automation editor. How to handle that?
I’ve been seeing that the Danoise AutoMate tool uses the Matrix Editor instead of the Automation editor to select multiple patterns. Visually it is a mess to jump from one editor to another to control it.If you are editing within an editing panel, why should you visually jump to another panel, if you need visual precision?
Is there no way to take advantage of the automation editor’s selection for multiple patterns at once? Why does this selection need “something before” to be able to visually mark that there is an area selected in the automation editor?
Here is a functionthat I have created to manipulate it.
function select_automation( value )
local song = renoise.song()
local sp = song.selected_parameter
if ( sp ) then
local ssi = song.selected_sequence_index
local sti = song.selected_track_index
for seq = ssi, ssi + value -1 do
if ( seq <= #song.sequencer.pattern_sequence ) then
local patt = song:pattern( seq )
local spa = patt:track( sti ):find_automation( sp )
if ( not spa ) and ( patt ~= nil ) then
spa = patt:track( sti ):create_automation( sp )
spa.selection_range = { 1, patt.number_of_lines + 1 }
end
end
end
end
end
--"value" = the value of a valuebox, range 0 to 32 (or to 64 or to #song.sequencer.pattern_sequence)
But I do not like the result at all, specifically, be obliged to execute this line: spa = patt:track( sti ):create_automation( sp ).When creating it, after the deselection it would play to destroy it.Any way to do it right or avoid it?
The selection is fine to be able to tell the user what to modify, before modifying it.Would it be possible to write a code for the automation editor that would select or deselect several empty patterns at the same time, without modifying their original state?
For example, I want to select the patterns 1,2,3,4,5,6,7,8, simply, and then be able to deselect the patterns 7 and 8, and the latter should be the same as before selecting them…
Thanks for the help!