javascript for timing relevant processing possible?

Oct 7, 2012 at 11:40am

javascript for timing relevant processing possible?

Hi Forum,

i want to process midi messages in Max4Live using JavaScript. The processig itself is simple and will take nearly zero cpu time. So Javascript general performance should not be a problem for me…

Anyhow, In the forum i read that the immediate property is not working on max5 (Windows) and is deprecated in max6. So with this limitation is it possible at all to write timing relevant code in max with javascript? What about the LiveApi JavaScript object? Is Java then an alternative (anyhow i would prefer JavaScript if possible because its totally integrated in max).

Can someone shed some light on this topic? Many thanks in advance!

Bye, Dirk.

Oct 7, 2012 at 5:42pm

No.. as you know javascript in max Always run,exec in low-priority thread and if it’s find it’s self in high it’s force to be low..
the result is the same as you know … 5ms or 5 sec. if some thing is running on the same thread of js you get delay.

Oct 8, 2012 at 2:04pm

You’re out of luck with Javascript. If you don’t mind firing up a JVM, you could consider Python ( ) or Clojure ( ). I’ve build sequencers and realtime control systems with both.

(I suppose the Rhino engine in the JVM might be a route to scheduler-aware Javascript in Max; I’ve not tried it.)

Oct 11, 2012 at 3:49pm

Thank you very much for the answers. I will go with simple standard java if i cannot do it directy in max.

Bye, Dirk.


You must be logged in to reply to this topic.