PangoScript syntax

Discussion in 'PangoScript, Universe and Midi Templates' started by AKDV, Feb 11, 2014.

  1. AKDV

    AKDV Member

    Hi,

    i want to change the AnimationSpeed of selected Zones (in Universe)
    with an slider or wheel.
    But i don't know the syntax to read out the value from an object (slider, wheel).

    Is there any documentation about the PangoScript language out there?

    Thanks
    Florian
     
  2. Helyx

    Helyx Active Member

    Hello,

    if you just want to change the speed of a zone, why do you want to read out the slider?

    Anyway. If you want to link the slider to the projection zone animation speed, just Link the fader in the "Link th external Object/Value" area to:
    <ZoneName>.AnimationSpeed
    and replace <ZoneName> with the Name of the Zone to want to control.

    Now if you want to read out the Value of the slider just make a Pangoscript with the following code.

    var x;
    x = var x;
    x = <UniverseLayoutName>.Slider<Number>.Value // just replace the values in the <>, for example: x = Testlayout.Slider1.Value


    now x contains the value of the slider.


    Greetings Helyx
     
    Last edited: Feb 12, 2014
  3. AKDV

    AKDV Member

    Thanks for your answer.
    I'll try it...

    var x;
    x = var x; <<-- this line is marked red ! So error ??
    x = <UniverseLayoutName>.Slider<Number>.Value

    TESTSCRIPT:

    OnChange:
    // put your code below
    var x;
    x = TEST.Slider1.Value

    ControlZone 1 // name as "Main Graphics", or zone number 1...N
    AnimationSpeed x // degree

    exit // do not remove EXIT

    It doesn't work :-(
     
    Last edited: Feb 12, 2014
  4. Helyx

    Helyx Active Member

    Whops,

    x = var x;

    is nosense. That was a copy paste mistake, sorry =)

    var x;
    x = <UniverseLayoutName>.Slider<Number>.Value // just replace the values in the <>, for example: x = Testlayout.Slider1.Value


    is correct.

    ControlZone 1 // name as "Main Graphics", or zone number 1...N
    AnimationSpeed x // degree

    Doesn't belong in this script, make a separate one for it (picture 1). You have to link it to the slider in the "Link th external Object/Value" area. See picture 2. In this example i've chosen MASTER, not a certain zone, for some trying to control the animation speed of a certain zone, doesnt work, other values like Position X do work. Idk if thats a bug or if i'm missing something.
    But this is how it SHOULD work (picture 3 upper half)
    The only point i dont get is why you can only execute the script once, if you try to execute it a 2nd time, it crashes ( see picture 3 lower half) :/
    when i use an external script (outside of universe) it works fine.

    Greetings
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      46.8 KB
      Views:
      28
    • 2.jpg
      2.jpg
      File size:
      56.7 KB
      Views:
      16
    • 3.jpg
      3.jpg
      File size:
      41.2 KB
      Views:
      16
    Last edited: Feb 12, 2014
  5. AKDV

    AKDV Member

    Thanks so far.
    I also tried other values (like size) and they worked...

    How do i link the created PangoScript (e.g. PangoScript1) to the slider?
    Tried "TEST.PangoScript1.Value" -> nothing happens :-(

    I have to control 3 Lasers (right, middle, left) with 2 Zones(HotBeams and Main) for each one.

    Now i want to set the animationspeed for all HotBeam-Zones to 0 or pause them.
    The 3 main zones should be untouched....

    Thats it ;-)

    P.S: There is no field to link Script to Slider :-(
     
    Last edited: Feb 12, 2014
  6. Helyx

    Helyx Active Member

    Why are you trying to do?

    Just create 6 slider with the method from above. (which actually SHOULD work, maybe we need to ask somebody from the pangolin team)

    ControlZone HotBeamZone 1
    AnimationSpeed 0
    ControlZone HotBeamZone 2
    AnimationSpeed 0
    ControlZone HotBeamZone 3
    AnimationSpeed 0


    ControlZone 1 // name as "Main Graphics", or zone number 1...N
    AnimationSpeed x // degree
     
  7. AKDV

    AKDV Member

    Thats a solution ! Thanks.
    I only thought that i could use the "ControlSelZones" for more flexibility ;-)

    Problem is, that i want to control them simultaniously.

    Link the script to the slider...how ?
     
    Last edited: Feb 12, 2014
  8. Helyx

    Helyx Active Member

    Just use your 6 fingers on your han.... oh wait.

    If you want to control a parameter of multiple zones, you should create a slider and write this code in the PangoScript Area of the slider

    // PangoScript code template
    // .. put you initialization command here


    exit // each section always should have EXIT command

    OnChange:
    // put your code below

    RGBAthmo.PositionX = value //<ZoneName>.<Parameter>
    SatAthmo.PositionX = value
    exit // do not remove EXIT

    OnMouseDown:
    // put your code below


    exit // do not remove EXIT

    OnMouseUp:
    // put your code below



    exit // do not remove EXIT



    But we have the same problem that everything but AnimationSpeed works.

    I was talking about linking the AnimationSpeed Fader to the slider. See picture 2. You have to write the object path in the "Link th external Object/Value" area
     
  9. ENOT

    ENOT Software Developer Staff Member

    There is standard "LiveControl" object that used in many places, such as Cues, Zones, or Master. The object incapsulate many parameters, such as FX, drop-effects, and so on. One of standard properties is Animation Speed. Animation Speed exists in all LC objects but used where is make sense.

    The short version of story: we play Cue, we do not play Zone. When we start Cue, BEYOND create player that has parameter time. The Animation speed control the time motion. But main point – the is one Cue, one Player, and one Time.
    You can control speed on Cue level. The Master level works together with Cue, both values are multiplied. But Zone level is something else. Cue produce one output for all zones. What means, Cue can not produce output with some speed for one zone, and with another speed for another zone.

    Zone has own time accumulation for its own FX. This is what you can control.

    In general, this is not a question of script, or universe. This is question of calculation path.

    Why you want to control animation speed of zone? In any case, you can control the speed of something that has a state. You may open Master Tab at right and see the sliders that control speed in various places. This tab offer control of all main places, all layers, maybe except the fancy things like effects with own time that react on Events.

    Tell me more about what you want, and we will see what can be done. If you need to run the same cue many times with different speed then this is one story. If the talk about various “time shiftâ€￾ things that this is another direction.

    Best Regards,

    Alexey
     
  10. ENOT

    ENOT Software Developer Staff Member

    A simple way to get information about all objects and its properties is Object Tree window that represent all existing “top levelâ€￾ objects in BEYOND. The list is complete, and it parse the structure dynamically, in real time. This window use internal “registryâ€￾ for objects. The same “registryâ€￾ used in script, or Universe components, or for /b/ server of OSC. So, if you need to know name of object/property then I recommend to use this window (see screenshot)

    Best Regards,

    Alexey.
     

    Attached Files:

  11. AKDV

    AKDV Member

    Hi,

    thanks for your detailed answer.

    I want to pause the animation on specified zones. -> animationspeed = 0
    E.g. my hotbeam-zones should be static beams.

    But the main zones have to move the normal way.

    So a master isn't the right solution.
     
  12. ENOT

    ENOT Software Developer Staff Member

    Yes, the master is not a solution. I recommend to look at this from this side. BEYOND calculate the output of "image" for some exact time. If you need two states (two different times), then you need two calculations. Two calculations... two players / two cues. Even if will be possible (it will) to play the one cue many times at once, then it still separate process.

    In any case, it is not posible to pause zone.

    In timeline you may consider to use two tracks, in grid - two cues, in livepro - two tracks.

    Best Regards,

    Alexey.
     
  13. AKDV

    AKDV Member

    The zones i want to control (pause or animationspeed) are playing the same cue.
    Can i read out the actuall playing cue of a zone in pangoscript
    and change the parameters for this cue?
     

Share This Page