Skip to content

Process "selected track" after other actions run? #395

@patmaddox

Description

@patmaddox

First I should acknowledge that I'm not quite sure how ReaLearn does multiple mappings - if it fires them off in parallel, or if they're guaranteed to be sequential. I'll look at the code! :)

I am running into a case where I have a script that changes the selected track, so that when I use a ReaLearn selected track action in combination with it, ReaLearn activates the incorrect track.

My setup uses the Cycle Siblings and Remember Child scripts that I put together - they provide the sort of behavior alluded to in #240. I still think it's worth discussing this issue separately, because I think it's reasonable for scripts to change the selected track, and for ReaLearn to keep up with it.

Here's the behavior that I've set up with my scripts and a custom action:

cycle-scripts

Here's the custom action:

Custom: Select Next Sibling and Remember - record arm
  Script: paat - Select Remembered Child.lua
  Xenakios/SWS: Set selected tracks record unarmed
  Script: paat - Select Next Sibling.lua
  Xenakios/SWS: Set selected tracks record armed
  Script: paat - Remember Child.lua

Then I thought I could use ReaLearn's built-in "Track: Arm/disarm" action. My custom action then removes the "Xenakios/SWS: Set selected tracks record unarmed/armed" steps.

Here's what happens:

cycle-realearn

It appears that ReaLearn decides what is the Selected Track once when it runs the mappings - rather than looking at which track is selected at the time it runs the mapping (assuming that mappings are run sequentially... which may not be true).

So I am hoping to start a discussion on a way to proceed here. I can see value in ReaLearn having a consistent Selected Track for all of the mappings. I can also see value in ReaLearn knowing what is the current selected track. It's also possible that I'm just making a silly mistake!

Here are the relevant mappings for reference:

image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions