Ruby Jitter Example

This example, like all my Max/MSP + Ruby examples, requires ajm objects.

One of the nice things about the ajm.ruby object is it can access any of Cycling '74's Java APIs. I hadn't specifically designed any Jitter support, but I got it for free. Here's an example of how to read in a Jitter matrix and modify it using Ruby.

First, save the following Ruby script as jitter-test.rb somewhere on your Max search path (then you may need to restart Max):


Then, run this Max patch (works in Max 4 and 5):


If all goes well, you should see this patch. Click the "setcell" message box to fill the matrix. Then hit the button to have Ruby process it. The sprintf is needed to convert a Max message into a Ruby method call. This kind of syntax conversion is often needed when moving data from Max to Ruby.


Easy, right?

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
You must answer the following question to post. This prevents automated spam submissions. If you answer incorrectly, a different question will be provided so you can try again.
"zimik wop umar tir cupokih ahamamu bal aqaj"