Quote:
Originally Posted by cfillion
It's one of REAPER's many API functions that are made available to ReaScripts by REAPER and extensions.
You can access the current list of them customized for your install via Help > ReaScript documentation.
|
Goldmine! Sorry but this was a minor heureka moment for my (so far) lame abilities.
Superthanks.
Quote:
Originally Posted by cfillion
Can you share an example of a track structure like that and what the issue is? Depending on what it is, it might be fixable...
|
Like I said, I’m learning lua, but my level of terminology and of programming in general is bordering the level you’ve used to write this script. So I can follow what you wrote, but my repertoire doesn’t extend to immediately suggest workable changes. Not yet. I thought it would be by now, but oh no, some ppl just have to be so clever with their scripts!
Just to get the mind into the mindset again: as mentioned, I got instrument.bus tracks with a whole track structure underneath them. And I wish for the search function to search through only the child structure of a given “instrument.bus”.
The problem I seem to encounter, is the script seems to search sub-levels tracks - just as intended - but only as long as the sublevel tracks are not child tracks themselves. However, if I got a parent/child structure
within- or 'under' an instrument.bus track, then the child tracks of that sub-structure doesn’t seem to get searched. Perhaps the script only searches tracks who are 1 level below a given parent track (instrument.bus), but not tracks 2- or more levels below the instrument.bus track?
In fact, if there is a parent/child structure in under an instrument.bus, the child tracks of that sub-structure doesn't seem to get searched, but also the tracks below the first parent/child structure - tracks that are hierarchically 1 level under the instrument.bus - doesn't seem to get searched.
As I’m trying to follow your script, this seems to be the case with the bolded line:
Code:
if type(ruleKey) == 'string' and trackDepthChange == 1 ...
I managed to sort of get around this, by setting the exact name of the parent tracks that I wish for the script to search under. Instead of just using *.bus$.
Code:
local NESTED_RULES = {
['LEAD Voice track.bus$'] = {
['Vox.led.main1.supp1.bus$'] = {
'%.di$',
},
['Vox.Led.Bi1.bus$'] = {
'%.di$',
},
['Name of next parent track under the main instrument.bus$'] = {
'%.di$',
},
This would work, if it wasn’t for the fact that the track structure under each instrument.bus does change a bit with each project. Yes, it is a work template, and the initial starting point in the template is always the same. But depending on what configuration of tracks or instrument I get going, the structure underneath the instrument.bus may (or may not) change somewhat, including the track hierarchy. Such changes include the introduction of plenty of sub parent/child structures under each instrument.bus track.
For the above solution to work I would have to manually write in the name of each sub parent/child structure for the script to search through it, and take it out of that track structure is removed from the present project etc.
Therefore, it needs to be able to automatically and systematically ‘scan’ through each track - below a given and top-level “bus”-track - to find all *.di labelled tracks under there. Regardless of the track hierarchy. The only backstop is the instrument.bus top-level parent track.
As a sidenote: an instrument.bus track in my setup will always be top level track. That will never change. I’ve been elaborating the living Jesus out of this setup I’m using, so no, it will never change. So the rather clever recursive -1 level function won't be necessary, for the use you included it as.
And I really wished it was possible to 'tag' tracks with a different value (even multiple values) than only its label or track number. Wink Justin.