Home › Forums › General › Programming › Lua Basics for Ctrlr – Beginners
Tagged: classes
- This topic has 48 replies, 5 voices, and was last updated 6 years, 10 months ago by human fly.
-
AuthorPosts
-
April 24, 2017 at 7:23 pm #71916
here’s another *link*
https://app.box.com/s/5htvx2flulafb7sjg0yi0qzv2ju3t32k
xor button rowjust 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)April 26, 2017 at 10:09 am #71917back 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 6 years, 11 months ago by human fly. Reason: brevity
April 28, 2017 at 8:56 am #71918ok, 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.May 2, 2017 at 8:54 pm #71961modulator classes listed here, commented with info
May 3, 2017 at 8:31 am #71964Panel classes here:
https://sourceforge.net/p/ctrlrv4/code/HEAD/tree/nightly/Source/Core/CtrlrPanel/CtrlrPanel.h#l72this 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)May 3, 2017 at 9:58 am #71968Hi 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
May 14, 2017 at 8:06 am #72143(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)
May 14, 2017 at 8:46 am #72144Github links:
https://github.com/RomanKubiak/ctrlr/blob/master/Source/Core/CtrlrModulator/CtrlrModulator.hso 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 6 years, 10 months ago by human fly.
May 14, 2017 at 11:38 am #72151and i saw that the Built-In methods contain methods
what
andhow
which, having found a post here about how to use them, i have now
managed to run. giving me a little more info on theconsole()
to open ‘what’ you type
console (what(o))
and for ‘how’:
console (how())
lists of available classes 🙂
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.