Help with pangoscript and universe

Discussion in 'PangoScript, Universe and Midi Templates' started by Garrett_502, Nov 28, 2019.

  1. Garrett_502

    Garrett_502 Well-Known Member

    I’m setting up a universe with custom buttons commands.
    firstly. I have a few buttons that I’m using to toggle cues in the workspace. The problem I’m having is that when i press a cue button I’ve made in the universe with the toggle cue pangoscript command, it stops all the other cues in the universe I’ve made, even when ‘multi-cue’ is selected. How can I set up buttons to trigger specific cues in the workspace without turning other cues off. If i click them in the grid, it doesn’t do it. Only in the universe with toggle cue pangoscript command.

    second. I have a timeline show with audio saved to a cue in the workspace. I want to make a button to trigger the cue in the universe, but when I toggle the cue, I want the audio and laser to fade in and out. How can I do this?
     
  2. Igor Strakhov

    Igor Strakhov Staff Member

    Hi, Garrett_502!

    Instead "toggle cue" you need to use a sequence of commands:
    CueDown 1,2
    CueUp 1,2

    To control volume and brightness you can use the command "AnimateProp".
    For example:
    Master.Brightness=0
    Master.AudioVolume=0
    CueDown 1,3,0
    CueUp 1,3,0
    AnimateProp "Master.Brightness", 0, 100, 4000
    AnimateProp "Master.AudioVolume", 0, 100, 4000

    Brightness can be controlled only for a specific cue (see Live-Control parameters).
     
  3. Garrett_502

    Garrett_502 Well-Known Member

    I’m a little confused, but I’ll see what I can do. ‘Animate prop’ will fade volume and brightness up or down?
     
  4. Garrett_502

    Garrett_502 Well-Known Member

    I figured out the cueup, cuedown script. I’m having trouble with the animate prop feature. I want to make a specific cue’s audio and brightness fade out when I deselect the cue only. Let’s say the cue is 58,4. What was the 0 you put for the third number for? And 4000?
     
  5. Garrett_502

    Garrett_502 Well-Known Member

    Also how can I make a simple master volume slider?
     
  6. Igor Strakhov

    Igor Strakhov Staff Member

    You can view the command format in Pangoscript help in the Pangoscript editor:
    =============================================================
    Property Animation

    Property animation designed for linear change of property from one state to another during some period of time. Technically, this is sort of micro script, but BEYOND does this job automatically. Internally BEYOND has internal list of the tasks for object property animation. The list is dynamic. The only way to create request for property animation is a script.

    Note, the execution of property animation performed right after execution of all script by dedicated thread of BEYOND. The time resolution is ~ 40 "FPS". For animation of laser related properties it might be not perfect because laser projector frame rate may be much higher.

    AnimateProp PropertyName, StartValue, FinishValue, DurationMS, FinishEvent
    PropertyName - string that contain complete name of object and its property. The property must be numeric.
    StartValue - number. Specify start value of the property during animation
    FinishValue - number. Specify final value of the property during animation.
    DurationMS - duration of animation in milliseconds
    FinishEvent - optional parameter, string. Specify name of Event that will be activated at the end of animation. Action equal to call of PulseEvent() procedure.

    Exmaple:
    AnimapeProp "Master.Brightness", 100, 0, 1000
    // command change value of Master brightness from 100% to zero during 1000 ms (one second)

    Example2 :
    AnimapeProp "Master.Brightness", Master.Brightness, 0, 500
    // command change value of Master brightness from current value to zero during 500 ms (0.5 second)


    AnimatePropDelta PropertyName, TotalDelta, DurationMS, FinishEvent
    PropertyName - string that contain complete name of object and its property. The property must be numeric.
    TotalDelta- number. Specify how much will change the value of specified property
    DurationMS - duration of animation in milliseconds
    FinishEvent - optional parameter, string. Specify name of Event that will be activated at the end of animation. Action equal to call of PulseEvent() procedure.

    Example:
    AnimatePropDelta "Master.Brightness", -25, 300 // decrease master brightness on 25% during 0.3 second

    Example 2:
    AnimatePropDelta "Master.Color", -32, b2ms(1) // shift color "slider" of master on 32 during 1 beat
    =============================================================================
     
  7. Igor Strakhov

    Igor Strakhov Staff Member

    You can use the 'Slider' component and variable 'Master.AudioVolume' in Universe
     
  8. Igor Strakhov

    Igor Strakhov Staff Member

    You can see which commands Beyond performs for different user actions, if you enable the following checkbox:
    View attachment upload_2019-12-4_1-41-37.png
    So, for example, I saw which commands are performing Beyond when cue is pressed. There I also saw 0 as the 3rd parameter :)

    As for the "fade out when I deselect the cue ", there are two options:

    1. Use a separate button to start and stop playing cue.
    In Stop button use the next sequence of commands:
    AnimateProp "Master.Brightness", 100, 0, 4000
    AnimateProp "Master.AudioVolume", 100, 0, 4000
    StopCue 58,4

    2. Use one button for start and stop playing cue.
    Create a variable that will monitor the cue state (played or not) and run the sequence of commands when the playback stops:
    CueDown 58,4
    CueUp 58,4
    AnimateProp "Master.Brightness", 100, 0, 4000
    AnimateProp "Master.AudioVolume", 100, 0, 4000