Why does the muted patterns (X) status get lost when duplicating a track including patterns?
Why does the muted patterns (X) status get lost when duplicating a track including patterns?
Duplication of a track has a specific predefined behavior…
- If you duplicate a track without the parameters (CTRL + D) doubles track in active state (“PLAY”).
- If you duplicate a track with the parameters (CTRL + ALT + D) doubles track in off state (“OFF”).I guess it’s for safety, since you’re doubling the sound. Seem right.
But both cases ignore the X state of each pattern-track (it is not programmed,it seem).I think it should work just as you describe it.As it now works, you need to constantly check in the matrix editor.Group duplication is also a problem.I have always thought that duplication should be an exact mirror, with all the properties: order, color, color blend, subcolumns on or off ,muted, visible columns, same written parameters, etc.The effects chains is another story.
Months ago a related problem was solved that will come in the next version, supposedly.Perhaps this issue should be reviewed?
It is very tedious, I can’t really imagine many scenarios when you want to duplicate a track and have the patterns not follow what was muted in the original track. Having to manually go through the whole song muting all the parts by hand is such a waste of time.
it gets lost because the track duplicate function was written pre sequence matrix era.
It is very tedious, I can’t really imagine many scenarios when you want to duplicate a track and have the patterns not follow what was muted in the original track. Having to manually go through the whole song muting all the parts by hand is such a waste of time.
True!
it gets lost because the track duplicate function was written pre sequence matrix era.
I think it is lost because the function does not contemplate it.It is possible to duplicate the track and then check the status of each pattern-track in the same function.
By the way, I have a function that duplicates the track as it is. You may even have specific options. But it does not contemplate the state of the X (and muted). I suspect it is an oblivion.
In the API documentation, this is for the muted state:
-- Access to sequencer slot mute states. Mute slots are memorized in the sequencer and not in the patterns.
renoise.song().sequencer:track_sequence_slot_is_muted(track_index, sequence_index)-> [boolean]
renoise.song().sequencer:set_track_sequence_slot_is_muted(track_index, sequence_index, muted)
What code would be for the X state?
Edit :
I have not tried it yet. But I think the state of the X is this equivalent to muted pattern:renoise.song(). sequencer:track_sequence_slot_is_muted (track_index, sequence_index)-> [boolean]
It actually applies in the sequence, not in the pattern. And constant for muted track:renoise.Track.MUTE_STATE_MUTED
OK! Agree added to my cloning function:
Click to view contents
--copy track (clone track or group (without son tracks), master or send )
-----------------------------------------------------------
function vpd_copy_track( song, sti, tr )
song = renoise.song()
sti = song.selected_track_index
if ( song.selected_track.type == renoise.Track.TRACK_TYPE_GROUP ) then
song:insert_group_at( sti + 1 )
local gr_1, gr_2, gnme_1, gclr_1, gclb_1, gfx_1
--define features group 1
gr_1 = song.tracks[sti]
gnme_1 = gr_1.name
gclr_1 = gr_1.color
gclb_1 = gr_1.color_blend
gfx_1 = gr_1.visible_effect_columns
--clone previous features in next group
gr_2 = song.tracks[sti + 1]
gr_2.name = gnme_1
gr_2.color = gclr_1
gr_2.color_blend = gclb_1
gr_2.visible_effect_columns = gfx_1
else
song:insert_track_at( sti + 1 )
if ( song.selected_track.type == renoise.Track.TRACK_TYPE_SEQUENCER ) then
local tr_1, tr_2, nme_1, clr_1, clb_1, vnc_1, vol_1, pan_1, dly_1, sfx_1, tfx_1, cno_1
--define features track 1
tr_1 = song.tracks[sti]
nme_1 = tr_1.name
clr_1 = tr_1.color
clb_1 = tr_1.color_blend
vnc_1 = tr_1.visible_note_columns
vol_1 = tr_1.volume_column_visible
pan_1 = tr_1.panning_column_visible
dly_1 = tr_1.delay_column_visible
sfx_1 = tr_1.sample_effects_column_visible
tfx_1 = tr_1.visible_effect_columns
--clone previous features in next track
tr_2 = song.tracks[sti + 1]
tr_2.name = nme_1
tr_2.color = clr_1
tr_2.color_blend = clb_1
tr_2.visible_note_columns = vnc_1
tr_2.volume_column_visible = vol_1
tr_2.panning_column_visible = pan_1
tr_2.delay_column_visible = dly_1
tr_2.sample_effects_column_visible = sfx_1
tr_2.visible_effect_columns = tfx_1
for i = 1, 12 do
tr_2:set_column_name( i, tr_1:column_name(i) )
end
end
if ( song.selected_track.type == renoise.Track.TRACK_TYPE_SEND ) or ( song.selected_track.type == renoise.Track.TRACK_TYPE_MASTER ) then
local sd_1, sd_2, snme_1, sclr_1, sclb_1, sdfx_1
--define features send 1 (or master)
sd_1 = song.tracks[sti]
snme_1 = sd_1.name
sclr_1 = sd_1.color
sclb_1 = sd_1.color_blend
sdfx_1 = sd_1.visible_effect_columns
--clone previous features in next send
sd_2 = song.tracks[sti + 1]
sd_2.name = snme_1
sd_2.color = sclr_1
sd_2.color_blend = sclb_1
sd_2.visible_effect_columns = sdfx_1
end
end
for s = 1, #song.sequencer.pattern_sequence do
tr = song.patterns[s].tracks
tr[sti + 1]:copy_from( tr[sti] )
--mute state
if song.sequencer:track_sequence_slot_is_muted( sti, s ) then
song.sequencer:set_track_sequence_slot_is_muted( sti + 1, s, true )
end
end
song.selected_track_index = sti + 1
end
---
VPD_COPY_TRACK = vb:button { height = 20, width = 60, color = VPD_RACK_CL_BL, text = "Track →", notifier = function() vpd_copy_track() end,
tooltip = "Clone entire track to right. Also for group, master or send.\n"..
"If a group is selected, only clone the parent group selected, not the son tracks.\n"..
"If master is selected, clone it in first send (S01)."
}
@Mef Chaolin.If you need a tool with a button for cloning (only track type), tell me.Simply add this function to a clean tool and you’re done.The code responsible:
for s = 1, #song.sequencer.pattern_sequence do
tr = song.patterns[s].tracks
tr[sti + 1]:copy_from( tr[sti] )
--mute state
if song.sequencer:track_sequence_slot_is_muted( sti, s ) then
song.sequencer:set_track_sequence_slot_is_muted( sti + 1, s, true )
end
end