brunoherbelin / vimix

Live Video Mixer
GNU General Public License v3.0
260 stars 25 forks source link

OSC message /vimix/current/sync #49

Closed lupin3rd closed 1 year ago

lupin3rd commented 1 year ago

Hi at all, i'm using this message to sync my puredata patches with vimix. I think that will be usefull to have also the name attribute in the reply and not only alpha attribute. Actually index attribute change very often (example: i remove a video) and if i want to communicate with my video i use always name attribute in OSC message... then i always receive a list of index and alpha...and if i want name attribute i need to cycle all index with a OSC request...

I think that sync response need to contain "name" to reduce OSC message :-)

Thank you very much!

brunoherbelin commented 1 year ago

Yeah, sure, happy to adapt to the needs!

I see two easy alternatives.

  1. send one more line as response to /vimix/current/sync
      /vimix/current/0 f { 1.0 if current, 0.0 otherwise }
      /vimix/0/alpha f { alpha value of source 0 }
      /vimix/sourcename/alpha f { alpha value of source 0 }
      ... 
      etc., for as many source currently available in vimix
  1. Implement response to /vimix/sourcename/sync request
    /vimix/srcname/current  f { 1.0 if current, 0.0 otherwise }
    /vimix/srcname/lock  f { 1.0 if locked, 0.0 otherwise }
    /vimix/srcname/play  f { 1.0 if playing, 0.0 otherwise }
    /vimix/srcname/depth f { depth value }
    /vimix/srcname/alpha f { alpha value }

Let me know what would be more appropriate (or if both should be implemented)

lupin3rd commented 1 year ago

Hi Bruno, i think that the first solution is very good to have base information immediately... but why not: /vimix/current/0 f { 1.0 if current, 0.0 otherwise } /vimix/0/alpha f { alpha value of source 0 } /vimix/0/sourcename s { string with name of source 0 } ...

I think that it's very usefull also implement response to /vimix/sourcename/sync request.

brunoherbelin commented 1 year ago

Perfect as you propose and implemented ! Documentation updated https://github.com/brunoherbelin/vimix/wiki/Open-Sound-Control-API

The change is available if you pull last version of code on git and recompile, or with the latest/edge version of linux snap. Will be in next release.

lupin3rd commented 1 year ago

Hi Bruno, i write a PureData patch to sync sources by OSC and works fine! thank you!

Can you also implement response to /vimix/sourcename/sync request ?

Another question: /vimix/current/seek want a float to set the second of the video... but i don't know how many second is long the video (by OSC in the other software) i think that can be usefull also another metod to seek that use a float from 0.0 to 1.0.

brunoherbelin commented 1 year ago

Thanks, all your requests make lots of sense and were implemented (same, in code and edge version)

Question: would you be interested in a submission to NIME https://www.nime.org/ ? We could continue this discussion on a private channel..

lupin3rd commented 1 year ago

We can use NIME forum to continue discussion?

brunoherbelin commented 1 year ago

or Discord ?

brunoherbelin commented 1 year ago

implemented in dd92f2dccbffd751feddcd95cd3fc9444822f308