Results 1 to 5 of 5

Thread: Pangoscript Code Fragments

  1. #1
    Join Date
    Oct 2007
    Location
    Vancouver, Canada
    Posts
    326

    Default Pangoscript Code Fragments

    I tried searching for any threads re sharing of pangoscript code and couldn't find anything, so figured I'd start this thread as a place to paste anything you might find useful.

    Dual (or more) purpose faders :
    (This assigns a toggle button to shift the faders to allow for a second purpose for them, and could be modified for multiple shift buttons or multiple presses of a single shift button to cycle through more functions)

    To start with add this to initialization script (under the scripting tab of the midi controller settings)
    Code:
    globalvar myfadershift
    myfadershift = 0
    The either run the initialization script or exit and restart beyond

    Then choose a button you want to use for the shift function, in this example I used #1 of the track selection on the apc40 (90 33 xx and 80 33 xx)

    So under 90 33 xx in pangoscript setting under the midi controller add this

    Code:
    if (myfadershift = 0) goto toggleon
    if (myfadershift = 1) goto toggleoff
    toggleon:
    myfadershift = 1
    MidiOut 0x90, 0x33, 0x7F
    exit
    
    toggleoff:
    myfadershift = 0
    MidiOut 0x90, 0x33, 0x00
    exit
    Then I'll use fader #3 in this example (B2 07 xx)

    Add the following code under b2 07 xx (using brightness and scanrate as examples, modify as needed)

    Code:
    if (myfadershift=0) goto scanrateset
    brightness ExtValue(0,100);
    exit
    
    scanrateset:
    ScanRate ExtValue(0,200);
    exit
    Of course you'll need to modify this code as needed and apply to any fader you want a double function for.
    Last edited by m0f; 06-22-2014 at 23:25.

  2. #2
    Join Date
    Oct 2007
    Location
    Vancouver, Canada
    Posts
    326

    Default

    Just made this one tonight, here's some code for a slider for variable rotation for 6 lasers. For "star geometry" circular mounting, set slider values max 30, min 0. For example with max of 30, lasers would be at 30, 90, 150, 210, 270, 330 degrees for a circular formation, and variable anywhere in between. You'll need to adjust your zone names to fit your setup.


    Code:
    // PangoScript code template
    // .. put you initialization command here
    var leftangle
    var rightangle
    var midleftangle
    var midrightangle
    var farleftangle
    var farrightangle
    
    exit // each section always should have EXIT command
    
    OnChange:
    // put your code below
    
    leftangle = value
    rightangle = 0 - value
    midleftangle = 3 * value
    midrightangle = 0 - (3 * value)
    farleftangle = 5 * value
    farrightangle = 0 - (5 * value)
    
    ClickLCTabMode 3 // 1-Master, 2-Cue, 3-Zone
    ControlZone "Far Right"
    AngleX 0
    AngleY 0
    AngleZ farrightangle
    ControlZone "Left"
    AngleX 0
    AngleY 0
    AngleZ leftangle
    ControlZone "Right"
    AngleX 0
    AngleY 0
    AngleZ rightangle
    ControlZone "Mid Left"
    AngleX 0
    AngleY 0
    AngleZ midleftangle
    ControlZone "Mid Right"
    AngleX 0
    AngleY 0
    AngleZ midrightangle
    ControlZone "Far Left"
    AngleX 0
    AngleY 0
    AngleZ farleftangle
    ClickLCTabMode 1 // 1-Master, 2-Cue, 3-Zone
    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

  3. #3
    Join Date
    Sep 2009
    Location
    Brno, CZ / Povazska Bystrica, SK
    Posts
    491

    Default

    ...and then an ancient old man all covered in moss has spoken (in the voice of Deckard Cain): "Yes... yes... i recall a very old memory, there was a time when we used to code with GOTO"

  4. #4
    Join Date
    Oct 2007
    Location
    Vancouver, Canada
    Posts
    326

    Default

    I remember using it in basic back in the days of the commodore

    I am wondering if anyone knows if there is a command / variable to control multi zone time shift for an entire FX layer ? There is one for master cues, and also one in each individual effect, but I can't seem to find one to control an entire layer of fx.

    The reason is I find if trying to apply multi zone time shift to more than one effect, it will only work properly for one effect at a time, and if master cue multi zone time shift is turned on, the individual effect time shifts stop working. I'm not sure if it's a bug or just a general limitation ?

    But if there was one that would work for an entire layer of fx, and preferably with individual control of all 4 layers at once, that would do the trick.

  5. #5
    Join Date
    Oct 2007
    Location
    Vancouver, Canada
    Posts
    326

    Default

    Also, does anyone know what the checkbox "Enable master effect shift for this effect" in the effect properties page does ? I can't seem to notice a difference either way, but think it might somehow have something to do with what I'm looking to do.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •