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

redraw after remote changes #16

Open
friedolino78 opened this issue Feb 24, 2019 · 3 comments
Open

redraw after remote changes #16

friedolino78 opened this issue Feb 24, 2019 · 3 comments

Comments

@friedolino78
Copy link
Contributor

I observed, that the redraw mechanisms that work, if changing via gui, dont work if changing on the remote (via midi).

as a workaround for my special use case I added the whenValue call locally to the setValue Method the drive knob:

                Knob {
                    extern: dst.extern + "Distorsion/Pdrive"; label: "drive"
                    whenValue: lambda {wave.refresh};
                    function setValue(v) {
						valuator.value = lim(v, 0.0, 1.0);
						valuator.whenValue.call;
						valuator.damage_self
                    }
                }

I thought of an alternative solution:
calling the whenValue in valuator itself but checking whether the value actually changed to prevent loops.

@fundamental
Copy link
Member

fundamental commented Feb 24, 2019

The alternative solution is not viable as there's possibly multiple 'values' that exist for a given parameter at a time. Consider moving a knob. It produces several values which are transmitted to the synthesis engine in order. Using the different-value heuristic fails if you capture value1 at time t1 and value 2 at time t2 as you want to avoid:

  • send value 1
  • send value 2
  • observe value 1 as a response
  • send value 1
  • observe value 2 as a response
  • send value 2
  • repeat from step 3

@friedolino78
Copy link
Contributor Author

I think the problem arises when signal propagation and signal feedback use the same methods.
Maybe this is the case for the whenValue method?

@fundamental
Copy link
Member

Yep, there's a bit of a mismatch in what might be expected at first due to the async/asymmetric nature of propagating some values around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants