Page 1 of 1

How to learn scripting?

Posted: 15 Jan 2016 08:45
by Gass n Klang
Hey guys,
as most user I have special needs and want to build my own controller. There are things that don't work at the moment (e.g. if I remote a knob via midi I want it so send an OSC message. If anybody has a solution for that, please let me know). I want to learn scripting in Lemur and watched some videos. I've got an idea of what to do but many things I can't relieve.
How did you learn scripting in Lemur?

Re: How to learn scripting?

Posted: 15 Jan 2016 13:22
by rad3d
I think the 3 main approaches are:
  • Understand the manual
    • Even if you can't read or comprehend everything in it right off, get a grasp of what types of things can be done via scripting by at least reviewing each section.
  • Study existing templates
    • There are lots of projects posted in the community area, many of which have will have code relevant to something you are doing. Spend some time and get familiar with how and when developers use certain scripting techniques.
  • Search the forums and ask questions when you hit a dead end
    • I've gotten so many answers from being out here and studying the simple examples users have shared. Sometimes it's been much easier to find what I'm looking for in these simple examples than trying to find something specific in a larger template.
As long as you have a specific need, and a little patience, you can usually get over the hump to where you feel you have some command of the process in a few days.
(e.g. if I remote a knob via midi I want it so send an OSC message. If anybody has a solution for that, please let me know).
Without understanding the specifics, I'd think this would be a matter of adding some scripting to the knob to have it send the OSC messages based on it's position from being remotely controlled by midi. Need more info to go into any more depth.

Re: How to learn scripting?

Posted: 15 Jan 2016 13:51
by rad3d
BTW

Have also found some very useful info/tutorials here:
http://www.jazzmutant.com/workshop_tutorialslist.php

Re: How to learn scripting?

Posted: 15 Jan 2016 21:31
by Gass n Klang
Thanks I'll do that! Regarding my specific problem, I thought about something similar. Explained that problem in a different thread. I control Lemur by a Midi controller and want Lemur to send out osc commands of the actual status of the knob or button I control. If you've got further explanations that would be great.

Re: How to learn scripting?

Posted: 18 Jan 2016 23:50
by Klangfarben
While looking through other templates and examples is useful, it can only take one so far. It would be nice to know the scripting language Lemur is using or if they are using their own variant of something. If I'm writing something in javascript or perl or whatever, I can actually learn the language and then look at examples, working code, etc. which is much more useful than just trying to learn from examples only. If I'm equating writing scripts to throwing darts, in the former I at least know where the dart board is. In the latter, I'm throwing the darts blindfolded. While basic scripting is not really an issue, doing anything complex is really just a shot in the dark.

Re: How to learn scripting?

Posted: 19 Jan 2016 09:45
by MrCorba
The best way to learn it is just do it. Start developing, when you hit a bump check the manual, maybe someone has built something like it in the user library and otherwise you can always check this forum.

Sure if you have experience in java(script), C or any other language the scripting is a lot easier to understand. But it's doable without that experience.

Re: How to learn scripting?

Posted: 19 Jan 2016 13:37
by rad3d
If I'm writing something in javascript or perl or whatever, I can actually learn the language and then look at examples, working code, etc. which is much more useful than just trying to learn from examples only.
Not sure that's a good analogy, as it doesn't sound much different from the way you'd learn Lemur scripting - you'd learn the language essentials from the manual and then look at working code. In fact, most JS people I know have learned Javascript by modification of existing code first.

And, of course, the beauty of Lemur is how much you can do without any scripting, allowing you to get key aspects of your template working, then implement small scripting components and building from there. Even the most complex of Lemur projects usually won't rely solely on scripting.

Learning Lemur scripting is not that difficult. There are different levels of complexity, but I found that getting over the hump with it wasn't too difficult a process.