iceleben

Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • iceleben
    Participant
      • Topics: 7
      • Replies: 13
      • Total: 20
      • β˜…

      ahh damnit, I already did that once in this Panel but thought, hey maybe theres an easier/better way. Thanks!

      iceleben
      Participant
        • Topics: 7
        • Replies: 13
        • Total: 20
        • β˜…

        Got it:
        newwritetest=function(–[[ CtrlrModulator –]] modulator, –[[ number –]] value)

        textable={}
        xvt=panel:getComponent(“RenameTxt2”):getProperty(“uiLabelText”)
        xvn=panel:getListBox(“FactoryBank1”):getLastRowSelected()+1

        xv0=L(panel:getListBox(“FactoryBank1”):getTextForValue(0)) textable[1]=xv0
        xv1=L(panel:getListBox(“FactoryBank1”):getTextForValue(1)) textable[2]=xv1
        xv2=L(panel:getListBox(“FactoryBank1”):getTextForValue(2)) textable[3]=xv2
        xv3=L(panel:getListBox(“FactoryBank1”):getTextForValue(3)) textable[4]=xv3
        xv4=L(panel:getListBox(“FactoryBank1”):getTextForValue(4)) textable[5]=xv4
        xv5=L(panel:getListBox(“FactoryBank1”):getTextForValue(5)) textable[6]=xv5
        xv6=L(panel:getListBox(“FactoryBank1”):getTextForValue(6)) textable[7]=xv6
        xv7=L(panel:getListBox(“FactoryBank1″):getTextForValue(7)) textable[8]=xv7

        textable[xvn]=xvt
        TestDat=table.concat(textable,” “..”\n”,1,8)

        xvtest=console(tostring(TestDat))

        panel:getComponent(“FactoryBank1old”):setPropertyString (“uiListBoxContent”,TestDat)
        end

        oh I see you replied…have to read that
        the MKS doesnt have any Tone or patchnames at all( I’m lucky I can skip that part :))but I thought it’ll be nice to have some reference in the Panel
        the MKS also works with 8 Banks with 8 tones and patches each thats why I went for 8 first..

        • This reply was modified 7 years, 10 months ago by iceleben.
        • This reply was modified 7 years, 10 months ago by iceleben.
        iceleben
        Participant
          • Topics: 7
          • Replies: 13
          • Total: 20
          • β˜…

          for the 2nd question I found a solution:
          newwritetest=function(–[[ CtrlrModulator –]] modulator, –[[ number –]] value)

          xvx=L(panel:getListBox(“FactoryBank1”):getTextForValue(0))
          xvy=L(panel:getListBox(“FactoryBank1”):getTextForValue(1))
          xvz=L(panel:getListBox(“FactoryBank1″):getTextForValue(2))
          xtext=tostring(xvx..”\n”..xvy..”\n”..xvz)
          panel:getComponent(“FactoryBank1old”):setPropertyString (“uiListBoxContent”,xtext)
          end
          works, but IΒ΄m sure you have a better one πŸ™‚ Still stuck with the first question

          • This reply was modified 7 years, 10 months ago by iceleben.
          • This reply was modified 7 years, 10 months ago by iceleben.
          • This reply was modified 7 years, 10 months ago by iceleben.
          iceleben
          Participant
            • Topics: 7
            • Replies: 13
            • Total: 20
            • β˜…

            Thx so much Goodweather,
            I tried to declare the Modulators in a called when the Panel has finished loading method but then I stumbled in the same Problems you had, tried the timer but still ist Buggy so for now I dropped it, if I see in your Panel how you managed that I’ll implement that as well πŸ˜‰
            While you are at the librarian manipulater – maybe you can help me again with something,again with the UiList Box. If I want to change the text from an UIListBox row (e.g. the one being clicked) with something I typed in a Ui Label what would be the Best way to do that? And is it possible to just Show 8 entries from an UiListBox that contains more then that?
            Cant await your Panel and as well the new Manual, without you I think I had allready given up..

            • This reply was modified 7 years, 10 months ago by iceleben.
            iceleben
            Participant
              • Topics: 7
              • Replies: 13
              • Total: 20
              • β˜…

              Goodweather, youre the Scripting hero!
              works fine:
              BankItem_OnClick = function(–[[ CtrlrModulator –]] modulator, –[[ number –]] value)
              xyz=L(panel:getListBox(“FactoryBank1”):getTextForValue(value))
              panel:getComponent(“LCD10”):setPropertyString (“uiLabelText”,string.format(“%s”,xyz))
              end
              So if I understand correctly in the function line there is the reference for modulator with its value being made.
              And then in the xyz…line the Modulator is ” panel:getListBox(“FactoryBank1″):” with the value being converted to the the Text…what exactly does the L stand for?
              BtW Im doing a Panel for the MKS80 work in Progress file attached below

              Attachments:
              You must be logged in to view attached files.
              iceleben
              Participant
                • Topics: 7
                • Replies: 13
                • Total: 20
                • β˜…

                Hi Goodweather,

                thx again, I tried it with:
                BankItem_OnClick=function(uiListBoxItemClicked,value)
                panel:getComponent(“LCD10”):setPropertyString (“uiLabelText”,string.format(“%s”,value))
                end
                but then again I get the number displayed but not the text from the List box

                But finally after a lot of ” I am groot” moments I found a solution that works and might be interesting for userdata Problems

                TextTestDisplay=function()
                xu=panel:getModulatorByName(“FactoryBank1”):getModulatorValue()
                lbDisk1 = panel:getListBox(“FactoryBank1″):getTextForValue(xu)
                xyz=lbDisk1+”” –this little sucker converts userdata to a string
                panel:getComponent(“LCD10”):setPropertyString (“uiLabelText”,string.format(“%s”,xyz))
                end

                My Brain hurts πŸ˜‰

                iceleben
                Participant
                  • Topics: 7
                  • Replies: 13
                  • Total: 20
                  • β˜…

                  What I’d like to do is – I already have an ui LCD Modulator that is showing some stuff

                  panel:getComponent(“ComScreen”):setPropertyString (“uiLabelText”,string.format(“%s %s %s %s %s %s”,lors,ramrom,bnkscreen,bnr,pot,ToneNbr))

                  and in the “pot variable” I’d like to show the clicked selected box text. At the moment with the above example I get the error “string expected got userdata”

                  iceleben
                  Participant
                    • Topics: 7
                    • Replies: 13
                    • Total: 20
                    • β˜…

                    is there an easy way to convert the lbDisk1 Data from the above example to a string if I have the
                    panel:getComponent(β€œLCD10β€³):setPropertyString (β€œuiLabelText”,lbDisk1) set to
                    panel:getComponent(β€œLCD10β€³):setPropertyString (“uiLabelText”,string.format(“%s”,lbDisk1))

                    iceleben
                    Participant
                      • Topics: 7
                      • Replies: 13
                      • Total: 20
                      • β˜…

                      Hi Goodweather,

                      Ahhhh me stupid it I get it….iLastSelectedProgram is not a value by Default but one you defined

                      xu=panel:getModulatorByName(“FactoryBank1”):getModulatorValue()
                      lbDisk1 = panel:getListBox(“FactoryBank1”):getTextForValue(xu)

                      panel:getComponent(“LCD10”):setPropertyString (“uiLabelText”,lbDisk1)
                      end

                      works fine

                      Thx so much Goodweather – Ctrlr is getting better Each day I work with it! But then I want to Change a lot of stuff I did before πŸ˜‰

                      • This reply was modified 7 years, 10 months ago by iceleben.
                      • This reply was modified 7 years, 10 months ago by iceleben.
                      • This reply was modified 7 years, 10 months ago by iceleben.
                      • This reply was modified 7 years, 10 months ago by iceleben.
                      • This reply was modified 7 years, 10 months ago by iceleben.
                      • This reply was modified 7 years, 10 months ago by iceleben.
                      in reply to: OB Matrix1000 1.16 OS Problem #69245
                      iceleben
                      Participant
                        • Topics: 7
                        • Replies: 13
                        • Total: 20
                        • β˜…

                        I have 2 Matrix with 1.16 but havnt tried the Ctrlr panel yet. Will do it on Sunday/Monday
                        Cheers,
                        Markus

                        in reply to: Newbie Switch invert value question #69215
                        iceleben
                        Participant
                          • Topics: 7
                          • Replies: 13
                          • Total: 20
                          • β˜…

                          If anyone is interested here is the Lua script thats working. I used the global variable k1 which is part of a sysex string. Working fine:

                          function ConvertVal(value)
                          — Get switch Value
                          newVal = panel:getModulatorByName(“lowerupper”):getModulatorValue()
                          if newVal == 0 then
                          — set Globalvariable k1 to 2
                          panel:setGlobalVariable(1,2)
                          end
                          if newVal == 1 then
                          — set Globalvariable k1 to 1
                          panel:setGlobalVariable(1,1)
                          end

                          end

                          in reply to: Yamaha Reface DX #69211
                          iceleben
                          Participant
                            • Topics: 7
                            • Replies: 13
                            • Total: 20
                            • β˜…

                            Hi dasfaker,
                            could you please explain why you had to set the false,false,false argument in your function panel:getModulatorByName(“Filter”):setModulatorValue(midi:getByte(10), false,false,false)
                            Thx,
                            Markus

                            in reply to: Newbie Switch invert value question #69114
                            iceleben
                            Participant
                              • Topics: 7
                              • Replies: 13
                              • Total: 20
                              • β˜…

                              Hi Goodweather “Master of the Sub37” :),
                              thx for making the step by step guide. Without it I would have been lost from the start.I’ll reread the pages.Is your panel available somewhere? It would be great to have it loaded while reading the guide

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