Forums > Javascript

Good exercices on JS in MaxMSP?

July 29, 2010 | 10:54 pm

Anyone has good exercices to study JS. The tutorials are not sufficient for me and the examples are not that clear. I would like to have some more examples that are well explained


July 30, 2010 | 1:40 am

Check out this post that asked something similar. Lots of the links are references rather than tutorials and none of them are max specific. My own examples aren’t online any more, the hosting expired recently and I haven’t renewed it. However if you think it might help to take a look I can zip it up and send you an email.


August 5, 2010 | 4:41 am

as trite as it sounds, project driven learning is pretty efficient. true, you don’t become well rounded immediately, but i don’t think that happens with only lesson based learning either.


August 10, 2010 | 1:19 am

@ Luke hall, my email is Thinksamuel@yahoo.com
Thank you very much


August 10, 2010 | 2:19 am

Here are three example JavaScript objects for Max that I wrote for someone who is a total beginner. The tasks the objects perform are very simple, but the scripts contain lots of comments, so they should be of some help to you if you need some basic instruction.


August 14, 2010 | 10:29 am

Hello Luke,
I need to progress in javascript.
Is it possible to send me your examples?
My email: puygranier.olivier(at)free.fr
Best regards


August 29, 2012 | 4:38 pm

@Christopher Dobrian
thanks, your examples help me a lot ! :)


September 5, 2012 | 9:01 am

autowatch = 1;
inlets = 2;
outlets = 2;

// Max special functions
var msg_int = function (v)
{
post("received integer value :", v ,"n");
};

var list = function (a)
{
post(arrayfromargs(arguments),"n");
};

// get properties of all objects
var bang = function ()
{
this.patcher.apply( function (a)
{
var colProps = Object.getOwnPropertyNames(a);
if (colProps) post(colProps,"n");
}
);
}

// js typed array work in Max but not in OSX jsc
function testtypedarray()
{
// eg.
var colBytes = new Uint8Array(32);
var colBytes = new Uint16Array(32);
}

// Dict Object if you don’t know before
function dictionary(dict_name)
{
var d = new Dict(dict_name);
var keys = d.getkeys();

if (!keys)
{
// If no keys (or empty dictionary)
post("no keys","n");
}
else if ((typeof keys) == (typeof "string"))
{
// If dict have only one key
post("you have one key","n");
}
else if (keys instanceof Array)
{
// If dict have more than one keys
post("you have more keys","n");
}

}


Viewing 8 posts - 1 through 8 (of 8 total)