moroccomoose

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Sysex formular in list box modulator #118840
    moroccomoose
    Participant
      • Topics: 5
      • Replies: 6
      • Total: 11

      Yes, it’s an E-MU Proteus 2000, no check sum. Thanks for the code, I’ll give it a whirl tonight and let you know how I got on.

      Moose.

      moroccomoose
      Participant
        • Topics: 5
        • Replies: 6
        • Total: 11

        Well, I finally sussed it!

        I ended up writing it all out long hand here is an example of the code I used

        [code:24ym0bbv]if newValue < 0 then Choice = 0 end
        if newValue > 10 then Choice = 10 end

        –Settings for pedals 1-10

        if Choice == 0 then

        –Maestro Echoplex

        panel:getModulatorByName("DelayTime"):getComponent():setPropertyInt("componentVisibility",1)
        panel:getModulatorByName("DelayTime"):getComponent():setPropertyString("componentVisibleName","Time")
        panel:getModulatorByName("DelayFeedback"):getComponent():setPropertyInt("componentVisibility",1)
        panel:getModulatorByName("DelayFeedback"):getComponent():setPropertyString("componentVisibleName","Feedback")
        panel:getModulatorByName("DelayTone"):getComponent():setPropertyInt("componentVisibility",1)
        panel:getModulatorByName("DelayTone"):getComponent():setPropertyString("componentVisibleName","Tone")
        panel:getModulatorByName("DelayDucking"):getComponent():setPropertyInt("componentVisibility",0)
        panel:getModulatorByName("DelayDucking"):getComponent():setPropertyString("componentVisibleName","—")
        panel:getModulatorByName("DelayOption"):getComponent():setPropertyInt("componentVisibility",1)
        panel:getModulatorByName("DelayOption"):getComponent():setPropertyString("componentVisibleName","Lo Damp")
        panel:getModulatorByName("DelayMix"):getComponent():setPropertyInt("componentVisibility",1)
        panel:getModulatorByName("DelayMix"):getComponent():setPropertyString("componentVisibleName","Mix")

        end

        [/code:24ym0bbv]

        A different set of Visibility and names settings for each different value of choice

        I think I’m getting there, but there are a couple more things I want to do to get the panel finished…..!

        I’ll keep plugging away.

        moroccomoose
        Participant
          • Topics: 5
          • Replies: 6
          • Total: 11

          OK, a few things I tried.

          Firstly I had the word ‘panel’ as part of my method name. I changed the method name to not include the word ‘panel’ and at least now instead of a run time error, I get syntax errors with line numbers etc which helps debug.

          I have fixed the ‘check which pedal was chosen’ code. I can tell because any errors come from a line number in the appropriate ‘if’ sub-routine for the pedal selected. <img decoding=” title=”Very Happy” />

          Each of the pedal subroutines are the same as the code below, but with different componentVisibleNames and componentVisibilty

          [code:2fj75dom]if Choice == 0 then

          –compressor pedal MXR Super Comp

          PedalDrive=panel:getModulatorByName("PedalDrive")
          PedalDrive:setComponentText(componentVisibleName,"Sens")
          PedalDrive:setPropertyString("componentVisibility","1")
          PedalLevel=panel:getModulatorByName("PedalLevel")
          PedalLevel:setComponentText ("componentVisibleName","Level")
          PedalLevel:setPropertyString ("componentVisibility","1")
          PedalTone=panel:getModulatorByName("PedalTone")
          PedalTone:setComponentText ("componentVisibleName","—")
          PedalTone:setPropertyString ("componentVisibility","0")
          PedalManual = panel:getModulatorByName("PedalManual")
          PedalManual:setComponentText ("componentVisibleName","—")
          PedalManual:setPropertyString ("componentVisibility","0")
          PedalType = panel : getModulatorByName("PedalType")
          PedalType:setComponentText ("componentVisibleName","—")
          PedalType:setPropertyString ("componentVisibility","0")[/code:2fj75dom]

          When I select a pedel, I get an error refering to this line of code:

          PedalDrive:setComponentText(componentVisibleName,"Sens")

          The error is:

          Error message:
          [string "…"]:30: attempt to call method ‘setComponentText’ (a nil value). Method disabled

          If I swap the order of the setComponentText line with the setPropertyString line then I still get the same error referring to the setComponentText. Even though no error was found for the setPropertyString line, the knob does not go invisible. (I checked by setting the visibility to 0 although in the code above it is set to 1 which would be the intended setting.)

          I hope this is clear! <img decoding=” title=”Confused” />

          Cheers

          moroccomoose
          Participant
            • Topics: 5
            • Replies: 6
            • Total: 11

            SO now I think I have the syntax right for setting the controller’s visibility and name legend. How do I set about making the correct set of values depending on the selection in ‘PedalList’ which is a drop down list with 15 entries

            SO I want to check the modulator value in pedallist drop down and set the values for the other controllers in the same group accordingly. eg if pedal 0 is selected in pedal list then only 2 knobs appear labelled ‘Sens’ and ‘Level’ if pedal 1 is selected then 3 knobs appear labelled ‘Drive’, ‘Level’ and ‘Tone’

            SO I get the object (Panellist) and check its value, then us if/then to set the other knob props

            Here’s my code!

            [code:jm7id1w4]–
            — Called when a modulator value changes

            panel:getModulatorByName("PedalList")

            if PedalList~=nil then

            PedalListNo = panel:getModulatorValue("PedalList")

            end

            if
            PedalListNo == 0 then

            PedalDrive = panel : getComponentbyname("PedalDrive")
            if PedalDrive~= nil then
            PedalDrive : setComponentText ("componentVisibleName" , "Sens")
            PedalDrive : setPropertyString ("componentVisibility" , "1")
            end
            PedalLevel = panel : getComponentbyname("PedalLevel")
            if PedalLevel~= nil then
            PedalLevel : setComponentText ("componentVisibleName" , "Drive")
            PedalLevel : setPropertyString ("componentVisibility" , "1")
            end
            PedalTone = Panel : getComponentbyname("PedalTone")
            if PedalTone~= nil then
            PedalTone : setComponentText ("componentVisibleName" , "Off")
            PedalTone : setPropertyString ("componentVisibility" , "0")
            end
            PedalManual = panel : getComponentbyname("PedalManual")
            if PedalManual~= nil then
            PedalTone : setComponentText ("componentVisibleName" , "Off")
            PedalTone : setPropertyString ("componentVisibility" , "0")
            end
            PedalType = panel : getComponentbyname("PedalType")
            if PedalType~= nil then
            PedalType : setComponentText ("componentVisibleName" , "Off")
            PedalType : setPropertyString ("componentVisibility" , "0")
            end

            end

            if
            PedalListNo == 1 then

            PedalDrive = panel : getComponentbyname("PedalDrive")
            if PedalDrive~= nil then
            PedalDrive : setComponentText ("componentVisibleName" , "Drive")
            PedalDrive : setPropertyString ("componentVisibility" , "1")
            end
            PedalLevel = panel : getComponentbyname("PedalLevel")
            if PedalLevel~= nil then
            PedalLevel : setComponentText ("componentVisibleName" , "Level")
            PedalLevel : setPropertyString ("componentVisibility" , "1")
            end
            PedalTone = Panel : getComponentbyname("PedalTone")
            if PedalTone~= nil then
            PedalTone : setComponentText ("componentVisibleName" , "Tone")
            PedalTone : setPropertyString ("componentVisibility" , "1")
            end
            PedalManual = panel : getComponentbyname("PedalManual")
            if PedalManual~= nil then
            PedalTone : setComponentText ("componentVisibleName" , "Off")
            PedalTone : setPropertyString ("componentVisibility" , "0")
            end
            PedalType = panel : getComponentbyname("PedalType")
            if PedalType~= nil then
            PedalType : setComponentText ("componentVisibleName" , "Off")
            PedalType : setPropertyString ("componentVisibility" , "0")
            end

            end

            — this will be repeated for all 15 pedals each with different names/visibility
            [/code:jm7id1w4]

            Sorry if I’m being hard work!! :-s I really would like to understand it properly and make more panels.

            Thanks in advance!

            moroccomoose
            Participant
              • Topics: 5
              • Replies: 6
              • Total: 11

              Hi Atom,

              Thanks for the reply. I’m still missing a trick some where.

              I tried this code:
              [code:2izc5qiy]Panellist = function (modulator,newvalue)

              panel:getModulatorByName("PedalList")

              PedalNo = getmodulatorvalue()

              if PedalNo > 15 then PedalNo = 15 end
              if PedalNo < 0 then PedalNo = 0 end

              if PedalNo == 0 then

              PedalDrive = Panel:getComponentbyname("PedalDrive")
              setComponentText ("componentVisibleName" , "Sens")
              setPropertyString ("componentVisibility" , "1")
              PedalLevel = Panel:getComponentbyname("PedalLevel")
              setComponentText ("componentVisibleName" , "Drive")
              setPropertyString ("componentVisibility" , "1")
              PedalTone = Panel:getComponentbyname("PedalTone")
              setComponentText ("componentVisibleName" , "Off")
              setPropertyString ("componentVisibility" , "0")
              PedalManual = Panel:getComponentbyname("PedalManual")
              setComponentText ("componentVisibleName" , "Off")
              setPropertyString ("componentVisibility" , "0")
              PedalType = Panel:getComponentbyname("PedalType")
              setComponentText ("componentVisibleName" , "Off")
              setPropertyString ("componentVisibility" , "0")

              end

              end[/code:2izc5qiy]

              I just get a ‘Callback error’ Lua runtime error

              Am I getting any closer? Once I can crack this, I’ll copy the syntax for the other FX drop downs. Would you recommend individual methods for each drop down, or one long method.. Does it matter?

              Thanks for looking at this so far.

              Cheers

              in reply to: Vox ToneLab LE Panel – Done, but could be better #4270
              moroccomoose
              Participant
                • Topics: 5
                • Replies: 6
                • Total: 11

                Okay, so I had a major breakthrough last night and managed to create a midi received LUA script for the panel and now all my knobs update if the hardware is tweaked.

                I’m still having some problems, but I think it is as much to do with my MIDI comprehension as it is working out CTRLR.

                That’s all for now!

              Viewing 6 posts - 1 through 6 (of 6 total)
              Ctrlr