We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › max msp - sending integers to max via maxlink lib
Page Index Toggle Pages: 1
max msp - sending integers to max via maxlink lib (Read 1429 times)
max msp - sending integers to max via maxlink lib
Feb 22nd, 2010, 11:43am
 
Hi,

What I want to do is really simple, but despite having searched everywhere and watched loads of Max MSP tutorials I can't work out how to send integers/float numbers to Max from Processing.

I know that in Max you can use a 'bang' to trigger an event. This could for example to be to add one or decrease one to a number variable. However, I can't seem to do this in Max.

Thanks and apologies for the basic level of question.
Re: max msp - sending integers to max via maxlink lib
Reply #1 - Feb 25th, 2010, 11:43am
 
This is a great question, and one that I've been trying to figure out myself.  It looks like the method link.output(String) will only output a bang with the name of that string. It seems strange that you wouldn't be able to send ints or floats from Processing to Max.  If anyone knows how to do this, it would be fantastic....

Thanks in advance.
Re: max msp - sending integers to max via maxlink lib
Reply #2 - Mar 4th, 2010, 8:25am
 
The color picker example shows how do to this.

...

Code:

import maxlink.*;

// set the background color from Max
// jkriss ~ 28 july 2004
// updated 21 april 2005 for Processing 0085

// Open "color picker.pat" in the MaxLink examples folder
// to control the color.

MaxLink link = new MaxLink(this,"color_sketch");

// these must be public
public float r,g,b;

void setup() {
 size(250,250);
 link.declareInlet("r");
 link.declareInlet("g");
 link.declareInlet("b");
}

void draw() {
 background(r,g,b);
}

Re: max msp - sending integers to max via maxlink lib
Reply #3 - Mar 8th, 2010, 2:48am
 
Hi,

Thank you so much for the answer.

J
Page Index Toggle Pages: 1