Lua Basics for Ctrlr – Beginners

Home Forums General Programming Lua Basics for Ctrlr – Beginners

Tagged: 

Viewing 9 posts - 41 through 49 (of 49 total)
  • Author
    Posts
  • #71916
    human fly
    Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    here’s another *link*

    https://app.box.com/s/5htvx2flulafb7sjg0yi0qzv2ju3t32k
    xor button row

    just discovered this, wouldn’t expect it:
    a passive led indicator modulator needs to have a VST
    index number. i deleted it for some leds in this panel,
    and one led started behaving strangely,
    could not figure it out, having checked thoroughly for
    any renaming errors etc. -then i tried restoring the
    vst index #s, and it resolved it.
    i wouldn’t expect a led to be treated as a parameter.
    (i thought it was a lua error)

    #71917
    human fly
    Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    back to Console subject – still not getting it to happen here.

    if there is any documentation or instructions for using
    this, a link would be welcome. i feel i have to guess how
    to use it. or then there must be a convention for using
    console that i must learn. i’ve tried applying
    console(tostring(count)) but not getting anything.

    • This reply was modified 5 years, 1 month ago by human fly. Reason: brevity
    #71918
    human fly
    Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    ok, i’ll get back to that. meanwhile, have made a panel
    file collecting interesting methods, copying them from
    existing panels, to have a look at – rather than opening
    opening and closing loads of panels, more convenient to
    have in one place.

    that was worth doing – made me have a closer look at the
    good stuff that is there.

    #71961
    human fly
    Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★
    #71964
    human fly
    Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    Panel classes here:
    https://sourceforge.net/p/ctrlrv4/code/HEAD/tree/nightly/Source/Core/CtrlrPanel/CtrlrPanel.h#l72

    this is casting more light. main repository for these pages:
    https://sourceforge.net/p/ctrlrv4/code/HEAD/tree/nightly/Source/Core/

    more terms: ‘const’, ‘void’,(‘static’, ‘static void’, etc.),
    ‘enum’.

    these *.h files look like a roadmap for Ctrlr Lua at this point.
    this merits a decent section in the manual – or at least an
    introduction and listing for the ones one is more likely to
    use.

    each ‘const’ is listed with a description, and the parameters
    it expects – this will help me make sense of what
    parameters are needed in parentheses following the function,
    -this has been a source of newbie confusion: why do some
    functions have nothing in parenthesis, and others have one
    or more eg: (mod,value), (0, false), (0, false, false) etc.

    here, i can see what those parameters are. something to
    chew on for today ;o)

    #71968
    Possemo
    Participant
    • Topics: 14
    • Replies: 638
    • Total: 652
    • ★★★

    Hi HumanFly,

    I would rather use the Github links as the Sourceforge project seems to be abandoned for a long time – e.g:

    https://github.com/RomanKubiak/ctrlr/blob/master/Source/Core/CtrlrModulator/CtrlrModulator.h

    #72143
    human fly
    Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    (again, posting eg: newb’ case scenario type )
    am progressing a (tiny) bit now.

    guys:(thinking about ‘the manual’)
    that is such a critical link as a beginner with Lua.

    Of course, there is also the ‘Utility’ tab, for each object/modulator, which
    gives you all its properties and their ‘names’. i’ve been messing around
    with changing text colour, and writing text to a label, that’s cool.

    the difficulty there is knowing how to address parameters: (ie:when do they
    need to be created in the function header?) so i need to study (and have on
    hand ) those properties and their parameters – would be good as a chart –

    i would say this is the stage i’m at now: learning about parameters,
    beginning to think about tables-how to build/use etc- and strings. still
    don’t really understand this ‘console’ business in the context of ctrlr.
    aware of, but not yet conversant with: different types of bracketing.

    what i’ve found useful: i made an empty *.panel file, and then spent a day
    browsing through the panels library, looking at what other people have done.
    making ‘groups’ in the Lua Editor, named with source(panel), with the
    interesting methods in each, for things like midi operations, panel startup,
    etc. – so that is currently a reference ‘lua library’ file i load up when
    i need ‘inspiration’, a reminder, or want to start studying the next step.

    loads of questions … :o)

    #72144
    human fly
    Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    Github links:
    https://github.com/RomanKubiak/ctrlr/blob/master/Source/Core/CtrlrModulator/CtrlrModulator.h

    so these are called ‘classes’, right? ok.

    i’ve noticed different things being used, for the same(?) ‘action’:
    ie:
    setValue vs. setModulatorValue – required parameters are different
    and why not use setProperty? or setPropertyInt?
    there are more examples of this. it has been a source of confusion
    (“con-fuuuuuuusiooooon!”) why am i seeing different things being
    used? are there maybe new and old entries, as ctrlr gets updated?
    anyway, there’s loads in there..

    will be studying these github files closely now. this is the key
    thing to look at.

    edit: i’m ‘printing’ the *.h files to pdf with pdfcreator, for
    my ‘resources’ folder. essential for the manual, imo.

    • This reply was modified 5 years, 1 month ago by human fly.
    #72151
    human fly
    Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    and i saw that the Built-In methods contain methods what and how
    which, having found a post here about how to use them, i have now
    managed to run. giving me a little more info on the console()

    to open ‘what’ you type
    console (what(o))
    and for ‘how’:
    console (how())

    lists of available classes 🙂

Viewing 9 posts - 41 through 49 (of 49 total)
  • The forum ‘Programming’ is closed to new topics and replies.
There is currently 0 users and 39 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