Lua install

Home Forums Platform Specific Windows Lua install

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #71672
    seq303
    Participant
      • Topics: 8
      • Replies: 13
      • Total: 21

      Hi, do I have to install Lua in addition? So print () and sleep () work in the editor? I work with the 5.4.29 on the PC WIN 7 64.

      print(“Hallo World”) does not work in the Lua console.

      Is there a guide or tutorial for the LUA Editor and LUA Console ?

      Greeting Michael

      #71673
      seq303
      Participant
        • Topics: 8
        • Replies: 13
        • Total: 21

        I have ZeroBrainStudio
        Here runs the code example without problems!

        for i=10,1,-1
        do
        print(i)
        end

        for i=0,100,1
        do
        print(i)
        end

        In the Ctrlr LUA Console unfortunately not!
        why?
        What am I doing wrong ?

        Info:

        Version: 5.4.29
        Build date: Wed Dec 21 16:25:22 CEST 2016
        Branch: Nightly
        Juce: 4.2.1
        libusb: 1.0.19
        liblo: 0.28
        lua: Lua 5.1.4
        luabind: 0.9.0
        boost: 1.57.0

        #71684
        SWB
        Participant
          • Topics: 35
          • Replies: 157
          • Total: 192
          • ★★

          If you start with a new panel you can open the Lua editor (menu: Panel>Lua Editor). There you can add a new method and add your “test” code. In your code you can use the console to output data etc. to the console window e.g

          console(string.format(“Weird char: %d, %d”, midiParam, i))

          This code sends the text “Weird char:” plus the value (in this case) of the variable ‘midiParam’ to the console window.

          This is a way to check your code. I think you cannot use the console window as input for Lua code, at least I never used it that way. To find about the way you can use Lua with a panel you should download a few panels with Lua code. This is the download link: http://ctrlr.org/panels/ (This link used to be present on the forum site (under downloads), but has recently disappeared for unknown reasons.)

          • This reply was modified 7 years, 1 month ago by SWB.
          #71685
          seq303
          Participant
            • Topics: 8
            • Replies: 13
            • Total: 21

            s = 5

            function sleep(s)
            local ntime = os.clock() + s
            repeat until os.clock() > ntime
            end

            Hi can I use sleep ()
            Use in Ctrlr?

            #71687
            SWB
            Participant
              • Topics: 35
              • Replies: 157
              • Total: 192
              • ★★

              no idea, sorry.

              #71693
              seq303
              Participant
                • Topics: 8
                • Replies: 13
                • Total: 21

                ok Thanks!

              Viewing 6 posts - 1 through 6 (of 6 total)
              • The forum ‘Windows’ is closed to new topics and replies.
              There is currently 0 users and 85 guests online
              No users are currently active
              Forum Statistics
              Threads: 2,495, Posts: 17,374, Members: 77,605
              Most users ever online was 12 on January 22, 2019 3:47 pm
              Ctrlr