Midi to PangoScript

Discussion in 'PangoScript, Universe and Midi Templates' started by Bob@Pangolin, Aug 10, 2012.

  1. Bob@Pangolin

    Bob@Pangolin Staff Member

    Want to learn how to connect your MIDI device to BEYOND with PangoScript?


    There are a lot of PangoScript commands that you can use in combination with MIDI. Using the power of PangoScript and the other features of BEYOND,
    we made it possible to use almost every MIDI device that is out there!

    You can find a list of commands within the PangoScript editor that is built into BEYOND.


    To make it easy during the programming process, we advise you to open one of the MIDI monitors that are build into BEYOND.

    (can be opened by following the menu : View >> Show Midi Monitor)

    (can be enabled in the configuration of beyond : Settings >> Configuration >> Preview Window)

    (can be viewed when opening your midi device configuration)

    You can easily, turn a dial, press a button, or move an slider to jump to the corresponding line in the Script Editor. You will notice that it will match the same address as shown in the MIDI monitor.

    So how do I use it?

    In the first examples, I will set the brightness in various ways.
    You can replace brightness with other functions, but I will keep it simple for now. The Script editor always shows the functions that are available in the version you are using.

    For my examples we will use the script:

    Brightness 100 // 0..100 (percents)
    This function controls the brightness of all zones.
    The above example shows an absolute statement.
    The statement is 100. 100% in this case.
    The text behind the // is for quick reference and is not needed for scripting.

    We recommend you place separate commands onto separate lines in the editor.
    There is no need to put a line termination character (such as ; ) at the end of a line.
    If you are accustomed to doing that because of C or Pascal programming, that is okay, and the script editor will not mind, but it is not needed.

    We will start with a MIDI button.

    When you have opened the MIDI window of your device, press a button to jump to the line that controls the button you want to program.
    Double click the empty line to open the editor.
    (note that some buttons have 2 states, on and off. Choose ON in most cases)

    I want this MIDI button to set my brightness of all my zones to 50%, so I enter the following line in the script editor

    Brightness 50
    Close the editor, the button is programmed and thats all there is to it!

    For an encoder or slider we need to change the script a bit.

    A normal slider or encoder changes MIDI commands from 00 till 7F, so if you want to assign the master brightness to it, you need to enter the following code:

    Brightness ExtValue (0,100)
    Close the editor, and thats it.

    What we just have done is this; we want brightness, and we want to control it from 0% to 100%.

    As we don't want to enter long lines of code to reprogram a controller, we use the statement ExtValue (minimum,maximum).

    ExtValue can be used with almost any function that uses values.
    Except for functions with On, Of or Toggle as value. (These values are made for assignment to buttons or usage within a script it self.)

    We could also say that we want to control the brightness only from 10 to 100%. This is easily done by changing the script to:

    Brightness ExtValue (10,100)
    Easy as pie :cool:

    If I had used the function "AngleY 0 // degree" in my examples, then I could have used the scipt "AngleY ExtValue (-360,360)" to control the Y angle on a slider or encoder.

    But what if you only want to control the brightness of only the first zone?
    We have to extend the script a bit:

    ControlZone 1
    Brightness ExtValue(0,100)
    ControlZone defines the parameter that you want to control and on the next line you enter the function you want to change.

    You could also do this, to control 3 zones;

    ControlZone 1
    Brightness ExtValue(0,100)
    ControlZone 2
    Brightness ExtValue(0,100)
    ControlZone 3
    Brightness ExtValue(0,100)
    As long as you put every command on a new line, the function will be used.

    Encoders which have only two states:

    If you have an encoder that has only sends out 2 values (shown in the midi editor as 00 and 7F), and you want to control brightness with it use the following command:

    Brightness ExtValue (1,-1)
    This adds one, and removes 1, as soon as you rotate the encoder in various ways.

    So now you know how to program an button, to program an encoder and an slider with your own preferred commands.
    Last edited: Jan 19, 2017
  2. Stuka

    Stuka Well-Known Member

    Very cool- -thanks Bob! :cool:

    Question -

    Is the PangoScript programming saved as part of the current workspace, or are the settings saved in some other location?


  3. Bob@Pangolin

    Bob@Pangolin Staff Member

    Hi Randy,

    All settings will be saved in an individual file.
    At the moment, the current released version does not have this version.
  4. Jem

    Jem Active Member

    O.K., so I want to map Channel one in Beyond to a MIDI controller, MIDI slider (Address BO OO)

    I have located 'B0 00' and entered the following pangoscript code:

    ChannelOut 1, ExtValue(1,100)

    It doesn't work :eek:, any idea where i'm going wrong? I'm using version 1.60, build 452.


    Last edited: Sep 24, 2012
  5. Jem

    Jem Active Member

    Sorted (I think) ;)

    I think there's a problem in this version as the indicator bar on the Beyond Channel is indicating that it's working (and the image is changing in the preview window), but the Channel slider itself doesn't move.

    Methinks I need an updated version and all will be good :)
  6. Bob@Pangolin

    Bob@Pangolin Staff Member

    Hi Jem,

    Yes thats true, if you contact us directly, you can ask for a newer build where this problem is already solved.

    You can contact us through: http://www.pangolin.com/contact/
    Or if you already are in contact with one of us through Email, contact us on that.
  7. mkobzar

    mkobzar Member

    I have a question about midi out. I use a APC40 MK2, it work well (after learn), but I cant understand how to send command to light button.

    For example: I press 1 button, cue is start playing, and I want to see green or any color light button.

    Beyond 1.95 build 667
    win 7-64 in parallels in mac os Yosemite

  8. Bob@Pangolin

    Bob@Pangolin Staff Member

    As soon as akai publishes the command documentation of the MK2, i can look into it.

    But till then, we need to wait.
  9. mkobzar

    mkobzar Member

    Hello. Some questions about midi to universe.
    1. I create a button with master effect - color blue. It works on Universe as toggle button.
    I want map it to button on my AkaiAPC40mk2, but can't understand command.
    I'm start with "sliders.blue" layout name.button name but what next?
    Last edited: Feb 20, 2015
    PrismProductionsCO likes this.
  10. Marnic

    Marnic Member

    Hello Bob,

    I've a question about dmx to pangoscript.
    When I try to control the brightness with dmx to pangoscript I use the code: Brightness ExtValue (1,100).

    When I move the slider on my lightconsole the brightness in Beyond will only switch on and off it will not dim.

    If I check the dmx monitor in Pangolin Beyond I see the value moving between 1 thru 100 percent when I move the slider so thats not the problem.

    Or is the problem in the software 2.0 which I use?

    I look forward to your reply.


  11. Bob@Pangolin

    Bob@Pangolin Staff Member

    did you already try to use (0,100)?
  12. Marnic

    Marnic Member

    Thanks for the quick reply.

    Yes I've tried different value's for example:
    Brightness ExtValue (0,100)
    Brightness ExtValue (50,100).
    It will react but it will only switch from 0 to 100 and back in the first example and switch from 50 to 100 and back in the second example.
  13. Bob@Pangolin

    Bob@Pangolin Staff Member

    Try extdelta (1)
  14. Marnic

    Marnic Member

    I've tried extdelta but I got the same problem it wil only switch on/off
  15. Bob@Pangolin

    Bob@Pangolin Staff Member

    Its a dmx console?

    If you check the dmx input monitor on BEYOND, does it receive all values of that DMX channel?
  16. Marnic

    Marnic Member

    Yes it's a dmx console.
    Yes, when I move the slider of that channel I see all the values from 0 thru 255 in the dmx input monitor on Beyond. So the dmx input is good.
    I use an enttec usb pro and Beyond 2.0 Build 699 B.
  17. Marnic

    Marnic Member

    Or is it the problem that it is the SLE version?
  18. Bob@Pangolin

    Bob@Pangolin Staff Member

    Can you try this?

    brightness extvalue (0,100) ?
  19. Marnic

    Marnic Member

    Hey Bob,

    I've tried it but I got the same problem...
  20. Bob@Pangolin

    Bob@Pangolin Staff Member

    Did you guys disable the "FB3-style dmx in control"?

    Settings >> DMX >>DMX / Art-net setup >> Tab "input option".