Forums > Javascript

JitterObject implementation in JavaScript

May 30, 2007 | 4:15 am

In what language are the JitterObjects instantiated within JavaScript implemented? Are they written in C/C++ or Java with a programming API supplied through JavaScript? Or are they written in JavaScript as well?

Thanks in advance.


May 30, 2007 | 4:22 am

They are simply bindings from Javascript into the jitter objects you
use in the patcher. Each Jitter object is typically composed of 2
parts, a jitter object and a max wrapper. The max wrapper is used in
a patcher instantiated Jitter object to load the underlying C jitter
object. In JS, the C Jitter object is accessed directly.

wes

On 5/29/07, Steve Bursch wrote:
>
> In what language are the JitterObjects instantiated within JavaScript implemented? Are they written in C/C++ or Java with a programming API supplied through JavaScript? Or are they written in JavaScript as well?
>
> Thanks in advance.
>


May 30, 2007 | 1:53 pm

Thanks for the quick reply.

I was asking about the underlying implementation because I noticed a trivial difference in the behavior of the post() method between Java and JavaScript. When the post() method is invoked from my JavaScript code, I found I generally needed to put a newline ("n") constant at the end of the text to be displayed in the Max window to ensure the text is on a line by itself. When I invoke post() from my Java code, I don’t need to do that. This small difference made me wonder if there might be other differences, as well, perhaps resulting from using different implementations of the underlying code.


May 30, 2007 | 2:06 pm

There is an inconsistency in the newline approach in javascript anyway. Have a look at this:

http://www.cycling74.com/forums/index.php?t=msg&goto=99183&rid=3579&S=9453c69ca813b2eb4a339217ad220a5e

Mattijs

Quote: Steve wrote on Wed, 30 May 2007 15:53
—————————————————-
> Thanks for the quick reply.
>
> I was asking about the underlying implementation because I noticed a trivial difference in the behavior of the post() method between Java and JavaScript. When the post() method is invoked from my JavaScript code, I found I generally needed to put a newline ("n") constant at the end of the text to be displayed in the Max window to ensure the text is on a line by itself. When I invoke post() from my Java code, I don’t need to do that. This small difference made me wonder if there might be other differences, as well, perhaps resulting from using different implementations of the underlying code.
—————————————————-


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