Menu ▾ ▴

#54 feature request: more OSC message types

2.0
accepted
nobody
None
2019-08-21
2018-01-09
No

Hi! GLMixer is wonderful... i begin to use it on some video live set and works very fine.
I'm a puredata + GEM user, and i create some patches to syncronize video and audio.
I use those and send OSC messages to GLMixer to control some properties of a source... but if i don't know the source name???
In a normal live set a user load lot of videos and other sources type and want control those by OSC.... then we need some messages to select source (next source, prev source, select a specific tag of sources) or a message that ask to glmixer to reply with a OSC message that contain all sources name...
Do you think to implement some of those requests?? :-)
Thank you very much and excuse me for my bad english
Luca

Discussion

  • Bruno Herbelin

    Bruno Herbelin - 2018-01-09

    Thanks! Indeed this is something I noticed too..
    A simple hack would be to number the sources, in depth order. This way there is always a source #1, and etc. Not ideal (lots of issues for knowing which is what) but est to do.

    Would this help?

     
    • Luca Franceschini

      The first hack would be two messages render/next render/prev (tab and crtl+tab in the glmixer gui) that send back an OSC message name/xxxxxxx.
      In this way in the software that we use to control glmixer we receive the name and use it for future messages.

      Also a message "render/load sourcename fullpath" is usefull to send full path of a video to load... and specify the sourcename :-)

      Glmixer not only must wait OSC messages but also send OSC! :-D

       
  • Bruno Herbelin

    Bruno Herbelin - 2018-01-14

    Here you go!
    You convinced me of the usefullness of the bidirectionnal communication with GLMixer and I started to implement a request mechanism :)

    You can read here the updated specs: https://sourceforge.net/p/glmixer/wiki/GLMixer_OSC_Specs/. And if you compile from source, update svn and recompile GLMixer to test the program (release 1567). Otherwise let me know which platform you work on and I can send u a binary.

    Here is a brief explanation;

    • Send /glmixer/select/next or /glmixer/select/previous to select (activate as current) the next or previous source in the session stack. Then use the target 'current' in place of the name of the source to operate on that source.
    • Send /glmixer/request/count to ask for the number of sources in the session, and /glmixer/request/name i X (with X = source index) to obtain the name of the source.

    To read the answer to the requests, your program must implement its own OSC listener, using UDP socket on the same port as the GLMixer broadcast (3000 by default, configured in OSC configuration window). This way you can update the list of source names in your program each time the count is updated.

    I heard your wish for a way to load a file and add it to the session. However this would not be a generic mechanism, as it is specific for media source, and does not apply to other types (algo, device, etc). Also the source would be created with default parameters, and not know where to drop it. And also giving a full path is not very elegant as this requires to have access to the GLMixer computer anyway : why not opening it directly on this machine in this case?

    I would suggest that you rather work with a session containing all your media, that you leave the sources that you do not use in standby (and in multiple workspaces for clarity if you wish). To put a source back in standby, move its alpha coordinates out of the mixing rings :
    /glmixer/current/AlphaCoordinates ff 200 200

    Thanks for your feedback and suggestion!

     
    • Luca Franceschini

      Hi Bruno,
      today i work on testing all OSC features :-) Seem that all works very fine.. if i found bugs i will write here...
      I'm using puredata actually to interface my MIDI controllers with GLMixer but also to analyse sounds and find peak to sync video :-)
      Would be very usefull to control the glmixer media source player with OSC and do some mathematical operations with video position :-) . Some example:

      • a property to send the frame where GLMixer player must jump (a float from 0 to 1)... in this way we can scratch video with music: /glmixer/current/Position f 0.250
      • two property to set loop in and loop out: /glmixer/current/LoopIn f 0.1 /glmixer/current/LoopOut f 0.67
      • a property to enable and disable loop: /glmixer/current/Loop T and /glmixer/current/Loop F

      Thank you!

       
    • Luca Franceschini

      Bruno. I confirm that all works fine and very well!! :-)
      I tested a lot of OSC proprierties and all works fine.
      Some feedback:

      • current/Color iii don't works with media source (i think it's not implemented)
      • in the OSC log windows it's usefull a key to clear old log messages
       
  • Bruno Herbelin

    Bruno Herbelin - 2018-01-14
    • status: open --> accepted
     
  • Bruno Herbelin

    Bruno Herbelin - 2018-01-14

    r 1567 to be validated

     
  • Bruno Herbelin

    Bruno Herbelin - 2018-01-22

    Update for r1572 (latest commit today)

    • New properties have been added to control playback of the source, and in particular for media sources (videos). In addition to the basic Play/Stop, Pause, Loop, etc., a timing property was added to allow navigating into the video and change begin and end.
    • Apply blending preset by name
    • Broadcasting of connection information (IP and port) on start of GLMixer OSC server

    The documentation has been updated at:
    https://sourceforge.net/p/glmixer/wiki/GLMixer_OSC_Specs/

    Properties for Color has been tested: seems to work.. Be careful to use 3 intergers between 0 and 255.

    The log window has a clear all button (<x])

    NB: It is not guaranteed that the media player will be able to jump to the given timing, especially for jumping backward (normal limitation of media player and moving of time slider)

     
    • Luca Franceschini

      I update to revision 1573 and i have this error on compilation:

      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp:589:22: error: ‘cursorMagnetStrength’ was not declared in this scope
      QObject::connect(cursorMagnetStrength, SIGNAL(valueChanged(double)), dynamic_cast<magnetcursor*>(RenderingManager::getRenderingWidget()->getCursor(ViewRenderWidget::CURSOR_MAGNET)), SLOT(setStrength(double)) );
      ^
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp:590:22: error: ‘cursorAxisScroll’ was not declared in this scope
      QObject::connect(cursorAxisScroll, SIGNAL(toggled(bool)), dynamic_cast<axiscursor*>(RenderingManager::getRenderingWidget()->getCursor(ViewRenderWidget::CURSOR_AXIS)), SLOT(setScrollingEnabled(bool)) );
      ^
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp:596:13: error: ‘resetMagnet’ was not declared in this scope
      connect(resetMagnet, SIGNAL(clicked()), SLOT(resetCurrentCursor()));
      ^
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp: In member function ‘void GLMixer::confirmSessionFileName()’:
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp:1927:9: error: ‘actionReload_Session’ was not declared in this scope
      actionReload_Session->setEnabled(false);
      ^
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp:1933:9: error: ‘actionReload_Session’ was not declared in this scope
      actionReload_Session->setEnabled(true);
      ^
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp: In member function ‘void GLMixer::readSettings(QString)’:
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp:2689:13: error: ‘actionCursorMagnet’ was not declared in this scope
      actionCursorMagnet->trigger();
      ^
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp:2713:9: error: ‘cursorMagnetRadius’ was not declared in this scope
      cursorMagnetRadius->setValue(settings.value("cursorMagnetRadius").toInt());
      ^
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp:2715:9: error: ‘cursorMagnetStrength’ was not declared in this scope
      cursorMagnetStrength->setValue(settings.value("cursorMagnetStrength").toDouble());
      ^
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp: In member function ‘void GLMixer::saveSettings()’:
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp:2777:45: error: ‘cursorMagnetRadius’ was not declared in this scope
      settings.setValue("cursorMagnetRadius", cursorMagnetRadius->value() );
      ^
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp:2778:47: error: ‘cursorMagnetStrength’ was not declared in this scope
      settings.setValue("cursorMagnetStrength", cursorMagnetStrength->value() );
      ^
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp: In member function ‘void GLMixer::resetCurrentCursor()’:
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp:3645:9: error: ‘cursorMagnetRadius’ was not declared in this scope
      cursorMagnetRadius->setValue(150);
      ^
      /home/lupin3rd/repo-git/glmixer-svn/glmixer-Source/src/glmixer.cpp:3646:9: error: ‘cursorMagnetStrength’ was not declared in this scope
      cursorMagnetStrength->setValue(0.7);
      ^
      ninja: build stopped: subcommand failed.</axiscursor*></magnetcursor*>

       
      • Luca Franceschini

        Revision 1574 works fine!

         
        • Bruno Herbelin

          Bruno Herbelin - 2018-01-26

          (oops sorry for incomplete commit 1573..)

          So, are the new OSC control features working (pause, begin, end, etc) ?
          Do you have more suggestions or should i close this request?

           
          • Luca Franceschini

            All new OSC control features works fine!! some suggestions:

            • UI must show ui options activated by OSC (an example: if i set a mask with mouse in glmixer i see the ui element selected, if i set the same by OSC message in the UI masks are all disabled)
            • media source need a message output with actual timing ( f 0..1), in this way i can know the actual timing position (if i want to calculate a new position with some algoritm)
            • implement OSC messages with sessions and layers
             
          • Luca Franceschini

            Another suggest:

            • glmixer reply to OSC message "request/name i" with "glmixer/XXXXX". I think that this must be "glmixer/name/XXXXX". It's more easy in the software that receive those messages filter messages that contains names.
             
  • Frash Pikass

    Frash Pikass - 2018-08-20

    Speaking of OSC messages, I'm pretty new to GLMixer, but as I did the visuals for a couple of long concerts, I yearned for a more comfortable way to control my sets. Using a mouse for four hours straight can put quite a strain on your hand and wrist!

    As the night went on, I found myself taking multiple snapshots of my mixing view and I noticed that by dragging snapshots into the mixing view I could access a very nice fader that would move all sources into the position described by the snapshot with a very smooth transition. Unfortunately, the only OSC message for snapshots performs an "apply snapshot" which performs a very ugly instantaneous transition.

    If only there were more OSC messages to perform such a transition, a user could be able to make, for instance, a controller in pure data to "preload" the next snapshot (as if they dragged it into the view) and then to smoothly change the configuration to the one saved in the snapshot.

    Messages could be of the kind

    /glmixer/snapshot/viewType/operation parameters

    Where

    • viewType could be one of: mixing, geometry, layers, rendering, all;
    • operation could be one of: preload (which requires a specific string parameter for the operation), preload_next, preload_previous, apply (which could apply instantaneously, or take a float value between 0 and 1 to perform a smooth transition).
    • parameters would be specific for every operation or absent.

    What do you think about this?

     
  • Luca Franceschini

    Hi Bruno, do you think about to add an OSC output message with actual timing of media sources?
    Thank you

     

Log in to post a comment.