Forums > MaxMSP

arduino max speed issue

January 18, 2007 | 7:02 am


January 18, 2007 | 9:43 am

Are you on a PC, without the serial object incremental update? That
may explain your problem.

http://cycling74.com/twiki/bin/view/IncrementalDownloads

jb

Am 18.01.2007 um 08:02 schrieb pieter coussement:

> The thing is I want to make this interactive and wanted to control
> everthing from max, but max seems to be way to slow, I tried some
> aproaches to turn power on for 24ms and off for some time but it
> doesn’t work at all.


January 18, 2007 | 10:22 am

I’m on a mac so that’s not it.
thx
pieter

On 18 Jan 2007, at 10:43, Jeremy Bernstein wrote:

> Are you on a PC, without the serial object incremental update? That
> may explain your problem.
>
> http://cycling74.com/twiki/bin/view/IncrementalDownloads
>
> jb
>
> Am 18.01.2007 um 08:02 schrieb pieter coussement:
>
>> The thing is I want to make this interactive and wanted to control
>> everthing from max, but max seems to be way to slow, I tried some
>> aproaches to turn power on for 24ms and off for some time but it
>> doesn’t work at all.
>
>


January 18, 2007 | 11:10 am

we’re missing your arduinooo abstraction and the thunder.jpg

/*j


January 18, 2007 | 11:17 am

Sorry, thought that everything was there:

Arduinooo

max v2;
#N vpatcher 156 44 1146 372;
#P origin 50 -11;
#N comlet commands into board;
#P inlet 335 22 15 0;
#N comlet Digital Output (send list with port# and state);
#P inlet 282 22 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 141 130 390 196617 Set serial to the com port matching the Arduino Board on your system. (a , b , c , etc);
#P toggle 156 39 15 0;
#P newex 156 57 58 196617 metro 100;
#N comlet Digital Input Read Speed;
#P inlet 204 22 15 0;
#N comlet Digital Inputs On/Off;
#P inlet 156 22 15 0;
#P comment 340 83 168 196617 Write pin # to HIGH(1) or LOW(0).;
#P message 282 82 56 196617 w d $1 $2;
#N vpatcher 20 74 317 314;
#P outlet 63 147 15 0;
#P inlet 41 40 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 62 127 64 196617 fromsymbol;
#P newex 41 59 53 196617 sel 10 13;
#P newex 62 85 61 196617 zl group 64;
#P newex 62 106 151 196617 itoa;
#P connect 4 0 2 0;
#P fasten 2 2 1 0 88 80 67 80;
#P connect 2 1 1 0;
#P connect 1 0 0 0;
#P connect 0 0 3 0;
#P connect 3 0 5 0;
#P pop;
#P newobj 31 145 102 196617 p asciimessage2max;
#N vpatcher 324 290 647 455;
#P outlet 54 113 15 0;
#P inlet 54 41 15 0;
#P window setfont "Sans Serif" 9.;
#P message 54 89 18 196617 13;
#P newex 54 65 29 196617 t b l;
#P newex 73 88 27 196617 spell;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P fasten 0 0 4 0 78 109 59 109;
#P connect 2 0 4 0;
#P connect 1 1 0 0;
#P pop;
#P newobj 31 104 102 196617 p max2asciimessage;
#P toggle 31 39 15 0;
#P newex 31 57 58 196617 metro 100;
#P newex 31 186 270 196617 unpack i i i i i i;
#P newex 343 188 591 196617 unpack i i i i i i i i i i i i;
#P newex 31 163 50 196617 route a d;
#P comment 177 82 100 196617 Read digital inputs.;
#P message 156 82 19 196617 r d;
#P message 31 82 19 196617 r a;
#P newex 31 127 110 196617 serial a 9600 8 1 0;
#P comment 51 82 100 196617 Read analog inputs.;
#P window setfont "Arial Black" 14.;
#P comment 435 27 465 791478286 For use with the Arduino SimpleMessageSystem example 1.;
#P toggle 915 227 23 0;
#P toggle 863 227 23 0;
#P toggle 811 227 23 0;
#P toggle 759 227 23 0;
#P toggle 707 227 23 0;
#P toggle 655 227 23 0;
#P toggle 603 227 23 0;
#P toggle 551 227 23 0;
#P toggle 499 227 23 0;
#P toggle 447 227 23 0;
#P toggle 395 227 23 0;
#P toggle 343 227 23 0;
#P window setfont "Sans Serif" 9.;
#P newex 873 255 35 196617 s d12;
#B color 14;
#P newex 925 255 35 196617 s d13;
#B color 14;
#P newex 821 255 35 196617 s d11;
#B color 14;
#P newex 769 255 35 196617 s d10;
#B color 14;
#P newex 717 255 29 196617 s d9;
#B color 14;
#P newex 665 255 29 196617 s d8;
#B color 14;
#P newex 561 255 29 196617 s d6;
#B color 14;
#P newex 613 255 29 196617 s d7;
#B color 14;
#P newex 509 255 29 196617 s d5;
#B color 14;
#P newex 457 255 29 196617 s d4;
#B color 14;
#P newex 405 255 29 196617 s d3;
#B color 14;
#P newex 353 255 29 196617 s d2;
#B color 14;
#P newex 249 255 29 196617 s a4;
#B color 14;
#P newex 301 255 29 196617 s a5;
#B color 14;
#P newex 197 255 29 196617 s a3;
#B color 14;
#P newex 145 255 29 196617 s a2;
#B color 14;
#P newex 93 255 29 196617 s a1;
#B color 14;
#P newex 41 255 29 196617 s a0;
#B color 14;
#N comlet digital 13;
#P outlet 915 274 15 0;
#N comlet digital 12;
#P outlet 863 274 15 0;
#N comlet digital 11;
#P outlet 811 274 15 0;
#N comlet digital 10;
#P outlet 759 274 15 0;
#N comlet digital 9;
#P outlet 707 274 15 0;
#N comlet digital 8;
#P outlet 655 274 15 0;
#N comlet digital 6;
#P outlet 603 274 15 0;
#N comlet digital 6;
#P outlet 551 274 15 0;
#N comlet digital 5;
#P outlet 499 274 15 0;
#N comlet digital 4;
#P outlet 447 274 15 0;
#N comlet digital 3;
#P outlet 395 274 15 0;
#N comlet digital 2;
#P outlet 343 274 15 0;
#N comlet analog 5;
#P outlet 291 274 15 0;
#N comlet analog 4;
#P outlet 239 274 15 0;
#N comlet analog 3;
#P outlet 187 274 15 0;
#N comlet analog 2;
#P outlet 135 274 15 0;
#N comlet analog 1;
#P outlet 83 274 15 0;
#N comlet analog 0;
#P outlet 31 274 15 0;
#P window setfont "Sans Serif" 10.;
#P number 291 227 49 10 0 0 0 3 0 0 0 255 92 174 222 222 222 0 0 0;
#P number 239 227 49 10 0 0 0 3 0 0 0 255 92 174 222 222 222 0 0 0;
#P number 187 227 49 10 0 0 0 3 0 0 0 255 92 174 222 222 222 0 0 0;
#P number 135 227 49 10 0 0 0 3 0 0 0 255 92 174 222 222 222 0 0 0;
#P number 83 227 49 10 0 0 0 3 0 0 0 255 92 174 222 222 222 0 0 0;
#P number 31 227 49 10 0 0 0 3 0 0 0 255 92 174 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 915 207 49 196617 change 0;
#B color 6;
#P newex 863 207 49 196617 change 0;
#B color 6;
#P newex 811 207 49 196617 change 0;
#B color 6;
#P newex 759 207 49 196617 change 0;
#B color 6;
#P newex 707 207 49 196617 change 0;
#B color 6;
#P newex 655 207 49 196617 change 0;
#B color 6;
#P newex 603 207 49 196617 change 0;
#B color 6;
#P newex 551 207 49 196617 change 0;
#B color 6;
#P newex 499 207 49 196617 change 0;
#B color 6;
#P newex 447 207 49 196617 change 0;
#B color 6;
#P newex 395 207 49 196617 change 0;
#B color 6;
#P newex 343 207 49 196617 change 0;
#B color 6;
#P newex 291 207 49 196617 change 0;
#B color 14;
#P newex 239 207 49 196617 change 0;
#B color 14;
#P newex 187 207 49 196617 change 0;
#B color 14;
#P newex 135 207 49 196617 change 0;
#B color 14;
#P newex 83 207 49 196617 change 0;
#B color 14;
#P newex 31 207 49 196617 change 0;
#B color 14;
#N comlet Analog Inputs Read Speed;
#P inlet 79 22 15 0;
#N comlet Analog Inputs On/Off;
#P inlet 31 22 15 0;
#P connect 0 0 84 0;
#P connect 84 0 83 0;
#P fasten 83 0 77 0 36 77 36 77;
#P fasten 95 0 85 0 340 100 36 100;
#P connect 77 0 85 0;
#P fasten 78 0 85 0 161 100 36 100;
#P fasten 87 0 85 0 287 100 36 100;
#P fasten 83 0 76 0 36 79 23 79 23 124 36 124;
#P lcolor 7;
#P connect 85 0 76 0;
#P fasten 91 0 76 0 161 78 152 78 152 124 36 124;
#P lcolor 7;
#P connect 76 0 86 0;
#P connect 86 0 80 0;
#P connect 80 0 82 0;
#P connect 82 0 2 0;
#P connect 2 0 20 0;
#P fasten 20 0 26 0 36 263 36 263;
#P fasten 20 0 44 0 36 251 46 251;
#P connect 1 0 83 1;
#P connect 82 1 3 0;
#P connect 3 0 21 0;
#P fasten 21 0 27 0 88 263 88 263;
#P fasten 21 0 45 0 88 251 98 251;
#P connect 82 2 4 0;
#P connect 4 0 22 0;
#P fasten 22 0 28 0 140 263 140 263;
#P fasten 22 0 46 0 140 251 150 251;
#P connect 89 0 92 0;
#P connect 92 0 91 0;
#P connect 91 0 78 0;
#P connect 82 3 5 0;
#P connect 5 0 23 0;
#P fasten 23 0 29 0 192 263 192 263;
#P fasten 23 0 47 0 192 251 202 251;
#P connect 90 0 91 1;
#P connect 82 4 6 0;
#P connect 6 0 24 0;
#P fasten 24 0 30 0 244 263 244 263;
#P fasten 24 0 49 0 244 250 254 250;
#P connect 94 0 87 0;
#P connect 82 5 7 0;
#P connect 7 0 25 0;
#P fasten 25 0 31 0 296 263 296 263;
#P fasten 25 0 48 0 296 251 306 251;
#P fasten 80 1 81 0 56 182 348 182;
#P connect 81 0 8 0;
#P connect 8 0 62 0;
#P connect 62 0 32 0;
#P fasten 62 0 50 0 348 253 358 253;
#P connect 81 1 9 0;
#P connect 9 0 63 0;
#P fasten 63 0 33 0 400 264 400 264;
#P fasten 63 0 51 0 400 252 410 252;
#P connect 81 2 10 0;
#P connect 10 0 64 0;
#P fasten 64 0 34 0 452 264 452 264;
#P fasten 64 0 52 0 452 252 462 252;
#P connect 81 3 11 0;
#P connect 11 0 65 0;
#P fasten 65 0 35 0 504 264 504 264;
#P fasten 65 0 53 0 504 252 514 252;
#P connect 81 4 12 0;
#P connect 12 0 66 0;
#P fasten 66 0 36 0 556 264 556 264;
#P fasten 66 0 55 0 556 252 566 252;
#P connect 81 5 13 0;
#P connect 13 0 67 0;
#P fasten 67 0 37 0 608 264 608 264;
#P fasten 67 0 54 0 608 252 618 252;
#P connect 81 6 14 0;
#P connect 14 0 68 0;
#P fasten 68 0 38 0 660 264 660 264;
#P fasten 68 0 56 0 660 252 670 252;
#P connect 81 7 15 0;
#P connect 15 0 69 0;
#P fasten 69 0 39 0 712 264 712 264;
#P fasten 69 0 57 0 712 252 722 252;
#P connect 81 8 16 0;
#P connect 16 0 70 0;
#P fasten 70 0 40 0 764 264 764 264;
#P fasten 70 0 58 0 764 252 774 252;
#P connect 81 9 17 0;
#P connect 17 0 71 0;
#P fasten 71 0 41 0 816 264 816 264;
#P fasten 71 0 59 0 816 252 826 252;
#P connect 81 10 18 0;
#P connect 18 0 72 0;
#P fasten 72 0 42 0 868 264 868 264;
#P fasten 72 0 61 0 868 252 878 252;
#P connect 81 11 19 0;
#P connect 19 0 73 0;
#P fasten 73 0 43 0 920 264 920 264;
#P fasten 73 0 60 0 920 252 930 252;
#P pop;


January 18, 2007 | 2:10 pm

Me again,

just a round of updates and more q’s:

first I changed the speed of the serial object from 9600 (the default in the simple message patch) to 115200, this should give a difference I guess?

Can somebody explain me how to make a signal stay on for exactly 24ms and then turn off the signal? I did it in my patch by using a line~ and adsr envelope with a domain of 100ms but I am thinking this is not a good way.

Eventually I will need to have a patch that turns 3 solenoids on for 24ms and off for 39-50ms (dynamically) and another one that just goes 24ms now and then (random)

I’m a bit stuck here and am feeling really dumb

best

pieter


January 18, 2007 | 2:43 pm

* apologies for cross-postings *
————————————————–

Interesting opportunity available for sound designer and engineer for
Yaacov Agam interactive glass installation

Sculptor and experimental artist, Yaacov Agam, will be building an
interactive glass installation in Las Vegas.
There will be 35 glass towers, approx. 18′ high, 3.5′ diameter.
Derix Art Glass Consultants, the glass fabricators, are looking for a
sound designer and engineer, to compose, design and implement
interactive sound to accompany the piece. It will be an outside
installation with interactive elements (i.e., when viewer walks by >
triggers sound).
Budget details are negotiable. You will probably need to have further
conversation and propose a budget with Derix Art Glass Consultants.
Timeline:
planning: 2007
realisation: fall 2008

Please contact Jocelyn Shoup at
jocelyn@derixusa.com for more information.

Yaacov Agam links:
http://en.wikipedia.org/wiki/Yaacov_Agam

http://www.artnet.com/artist/553553/yaacov-agam.html

————————————————–


January 19, 2007 | 12:19 pm

Me again,

I am getting a bit down here, I can’t figure out how to make things work.

I don’t understand why max can’t deal with the messages I send and don’t know what the problem is.

Could someone please answer the following q’s just to keep me sain?

Can max send precise messages like the 24 ms ON 38ms OFF loop?
Can a serial port handle such fast info and what are the settings to get it right?
Is there a way to get variables into the arduino board so that I can write switch cases to control the tempo thingies and not need max to output really fast things over the serial port (DEFENITLY PLAN B)?

thx

pieter


January 19, 2007 | 1:44 pm


January 19, 2007 | 1:51 pm

It does make sense, but I just don’t know how to do this.

I know there are some issues but I ask myself if it’s possible to have an around 24ms (some microseconds more or less) ON and OFF
since it’s supposed to mimic thunder it doesn’t need to be VERY precise

But the main question is can a serial port handle the amount of date and can Max handle the speed to the serial port?

thx

pieter


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