Posts by deepRED.tv

BECOME PART OF THE COMMUNITY - Sign up here

    Ah, yes. The two dots where the problem. Thank you so much! :)


    Can you explain what reasoning is? Why do you need to add two dots at the beginning and the end when a variable is in the middle of a command and only two dots at the beginning of the variable when it is placed at the end of the command?

    I'm following the Lua for grand ma2 course by "aguynamedjonas" on ma3. Because the tuts are made for ma2 I have to use ma3 commands instead of ma2 commands and most of the time I get it to work. I do however have a question on the following.

    In the tutorial about functions we are trying to make a very simple plugin that has one function that selects a exec and an other function that calls the function that selects the exec. The first function that selects the exec is giving the problems.


    The ma3 system monitor is giving the following error: LUA: no reference to main function found for pluging (name of plugin)


    This is the function:


      pageNo = 2
      executorNo = 203


    function selectExec(pageNo, executorNo)

      Cmd("select page "..pageNo.." executor "..executorNo..)
    end

    return selectExec



    Can you please explain what i'm doing wrong?

    External Content www.youtube.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    According to that logic my two plugins would work together in one script if I changed the name one of the functions? Tested that and no joy… I would really love to understand what’s going on precisely. Hopefully the course of Jonas will give some answers. I started this but stopped after tut 4 since the syntax for first example, printing “Hello World!” was completely different under ma3. I assumed that this would be the case for a lot of the other exercises. I’ll restart the course if you think it’s good. Thanks again.

    Hi There,


    I would like to combine two scripts I have modified. Both work individualy but when combined they stop working. Noob allert. Might be somthing very simple?


    So, I managed to modify an existing lua script to my liking. The script enables a user to select a fixture type (set a variable) using a popup. The script prints these in the system monitor so I know the variables are indeed defined.


    This is the script:


    local fixture_input = 0

    function Main(display_handle)
        -- Select Fixture Type
        local Fixture_input = PopupInput({title="Fixture Type", caller=display_handle, items={"Spot","Beam","Wash","Led_1","Led_2","Strobe","Blinder","CANCEL"}})
       
        if Fixture_input == 0 then
            Fixture_type = "Spot"
            Printf(""..Fixture_type.."")
           
        elseif Fixture_input == 1 then
            Fixture_type = "Beam"
            Printf(""..Fixture_type.."")
           
        elseif Fixture_input == 2 then
            Fixture_type = "Wash"
            Printf(""..Fixture_type.."")
           
        elseif Fixture_input == 3 then
            Fixture_type = "Led_1"
            Printf(""..Fixture_type.."")
           
        elseif Fixture_input == 4 then
            Fixture_type = "Led_2"
            Printf(""..Fixture_type.."")
           
        elseif Fixture_input == 5 then
            Fixture_type = "Strobe"
            Printf(""..Fixture_type.."")

        elseif Fixture_input == 6 then
            Fixture_type = "Blinder"
            Printf(""..Fixture_type.."")

        elseif Fixture_input == 7 then
            Printf("Plugin execution is Canseled")
            return Main
        end

    end
    return Main


    I also managed to modify an existing scipt to enable me to write some sequences and assign a group, preset and matricks pool item to a recipe in a cue part. I would like to use the variable "Fixture_type" which I have set in the previous mentioned popup script in the script I use to store the sequences. Both scripts work when put in a plugin individualy but if I combine the two in one plugin both stop working.


    Here is the script that writes the sequences:


    local startsequence = 1


    --Here I test if the variable "fixture_type" is working. It is. I remove this when combining the two scripts off-course.
    local Fixture_type = "Blinder"


    --Variables list Sequence name
    local sequence_name = {
        ""..Fixture_type.."_Sym_1/2_Block",
        ""..Fixture_type.."_Sym_2/2_Block",
        ""..Fixture_type.."_Sym_1/2_2Fix",
        ""..Fixture_type.."_Sym_1/2_2Fix",

    }

    --Variables list Matricks pool items
    local matricks_4fixtures_name = {
        "1Fix_1/2_Sym",
        "2Fix_1/2_Sym",
        "3Fix_1/2_Sym",
        "4Fix_1/2_Sym",

    }

    function main()
        Echo("This is a test message")

        --loop
        for i=1, 4 do

        --commands , store sequence
            Cmd("Store sequence " ..i.." /o")
           
            --store cue and cue parts
            Cmd("Store sequence "..i.." cue 1 part 4 /o")
            Cmd("Store sequence "..i.." cue 1 part 8 /o")
            Cmd("Store sequence "..i.." cue 1 part 12 /o")
            Cmd("Store sequence "..i.." cue 1 part 16 /o")

            --assign, group preset and matricks group of 4 fixtures
            Cmd("Assign group "..Fixture_type.."_4 at sequence "..i.." cue 1 Part 4.1/o")
            Cmd("Assign preset 21."..Fixture_type.."_FG_Bump at sequence "..i.." cue 1 Part 4.1/o")
            Cmd("Assign Matricks "..matricks_4fixtures_name[i].." at sequence "..i.." cue 1 Part 4.1/o")

            --assign, group preset and matricks group of 8 fixtures
            Cmd("Assign group "..Fixture_type.."_8 at sequence "..i.." cue 1 Part 8.1/o")
            Cmd("Assign preset 21."..Fixture_type.."_FG_Bump at sequence "..i.." cue 1 Part 8.1/o")
            Cmd("Assign Matricks 2Fix_1/2_Sym at sequence "..i.." cue 1 Part 8.1/o")

            --assign, group preset and matricks group of 12 fixtures
            Cmd("Assign group "..Fixture_type.."_12 at sequence "..i.." cue 1 Part 12.1/o")
            Cmd("Assign preset 21."..Fixture_type.."_FG_Bump at sequence "..i.." cue 1 Part 12.1/o")
            Cmd("Assign Matricks 3Fix_1/2_Sym at sequence "..i.." cue 1 Part 12.1/o")

            --assign, group preset and matricks group of 16 fixtures
            Cmd("Assign group "..Fixture_type.."_16 at sequence "..i.." cue 1 Part 16.1/o")
            Cmd("Assign preset 21."..Fixture_type.."_FG_Bump at sequence "..i.." cue 1 Part 16.1/o")
            Cmd("Assign Matricks 4Fix_1/2_Sym at sequence "..i.." cue 1 Part 16.1/o")

            Cmd("Label sequence "..i.." "..sequence_name[i].."")

        end
    end

    return main


    My question is: how can I combine the two scripts? I want to be able to use the variable I defined in the first popup script and use this in the second script in which I write the seq's.


    Hope you can help. Please be kind. This is my first week into Lua. :)

    Here is an example of the macro I call in de cdm field of the cue containing the recipe to set the width of the first step of the corresponding phaser. Its annoying that it runs through the programmer and i agree totally that since the step width is so important to build your phasers it should be somehow possible to set this not using the programmer and setting phaser parameters should become part of the recipe ecosystem? Anyway, here's my workaround:


    Blind ClearAll

    Edit Preset 21."SpotMetaPhaser"

    Attribute dimmer At Width 50 Step 1

    Attribute ColorRGB_R At Width 50 Step 1

    Attribute ColorRGB_G At Width 50 Step 1

    Attribute ColorRGB_B At Width 50 Step 1

    Update Preset 21."SpotMetaPhaser" /NoConfirm

    ClearAll

    Blind Off


    If someone could help me to write an macro that sets the width of all parameters all at once I would be super happy...


    Andreas helped me and now my macro looks like this:


    Blind ClearAll

    Edit Preset 21."SpotMetaPhaser"

    Set UserProfile 1 Property "EncoderLinkPhaser" "AtFilter"

    At Width 33 Step 1

    Update Preset 21."SpotMetaPhaser" /NoConfirm

    Set UserProfile 1 Property "EncoderLinkPhaser" "Single"

    ClearAll Blind Off


    Thank again Adreas! ^^ :thumbup:

    Feature is implemented.


    External Content youtu.be
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    Tip, if you edit a layout view object in the layout view pool you get a excel like overview of all the objects you have in your layout. Editing of multiple items at the same time is very easy here.

    Guys,


    Some input on step width vs phase.


    If I want to make a odd even dimmer chase using my template 2 step phaser, I keep the step width of 1 and 2 of the template phaser at 100%. In MAtricks I add a grouping of 2. Then I apply a phase of 0 thru 360. The transition time of both the steps determines the fade time.


    If I want to make a 1 in 3 dim chase I change the step width of step 1 to 50% and step 2 I leave at 100%. In MAtricks I add a grouping of 3. Then I apply a phase of 0 thru 360.

    This way the width of step 1 and 2 combined can be divided by 3. 50% + 100% results in 50% step width for each of the 3 steps. For a 1 in 4 chase, I set step 1 to 33%. And so on. You get the point. No complicated phaser calculations needed. It just works with a phase of 0 thru 360. And I even believe every phaser distribution works. --> I just checked this last part and its not true! Using this step width method you must always use a phase of 0 thru 360 to achieve a 1 in x chase.


    I have a macro which I trigger in the cmd field to set the width of the corresponding group (grid) count of the template phaser. When I’m home I’ll share it here. It is simple way to achieve what the op wants as I understand it.


    Sadly the desk does not adapt the phaser and MAtrickt settings when the corresponding group (and thus grid count) is updated.


    If you have found a simple solution for that. I would love to hear it…