I have a problem with the new question build a vb:slider. The problem is insert a especific variable number in max (or min) inside the slider:
The code:
tracks_ics = function()
vb.views['nav_track'].max = renoise.song().sequencer_track_count + 1 + renoise.song().send_track_count
vb.views['nav_track'].value = renoise.song().selected_track_index
vb.views["index_value"].text = ( "%s" ):format( renoise.song().selected_track_index )
end
function ini_tracks()
renoise.song().selected_track_index_observable:add_notifier(tracks_ics)
end
renoise.tool().app_new_document_observable:add_notifier(ini_tracks)
------------------------------------------------------------------------------------------
... ...
vb:horizontal_aligner {
width = 690,
mode = 'left',
vb:slider {
id = 'nav_track',
min = 1,
max = 2, --renoise.song().sequencer_track_count + 1 + renoise.song().send_track_count, ------<< PROBLEM HERE!!!
value = 1,
width = 670,
notifier = function(value) renoise.song().selected_track_index = value end,
},
vb:text {
id = 'index_value',
text = '---',
}
}
... ...
I need insert inside the slider: max =renoise.song().sequencer_track_count + 1 + renoise.song().send_track_count
beforevb.views[‘nav_track’].max = renoise.song().sequencer_track_count + 1 + renoise.song().send_track_count take the control.If I insert max = 2 , the slider does not work as desire to start and use the slider.
“renoise.song().sequencer_track_count + 1 + renoise.song().send_track_count” is equal to total number of total tracks/groups + Master Track + total Send Tracks (equal to maximum number of index in Pattern Editor).
The problem is that I insert max = renoise.song().sequencer_track_count + 1 + renoise.song().send_track_count, the code work, but fail in start Renoise.
For variablerenoise.song().selected_track_index is solved with “renoise.song().selected_track_index _observable”:
function ini_tracks()
renoise.song().selected_track_index_observable:add_notifier(tracks_ics)
end
renoise.tool().app_new_document_observable:add_notifier(ini_tracks)
But, not exist “_observable” to “renoise.song().sequencer_track_count” and “renoise.song().send_track_count” to prevent failure to start Renoise. I suppose it has to do.Exist any solution to avoid this error???
Exist another way to show the variable numberrenoise.song().sequencer_track_count + 1 + renoise.song().send_track_countwith _observable???
For more information this topic is related:https://forum.renoise.com/t/solved-help-lua-print-in-real-time-the-value-of-selected-track-insi/46442
Please, Help! Thanks in advance!