Forums > Jitter

To make the counter diminish with the space

February 7, 2006 | 12:59 pm

Hi,
I just want to route the value of the space to make the value coming from a counter diminish of 1. I don’t think it’s a hard thing to do, but i’m starting with jitter…
Here’s a simple patch to make it clearer…
Thanks

max v2;
#N vpatcher 10 59 1864 902;
#P window setfont "Sans Serif" 9.;
#P window linecount 4;
#P comment 423 541 393 196617 < JE VEUX ROUTER LA VALEUR DE LA BARRE D'ESPACE POUR FAIRE DIMINUER DE 1 LA VALEUR SORTANT DU COUNTER < I WANT TO ROUTE THE VALUE OF THE SPACE TO MAKE THE VALUE COMING FROM THE COUNTER DIMINISH OF 1;
#P window linecount 1;
#P comment 831 328 58 196617 HI object >;
#P number 830 540 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 830 501 49 196617 route 10;
#P button 943 136 15 0;
#P number 890 414 35 9 0 0 8228 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 935 414 35 9 0 0 8228 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 890 389 55 196617 unpack 0 0;
#P newex 902 351 42 196617 print hi;
#P message 918 156 40 196617 poll 10;
#P user umenu 926 326 173 196647 1 64 342 1;
#X add "Apple Optical USB Mouse";
#X add "Apple Extended USB Keyboard";
#X add "Apple Extended USB Keyboard 2";
#P message 926 117 32 196617 menu;
#P newex 890 326 29 196617 hi;
#P message 933 97 25 196617 info;
#P user panel 931 412 61 18;
#X brgb 182 191 73;
#X frgb 255 255 255;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 886 412 44 18;
#X brgb 197 91 91;
#X frgb 255 255 255;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 973 342 100 196617 device menu;
#P message 219 360 29 196617 stop;
#P button 329 390 15 0;
#P newex 329 311 40 196617 key;
#P newex 329 351 52 196617 select 32;
#P user umenu 435 427 68 196645 1 64 443 0;
#X add Up;
#X add Down;
#X add Up & Down;
#P number 329 545 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 0 0 250;
#X flags 0 0;
#P newobj 329 480 83 196617 counter 0 0 250;
#P newex 329 428 58 196617 metro 100;
#P newex 354 583 53 196617 print test;
#P connect 6 0 5 0;
#P connect 5 0 7 0;
#P connect 7 0 1 0;
#P fasten 8 0 1 0 224 427 334 427;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P fasten 4 0 2 1 440 462 352 462;
#P connect 3 1 0 0;
#P fasten 13 0 22 0 895 381 835 381;
#P connect 22 0 23 0;
#P fasten 15 1 13 0 1094 344 1102 344 1102 321 895 321;
#P fasten 16 0 13 0 923 173 895 173;
#P fasten 14 0 13 0 931 134 895 134;
#P fasten 12 0 13 0 938 114 895 114;
#P fasten 21 0 13 0 948 153 895 153;
#P connect 13 0 18 0;
#P connect 18 0 20 0;
#P connect 13 0 17 0;
#P fasten 13 1 15 0 914 344 922 344 922 324 931 324;
#P connect 18 1 19 0;
#P pop;


February 7, 2006 | 1:38 pm

hi greg

you dont need the hi object
just divide by 255. or something of the likes of which even

a


February 7, 2006 | 2:04 pm

thank for answering but i put the hi because i want to use something different than a keyboard after (surely a joystick)… i took the space number as an example. i want the user to push the button faster than the counter runs, to dimish an effect on a video (not on the patch) slowly. that’s why i’m search hw to dimish one per one.


February 7, 2006 | 2:13 pm

request noted&aknowledged.
in the future gregory, in the future

ps: down to 2 link errors!!!! even if i include jitentry header file, how
do i bypass this erros?? ie, do i need to explicitly prototype the
functions before the functions???

Link Error : undefined: ‘jitterEntry(const char*)’ (code)
Referenced from ‘jit_atari2600_rom’ in jit.atari2600.c

Link Error : undefined: ‘Cleanup()’ (code)
Referenced from ‘jit_atari2600_free’ in jit.atari2600.c

On Feb 7, 2006, at 2:04 PM, greg wrote:

thank for answering but i put the hi because i want to use something
different than a keyboard after (surely a joystick)… i took the space
number as an example. i want the user to push the button faster than the
counter runs, to dimish an effect on a video (not on the patch) slowly.
that’s why i’m search hw to dimish one per one.


February 7, 2006 | 3:26 pm

quelquechose de ce gout la ?…

Mathieu Chamagne

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 193 291 31 9109513 + 250;
#P newex 193 313 34 9109513 % 250;
#P number 211 246 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 0 0 250;
#X flags 0 0;
#P newobj 211 222 73 9109513 counter 0 0 250;
#P number 193 336 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 194 270 27 9109513 – 0;
#P window linecount 4;
#P comment 230 340 366 9109513 < JE VEUX ROUTER LA VALEUR DE LA BARRE D'ESPACE POUR FAIRE DIMINUER DE 1 LA VALEUR SORTANT DU COUNTER < I WANT TO ROUTE THE VALUE OF THE SPACE TO MAKE THE VALUE COMING FROM THE COUNTER DIMINISH OF 1;
#P window linecount 1;
#P message 32 128 29 9109513 stop;
#P button 74 130 15 0;
#P newex 74 51 40 9109513 key;
#P newex 74 91 52 9109513 select 32;
#P user umenu 124 191 68 9109541 1 64 207 0;
#X add Up;
#X add Down;
#X add Up & Down;
#P number 74 261 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 0 0 250;
#X flags 0 0;
#P newobj 74 220 83 9109513 counter 0 0 250;
#P newex 74 168 58 9109513 metro 100;
#P newex 99 306 53 9109513 print test;
#P connect 7 0 1 0;
#P fasten 7 0 12 0 79 154 216 154;
#P connect 2 0 3 0;
#P fasten 2 0 10 0 79 254 199 254;
#P connect 10 0 15 0;
#P connect 15 0 14 0;
#P connect 12 0 13 0;
#P connect 14 0 11 0;
#P connect 13 0 10 1;
#P connect 3 1 0 0;
#P fasten 4 0 2 1 129 213 97 213;
#P connect 1 0 2 0;
#P fasten 8 0 1 0 37 167 79 167;
#P connect 5 0 7 0;
#P connect 6 0 5 0;
#P window clipboard copycount 16;


February 7, 2006 | 3:40 pm

heu.. j’ai un petit souci avec ton patch, il ne me l’ouvre qu’en text.
mais merci


February 7, 2006 | 5:01 pm

copie le texte dans le mail, puis "file -> new from clipboard" dans max. (sans passer par un fichier texte, donc…)

Mathieu


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