Home Forums Platform Specific Windows Lua install

This topic contains 5 replies, has 2 voices, and was last updated by seq303 seq303 5 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #71672
    seq303
    seq303
    Participant

    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
    seq303
    Participant

    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
    SWB
    Participant

    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 5 months ago by SWB SWB.
    #71685
    seq303
    seq303
    Participant

    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
    SWB
    Participant

    no idea, sorry.

    #71693
    seq303
    seq303
    Participant

    ok Thanks!

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

You must be logged in to reply to this topic.

Comments are closed.