Giter Club home page Giter Club logo

Comments (8)

smithkyle avatar smithkyle commented on May 26, 2024

Doesn't appear to be confined to mobile - I just tried in safari and chrome on macos, and neither triggered the ontouch function (I believe safari isn't supported, but chrome is).

from open-stage-control.

jean-emmanuel avatar jean-emmanuel commented on May 26, 2024

Everything appears to behave as expected here, onTouch only exposes the start and stop events as documented and the pad itself reacts normally to drag events.

from open-stage-control.

smithkyle avatar smithkyle commented on May 26, 2024

I made a video of me setting up a fresh session, and then using two built-in client windows to observe the behavior of the onValue function of a button, and the onValue / onTouch functions of an XY pad. When clicking the button, the onValue function updates both instances of the client. When clicking the XY pad, the onTouch function ONLY runs for the client which was clicked, but as I drag around on the pad, you can see that the onValue function updates BOTH clients.

Should the onTouch function only update the client that was interacted with? I am also including the session that was created during the video.

example video
test2.json.txt

from open-stage-control.

jean-emmanuel avatar jean-emmanuel commented on May 26, 2024

Yes, onTouch should only run when the widget is physically interacted with. On the other hand, since the value is sent to other clients for widgets to synchronize it triggers onValue*. The behavior you describe is correct.

*Note that unless onValue is triggered by a direct interaction the send() function has no effect to prevent sending duplicate messages.

Now the video shows the text widget ends up with a different value in the two clients, this is because it doesn't send any message and thus doesn't hit the cross client sync mechanism. I'm not entirely sure that's a problem, need to think about it.

from open-stage-control.

smithkyle avatar smithkyle commented on May 26, 2024

from open-stage-control.

jean-emmanuel avatar jean-emmanuel commented on May 26, 2024

If you change the type of the text widget to input it will work as you expect, there's currently a blind spot here for widgets that don't send any message when their value changes (it's not related to the explicit use of send())

from open-stage-control.

smithkyle avatar smithkyle commented on May 26, 2024

Sorry for the delay in responding. Switching the variable widget to an input widget worked. After fussing with this, I realized I could actually just use setVar and getVar to much easier avail, which worked better.

from open-stage-control.

jean-emmanuel avatar jean-emmanuel commented on May 26, 2024

Ok cool ! As of v1.25.2, variable, text and led widgets will have their value synced accross clients.

from open-stage-control.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.