Learning scripting
-
@nesta99 said in Learning scripting:
Wanna ask how's the best approach based on your experience in learning scripting
Read lots of code, write lots of code, and rewrite lots of code.
Also read all the documentation, write out the examples yourself, follow tutorials. If you're writing something and don't understand it, stop, and do some research.
-
-
@nesta99 and don't try to do everything at once, do it little bits after little bits
-
@matt_sf True. Thanks a lot.
-
Hello Everyone
Is string.lenght working on Hise?
I'm currently working on some code challenges to be more proficient in programming and logic. The challenges are on JavaScript but I'm solving the problems thru coding with Hise.
So back to the question I'm just wondering a way to figure out the length of an string in Hise.Thanks.
-
@sawer Yes. Don't be afraid to just try things for yourself and see if it works or not ;)
-
@d-healey
Yes I tried, and it said "API call with undefined parameter" , that's why I'm asking, of course I tried, but it's not working.
Anyway thanks for the advice, means that might need to try harder then. :) -
@sawer What did you try?
-
-
-
-
-
@sawer Hello everyone.
I've Created a function that checks the min/max elements in an array and pushes those values into another array that will be then displayed in the console.
Done almost everything, just want to be able to display the values inside an array.inline function minMax(a) { var a = []; var minMaxNums =[]; var min = Math.min(a[i], a[i]); var max = Math.max(a[i], a[i]); minMaxNums.push(min); minMaxNums.push(max); for(i = 1; i <= minMaxNums.length; i++) { Console.print(minMaxNums[i]); //when I put "[I]" next to minMaxNums the Console comes out with "API call with undefined parameter 0". Am I missing something? } } minMax([2, 7]);
Any help is greatly appreciated. thanks.
-
@sawer Never use
var
in an inline function, uselocal
instead. Try and avoid usingvar
whenever possible.To output the contents of an array to the console you can use the
trace
command -Console.print(trace(myArray));
Also you're function parameter is called
a
but then you are also declaring a variable with the same name inside your function. That's going to cause problems. -
@d-healey
Thanks David.
Super clear explanation -
Hello Everyone.
Simple question.What I'm currently doing is solving JavaScript coding challenges in Hise , but I'm felling a bit overwhelmed of the amount of things to know, secondly, sometimes I'm felling like wasting time on things that I won't really be in need when I'll be developing plugins in Hise, and if I continue follow this it will take me a year maybe before digging into Hise.
I Just want to apply the 80/20 rule in other to learn effectively without wasting time on digging to unnecessary challenges/Subjects.Thanks to @Lindon and @d-healey, I got to understand HOW to learn this language, but I don't really know WHAT.
Since my purpose of learning is oriented to "audio software development" what are the CORE and important things to learn and grasp about programming in this field?By writing this I'm not saying that Programming shouldn't take long to learn or I that want to learn it in 20 minutes.
If it takes 2 years to be proficient, I'll go for it.
Just that I wasted too much time digging around tutorials, trials and errors in many languages.
It's since 2020 that it's going like this. Just want to learn effectively and efficiently.Hope my question is clear. Thanks
-
@sawer Ok everyone.
Everything is in the Hise docs.
Will start by digging there. -
@sawer said in Learning scripting:
If it takes 2 years to be proficient, I'll go for it.
I've been at it for 20 :)
I think the best way to learn is to work on a project that you care about. Start with a simple project though - although you won't know what simple really is until you know what you're doing ;) I think all beginners and non-programmers underestimate the complexity of their projects so really try to make it very very simple.
Write a list of 10 features you want your project to have and work on those. Try to avoid adding any new features until you've implemented those 10 and they are fully working the way you want.
Once you've finished your project make a new project that's very similar but this time try and write it using fewer lines of code.
-
@d-healey Thanks so much David. Really great explanation!
-
@sawer If you try to stick to these guidelines you code will be more readable and you'll be following a lot of "best practices" - https://docs.hise.audio/scripting/scripting-in-hise/hise-script-coding-standards.html