Learning scripting
-
@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
-
@d-healey Really helpful, Thanks David.
Might get back to the calculator and apply everything stated here, because I really care about it, just that I got a lil discouraged. As you said, I overestimate the Complexity of it.