Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback is zero-ed when switching track #249

Closed
finfa opened this issue Mar 22, 2021 · 15 comments
Closed

Feedback is zero-ed when switching track #249

finfa opened this issue Mar 22, 2021 · 15 comments
Labels
enhancement New feature or request high priority realearn Related to ReaLearn

Comments

@finfa
Copy link

finfa commented Mar 22, 2021

Affected versions: from 1.12-pre4 to 2.8.0-pre4
Reaper version: 6.15

Hi. Thank you for Realearn.

Background: I have several tracks with 4 Realearn each in "selected track" mode. They all output the feedback to the same midi output but on different channels. Each channel is mapped to a controller (more or less).

Problem: When I change the selected track by moving from a track on the bottom to a track on the top, some controllers have all knobs to zero.

It's all good when I change the selected track by moving from a track on the top to a track on the bottom. The controller knobs will remap to correctly represent the state of the parameters.

Additional info

I analysed the midi feedback. I noticed that when switching track there are 2 series of midi cc for each channel. A first series has all the values to 0. The second one has all the values of the parameters.

When I change channel from bottom to top, the 0-series arrives after the value-series.

P.S.: I de-activated the Reaper option "Send MIDI note-offs when un-record-arming a track". In fact on projects without Realearn, I get no feedback at all when switching tracks.

I am available to give further debug data.

@finfa finfa changed the title Feedback is zero-ed when changing track Feedback is zero-ed when switching track Mar 22, 2021
@finfa
Copy link
Author

finfa commented Mar 22, 2021

Edit: Issue happens from 1.12-pre5 to 2.8.0-pre4.

It works correctly on 1.12-pre4. Although the feedback is slower, I can see that every knob flickers to 0 before being set to the correct value.

@helgoboss
Copy link
Owner

Hi, thanks for reporting. A simple test project would be great.

@finfa
Copy link
Author

finfa commented Mar 22, 2021

Edit: problem starts with 1.12-pre4.

@finfa
Copy link
Author

finfa commented Mar 22, 2021

I guess you have to setup the in/out of each Realearn to your midi i/o

DebugProject.zip

@finfa
Copy link
Author

finfa commented Mar 22, 2021

Moving from track 1 to track 2:

image

Moving from track 3 to track 2:

image

@helgoboss
Copy link
Owner

Great, I will look into it! Very good that you determined the version in which the behavior changes.

@helgoboss helgoboss added bug Something isn't working high priority labels Mar 22, 2021
@helgoboss
Copy link
Owner

Ah, different instances which use the same control elements! Interesting. If this worked once then just by coincidence.

I reproduced it and I want to support it.

@helgoboss
Copy link
Owner

helgoboss commented Mar 22, 2021

I think the reason why this worked before is that ReaLearn was much more sloppy "cleaning up" in previous versions (zeroing feedback). Now it really likes to clean up, maybe a bit too much.

@helgoboss helgoboss added enhancement New feature or request and removed bug Something isn't working labels Mar 22, 2021
@helgoboss
Copy link
Owner

This should work in upcoming 2.8.0-pre6. I implemented a kind of orchestration logic that gives other ReaLearn instances the chance to "take over" sources once they are released instead of blindly sending zero feedback and running into instance order issues. This also avoids the superfluous zero feedback. Zero feedback will only be sent if there's no other ReaLearn instance which takes over the source.

@finfa
Copy link
Author

finfa commented Mar 26, 2021

I confirm that it works for me on the test project. I still experience issues with my big template. I suspect it's because of backward compatibility issues upgrading from 1.11.

@finfa
Copy link
Author

finfa commented Mar 27, 2021

Took a while, but I managed to isolate it :)

How to reproduce (with the included project):

Setup:

  • Set Realearn on Track 1 to output to Controller 2 (or FX output) - keep FX input
  • Set Realearns on Tracks 2 and 3 to input/output with Controller 1

Problem 1:
Feedback is not sent when switching tracks.

I suspect it has to do with the CC/Chan being the same. In such case, would it be possible to discriminate also for the output device when resolving the take-over? That would be my holy grail :) (I can elaborate further on why, don't want to be too verbose now). But I hope there are benefits also for a more regular usage (thinking of many controllers being on chan 1 by default)

Problem 2:
If you change Track 1 CC to a different one (which should clear any conflict), then feedback is not sent switching from track 1 to track 2.

Problem 3:
When creating a new mapping, if "input FX" is selected, the value of the mapping is unstable. This happens to me also on a blank project, when for example I try to create a track like Track 1 of the attached project.

I hope it's not too much trouble. I looked at the merge and seems some significant change, and I am grateful. I wish I could help with the code but it's beyond my reach. Doing my best with debugs :)

(https://github.com/helgoboss/realearn/files/6215622/DebugProject_fx_in.zip)

Edit: misleading attachment position

@helgoboss helgoboss reopened this Mar 27, 2021
@helgoboss
Copy link
Owner

@finfa Thanks for isolating, I will have another look.

@helgoboss
Copy link
Owner

Took a while, but I managed to isolate it :)

How to reproduce (with the included project):

Setup:

  • Set Realearn on Track 1 to output to Controller 2 (or FX output) - keep FX input

Just wanted to point out that "FX output" has drawbacks. It can't participate in ReaLearn's multi-instance feedback orchestration. So this is not supposed to work. I will add a hint in the user guide.

So I tested it with feedback output to controller 2 directly.

  • Set Realearns on Tracks 2 and 3 to input/output with Controller 1

Problem 1:
Feedback is not sent when switching tracks.

Okay, I test feedback only, not control. Because I want to ensure that no control weirdness is influencing the results. So I only click around in REAPER, don't actually press the buttons.

I observed the following:

  1. Feedback for track 2 and 3 is not sent reliably, yes. When switching between track 2 and 3 it works but when switching to it from no track or track 1, it doesn't work.
  2. Track 1 feedback works for me. When looking at the mapping, I would not expect any feedback to change. There's no <Selected> or Track must be selected or similar. So I think we can take track 1 totally out of the equation.

I suspect it has to do with the CC/Chan being the same. In such case, would it be possible to discriminate also for the output device when resolving the take-over? That would be my holy grail :) (I can elaborate further on why, don't want to be too verbose now). But I hope there are benefits also for a more regular usage (thinking of many controllers being on chan 1 by default)

The feedback device is already used to discriminate, that was the whole point of this change. And it only comes into play if the source is exactly the same (e.g. CC/Chan same). So either it doesn't work correctly for this case or it must have other reasons, I will look into it.

Problem 2:
If you change Track 1 CC to a different one (which should clear any conflict), then feedback is not sent switching from track 1 to track 2.

As pointed out above, I think track 1 is not relevant. It doesn't work either way.

Problem 3:
When creating a new mapping, if "input FX" is selected, the value of the mapping is unstable. This happens to me also on a blank project, when for example I try to create a track like Track 1 of the attached project.

I'm afraid I don't understand this. You mean, <FX input>, right? I tried but couldn't observe anything weird. What exactly does "unstable" mean? And is it the feedback or the parameter value?

@helgoboss
Copy link
Owner

pre7 will have mentioned Problem 1 fixed. Feel free to further comment on Problem 3.

@finfa
Copy link
Author

finfa commented Apr 22, 2021

I confirm that the problem is solved on my setup as well.

@helgoboss helgoboss added the realearn Related to ReaLearn label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority realearn Related to ReaLearn
Projects
None yet
Development

No branches or pull requests

2 participants