dynamically moving feeds

ciphered1
2014-05-26
2014-05-26
  • ciphered1
    ciphered1
    2014-05-26

    Hi Peter,

    i am trying to integrate some keystroke to change the positions of the feeds.
    Example when 1 is pressed, the main 640x480 window will display Feed1, and Feed4 will go into Feed1's old window which is 320x240.
    Next, if 2 is pressed, Feed1 will go into the 320x240 window of feed2 and Feed2 will go into the main window.
    Any idea how to achieve these dynamics?
    Thanks again.

     
    • Hi Ciphered.

      Snowmix as such does not implement any code to read keystrokes. It only accepts command lines, one command per line generally although it under certain circumstances can be possible to send multiple commands per line

      What you need is an application that records keystrokes and send commands to Snowmix. There are many ways to do that.

      One way is to do it like Snowcub.tcl does it. Snowcub uses Tk/Tcl and uses bind to bind an event like a keystroke or a mouse button pressed. For that it uses the command bind.

      Another way would be to use the toolkit Tk with Perl, Python and other languages. It works in similar way as it it the same toolkit. You bind a key event to some code that will send a command to SNowmix.

      A third way is to write a program in C, C++, C# etc to do exactly the same binding a key event to code to execute.

      A fourth way would be to use a browser, where you in Javascript can bind a key press event to some javascript code that then either directly or indirectly sends a command to Snowmix.

      What command to send to Snowmix depends on your configuration and layout, but I assume that is not your problem.

      Regards

      Peter

       
  • ciphered1
    ciphered1
    2014-05-26

    Hi Peter,

    I am using curl mainly and sending telnet commands.

    What concerns me is how to dynamically move the feeds, i thought of creating macros but to dynamically read the main feed and know how to swap directly is a bit hard for me to render

    Thanks

     
    • Hi Chiphered.

      Not sure why you are using curl and telnet, but I'm sure there is a reason.

      For sending command line commands to Snowmix, I use nc also known as netcat. There exist at least two versions for Linux. One takes a flag to specify port, the other doesn't. What I do to change a virtual feeds alpha to zero could be this

      echo 'virtual feed move alpha 1 -0.04 25' | nc 192.168.1.10 9999
      

      If you want to move placement, then send the move coor command. Keeping state of what you are doing is beyond the scope of this forum. That is just plain programming for beginners.

      Best regards

      Peter

       


Anonymous


Cancel   Add attachments