observable "track clicked"

Hi,

I would like to get an event if a track was clicked, not only on changed selected track index like by using key shortcuts… Is it possible? Thx!

EDIT:

… Or some workaround: observable “track_index” -> if (mousebutton.down) … Possible?

I guess you could watch the selection start with a timer, as that changes with every left-click. I`m not quite sure what you mean by “not only on changed selected track index like by using key shortcuts” though?

-- Read/write access to the selection in the pattern editor.
-- The property is a table with the following members:
--
-- {
-- start_line, -- Start pattern line index
-- start_track, -- Start track index
-- start_column, -- Start column index within start_track   
-- 
-- end_line, -- End pattern line index
-- end_track, -- End track index
-- end_column -- End column index within end_track
-- }
--
-- Line indexes are valid from 1 to renoise.song().patterns[].number_of_lines
--
-- Track indexes are valid from 1 to #renoise.song().tracks
--
-- Column indexes are valid from 1 to 
-- (renoise.song().tracks[].visible_note_columns +
-- renoise.song().tracks[].visible_effect_columns)
--
-- When setting the selection, all members are optional. Combining them in 
-- various different ways will affect how specific the selection is. When 
-- 'selection_in_pattern' returns nil or is set to nil, no selection is present.
--
-- Examples: 
-- renoise.song().selection_in_pattern = {} 
-- --> clear
-- renoise.song().selection_in_pattern = { start_line = 1, end_line = 4 } 
-- --> select line 1 to 4, first to last track
-- renoise.song().selection_in_pattern = 
-- { start_line = 1, start_track = 1, end_line = 4, end_track = 1 } 
-- --> select line 1 to 4, in the first track only 
--
renoise.song().selection_in_pattern
  -> [table of start/end values or nil]

Maybe I did not explained too well…

I want this event / observer :

renoise.song().selected_track, _observable

But only triggered if the track was selected my using left mouse click.

So you mean I could watch the selection instead? Or this:

renoise.song().selection_in_pattern

Does this ^also fire if I set the current_track_index by script?

Or this?

renoise.song().selected_pattern_track, _observable

Btw. what is the difference here^ to:

renoise.song().selected_track, _observable

I want this event / observer (…)
But only triggered if the track was selected my using left mouse click.

It doesn’t exist, nor is it likely to.

We do not provide such low level methods to hook into Renoise’s main GUI events. It’s only possible to do such things with your own custom tool GUI built using the ViewBuilder widgets.

What exactly do you intend to do when the track has been clicked? Perhaps there’s an alternate method or workaround.

renoise.song().selected_pattern_track, _observable
Btw. what is the difference here^ to:
renoise.song().selected_track, _observable

renoise.song().selected_track returns a renoise.Track object, which refers to the actual track itself as it exists in the entire song, with its DSP chain, mixer properties, number of visible note columns, and so on.

renoise.song().selected_pattern_track returns a renoise.PatternTrack object, which refers to the pattern data from a single track at a given point in time within the sequencer, with each pattern line, note column data, effect column data, etc.

Thanks.

no no, I think I am unable to explain what I am looking for… :wacko: I wonder about _observables. I tried nowrenoise.song().selected_pattern_track_observable andrenoise.song().selected_track_observable, both seem to fire if I 1. change track_index by lua 2. change track_index by user action… So I think I will workaround like this:

If the script itself changes the track_index, set a boolean before. In the event handler, only do action, if boolean was not set…

Is there a common way todifferentiate between a event triggered by user action vs. by script?

Hey dblue,

is there a way to get a event fired if a already selected track will be clicked once again?

Please have a look here at version 1.3 (code is quite a mess):https://forum.renoise.com/t/new-tool-jump-to-from-send/34051

You can with it from a source track to any target target, simply by multiple pressing the hotkey “jump to send”. The same in the other direction. Now I am added support for jumps from a send to another send… In this case, to make it work, you need to click the source send one time. But the situation can arise that the script already selected this send (while stepping thru all targets from a track). For this situation I also need a event if a click happens on this already selected send… Is this in any way possible?