Forums > MaxMSP

aka.appleremote volume question

August 31, 2007 | 6:59 pm

Hey everyone, I am just getting back into Max after a long summer, and I am hitting a wall here…

I know this is a third party object, but I hope you can still get what I’m trying to do…

I want to get the volume up and volume down functions of the remote to control a single slider that if you hit a pre-set limit, you won’t just jump to the opposite end of the slider…

Take a look at the patch and I think you can see better what I mean.

Thanks a lot!

max v2;
#N vpatcher 260 44 1036 858;
#P origin -42 5;
#P window setfont "Sans Serif" 24.;
#P window linecount 2;
#P comment 439 466 136 196632 Thanks for Looking!;
#P window setfont "Sans Serif" 9.;
#P window linecount 6;
#P comment 244 593 136 196617 I know there is a very simple way of doing this , but like I said in the post , I’m just getting back into Max so I’m not in the right mind set yet…;
#P comment 102 502 136 196617 This seems like it’s just too complicated , but I was thinking that I could route them to a (+) or a (-) object , but again , I can’t figure it out.;
#P window linecount 1;
#P comment 102 483 136 196617 Attempt 2:;
#P window linecount 3;
#P comment 296 323 136 196617 I thought I could use a gate somehow , but I just didn’t seem to get it…;
#P slider 247 333 14 20 0 1;
#P window linecount 6;
#P comment 342 232 136 196617 I want to be able to have the volume control on the remote control a slider , but I also need it to stop and not just roll back over to the oposite end of the slider.;
#P window linecount 1;
#P newex 13 365 46 196617 select 1;
#P newex 99 365 46 196617 select 1;
#P number 47 652 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 18 630 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user gswitch2 18 584 39 32 0 0;
#P button 27 442 15 0;
#P button 6 442 15 0;
#P message 27 461 14 196617 0;
#P message 6 461 14 196617 1;
#P toggle 18 518 15 0;
#P button 163 259 15 0;
#P button 76 259 15 0;
#P button 129 274 15 0;
#P number 99 339 35 9 1 19 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 147 259 14 196617 1;
#P button 99 256 15 0;
#N counter 0 0 21;
#X flags 0 0;
#P newobj 99 298 77 196617 counter 0 0 21;
#P message 147 232 33 196617 clear;
#P newex 99 232 40 196617 urn 20;
#P button 43 274 15 0;
#P number 13 339 35 9 1 19 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 61 259 14 196617 1;
#P button 13 256 15 0;
#N counter 0 0 21;
#X flags 0 0;
#P newobj 13 298 77 196617 counter 0 0 21;
#P message 61 232 33 196617 clear;
#P newex 13 232 40 196617 urn 20;
#P message 295 213 14 196617 0;
#P number 247 304 35 9 1 19 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 274 213 14 196617 1;
#P message 261 213 14 196617 0;
#N counter 0 0 20;
#X flags 0 0;
#P newobj 247 273 77 196617 counter 0 0 20;
#P button 274 120 15 0;
#P button 225 120 15 0;
#P newex 274 93 43 196617 route 0;
#P newex 225 93 43 196617 route 0;
#P newex 225 24 60 196617 loadmess 1;
#P toggle 225 45 15 0;
#P newex 225 66 404 196617 appleremote;
#P comment 343 216 100 196617 Attempt 1:;
#P fasten 38 0 32 0 18 412 11 412;
#P connect 32 0 30 0;
#P connect 6 0 13 0;
#P connect 14 0 13 0;
#P connect 13 0 16 0;
#P connect 16 0 15 0;
#P connect 15 0 18 0;
#P connect 18 0 38 0;
#P connect 31 0 29 0;
#P connect 30 0 29 0;
#P connect 29 0 34 0;
#P connect 34 0 35 0;
#P fasten 37 0 33 0 104 412 32 412;
#P connect 33 0 31 0;
#P connect 13 1 19 0;
#P connect 37 1 34 1;
#P connect 38 1 34 1;
#P connect 34 1 36 0;
#P connect 7 0 14 0;
#P connect 27 0 17 0;
#P connect 17 0 15 3;
#P connect 14 0 27 0;
#P connect 7 0 20 0;
#P connect 21 0 20 0;
#P connect 20 0 23 0;
#P connect 23 0 22 0;
#P connect 22 0 25 0;
#P connect 25 0 37 0;
#P connect 20 1 26 0;
#P connect 6 0 21 0;
#P connect 28 0 24 0;
#P connect 24 0 22 3;
#P connect 21 0 28 0;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P connect 1 0 4 0;
#P connect 4 0 6 0;
#P fasten 7 0 8 0 279 192 252 192;
#P fasten 6 0 8 0 230 176 252 176;
#P connect 8 0 11 0;
#P connect 11 0 40 0;
#P fasten 6 0 9 0 230 182 266 182;
#P fasten 9 0 8 1 266 250 268 250;
#P fasten 10 0 8 1 279 250 268 250;
#P connect 1 1 5 0;
#P connect 5 0 7 0;
#P fasten 7 0 10 0 279 201 279 201;
#P connect 12 0 8 3;
#P pop;


August 31, 2007 | 9:02 pm

heres what i did for my button output of aka.wiiremote, its probably
similar output

the only downside is that it takes 3sec to move to the new value, so
from 0% to 100% volume takes 3sec, but if i stop at 90% and then go to
100% , that stretch takes 3sec as well, i guess its good for fine
tuning at the ends of the spectrum

rodrigo

max v2;
#N vpatcher 566 255 1219 765;
#P user gain~ 383 126 45 223 158 0 1.071519 7.94321 10.;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 252 91 66 196617 volume up;
#P toggle 165 91 15 0;
#P toggle 228 88 15 0;
#P button 205 167 15 0;
#P button 171 168 15 0;
#P newex 171 142 44 196617 togedge;
#P button 260 168 15 0;
#P button 228 167 15 0;
#P newex 228 141 44 196617 togedge;
#P number 170 271 36 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 170 246 28 196617 int;
#P message 254 231 35 196617 3000;
#P newex 227 249 64 196617 line 0 10;
#B color 5;
#P number 227 274 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 253 212 17 0;
#P message 202 190 21 196617 0;
#P message 227 190 27 196617 158;
#P comment 93 94 66 196617 volume down;
#P connect 14 0 7 0;
#P connect 11 0 7 0;
#P connect 7 0 8 0;
#P connect 16 0 12 0;
#P connect 12 0 13 0;
#P connect 5 0 7 1;
#P connect 13 0 2 0;
#P connect 12 1 14 0;
#P connect 10 0 1 0;
#P connect 2 0 5 0;
#P connect 1 0 5 0;
#P connect 8 0 5 0;
#P connect 5 0 4 0;
#P connect 15 0 9 0;
#P connect 9 0 10 0;
#P connect 2 0 3 0;
#P connect 1 0 3 0;
#P connect 3 0 6 0;
#P connect 6 0 5 1;
#P connect 9 1 11 0;
#P connect 4 0 18 0;
#P pop;

On 8/31/07, Michael Hastings wrote:
>
> Hey everyone, I am just getting back into Max after a long summer, and I am hitting a wall here…
>
> I know this is a third party object, but I hope you can still get what I’m trying to do…
>
> I want to get the volume up and volume down functions of the remote to control a single slider that if you hit a pre-set limit, you won’t just jump to the opposite end of the slider…
>
> Take a look at the patch and I think you can see better what I mean.
>
> Thanks a lot!
>
> max v2;
> #N vpatcher 260 44 1036 858;
> #P origin -42 5;
> #P window setfont "Sans Serif" 24.;
> #P window linecount 2;
> #P comment 439 466 136 196632 Thanks for Looking!;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 6;
> #P comment 244 593 136 196617 I know there is a very simple way of doing this , but like I said in the post , I’m just getting back into Max so I’m not in the right mind set yet…;
> #P comment 102 502 136 196617 This seems like it’s just too complicated , but I was thinking that I could route them to a (+) or a (-) object , but again , I can’t figure it out.;
> #P window linecount 1;
> #P comment 102 483 136 196617 Attempt 2:;
> #P window linecount 3;
> #P comment 296 323 136 196617 I thought I could use a gate somehow , but I just didn’t seem to get it…;
> #P slider 247 333 14 20 0 1;
> #P window linecount 6;
> #P comment 342 232 136 196617 I want to be able to have the volume control on the remote control a slider , but I also need it to stop and not just roll back over to the oposite end of the slider.;
> #P window linecount 1;
> #P newex 13 365 46 196617 select 1;
> #P newex 99 365 46 196617 select 1;
> #P number 47 652 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P number 18 630 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P user gswitch2 18 584 39 32 0 0;
> #P button 27 442 15 0;
> #P button 6 442 15 0;
> #P message 27 461 14 196617 0;
> #P message 6 461 14 196617 1;
> #P toggle 18 518 15 0;
> #P button 163 259 15 0;
> #P button 76 259 15 0;
> #P button 129 274 15 0;
> #P number 99 339 35 9 1 19 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 147 259 14 196617 1;
> #P button 99 256 15 0;
> #N counter 0 0 21;
> #X flags 0 0;
> #P newobj 99 298 77 196617 counter 0 0 21;
> #P message 147 232 33 196617 clear;
> #P newex 99 232 40 196617 urn 20;
> #P button 43 274 15 0;
> #P number 13 339 35 9 1 19 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 61 259 14 196617 1;
> #P button 13 256 15 0;
> #N counter 0 0 21;
> #X flags 0 0;
> #P newobj 13 298 77 196617 counter 0 0 21;
> #P message 61 232 33 196617 clear;
> #P newex 13 232 40 196617 urn 20;
> #P message 295 213 14 196617 0;
> #P number 247 304 35 9 1 19 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 274 213 14 196617 1;
> #P message 261 213 14 196617 0;
> #N counter 0 0 20;
> #X flags 0 0;
> #P newobj 247 273 77 196617 counter 0 0 20;
> #P button 274 120 15 0;
> #P button 225 120 15 0;
> #P newex 274 93 43 196617 route 0;
> #P newex 225 93 43 196617 route 0;
> #P newex 225 24 60 196617 loadmess 1;
> #P toggle 225 45 15 0;
> #P newex 225 66 404 196617 appleremote;
> #P comment 343 216 100 196617 Attempt 1:;
> #P fasten 38 0 32 0 18 412 11 412;
> #P connect 32 0 30 0;
> #P connect 6 0 13 0;
> #P connect 14 0 13 0;
> #P connect 13 0 16 0;
> #P connect 16 0 15 0;
> #P connect 15 0 18 0;
> #P connect 18 0 38 0;
> #P connect 31 0 29 0;
> #P connect 30 0 29 0;
> #P connect 29 0 34 0;
> #P connect 34 0 35 0;
> #P fasten 37 0 33 0 104 412 32 412;
> #P connect 33 0 31 0;
> #P connect 13 1 19 0;
> #P connect 37 1 34 1;
> #P connect 38 1 34 1;
> #P connect 34 1 36 0;
> #P connect 7 0 14 0;
> #P connect 27 0 17 0;
> #P connect 17 0 15 3;
> #P connect 14 0 27 0;
> #P connect 7 0 20 0;
> #P connect 21 0 20 0;
> #P connect 20 0 23 0;
> #P connect 23 0 22 0;
> #P connect 22 0 25 0;
> #P connect 25 0 37 0;
> #P connect 20 1 26 0;
> #P connect 6 0 21 0;
> #P connect 28 0 24 0;
> #P connect 24 0 22 3;
> #P connect 21 0 28 0;
> #P connect 3 0 2 0;
> #P connect 2 0 1 0;
> #P connect 1 0 4 0;
> #P connect 4 0 6 0;
> #P fasten 7 0 8 0 279 192 252 192;
> #P fasten 6 0 8 0 230 176 252 176;
> #P connect 8 0 11 0;
> #P connect 11 0 40 0;
> #P fasten 6 0 9 0 230 182 266 182;
> #P fasten 9 0 8 1 266 250 268 250;
> #P fasten 10 0 8 1 279 250 268 250;
> #P connect 1 1 5 0;
> #P connect 5 0 7 0;
> #P fasten 7 0 10 0 279 201 279 201;
> #P connect 12 0 8 3;
> #P pop;
>
>
>


September 1, 2007 | 1:09 am

I think that will work well enough for my needs, thank you very much!

I love this community, you can always find help for anything on here!


September 4, 2007 | 7:31 am

Michael Hastings schrieb:
> Take a look at the patch and I think you can see better what I mean.

I’d do it like that…

#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P newex 98 231 41 196617 prepend set;
#P window linecount 1;
#P newex 147 125 33 196617 t b -1;
#P newex 98 125 33 196617 t b 1;
#P newex 98 151 56 196617 accum;
#P slider 98 199 14 20 0 1;
#P number 98 177 35 9 1 19 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 147 93 43 196617 route 0;
#P newex 98 93 43 196617 route 0;
#P newex 98 24 60 196617 loadmess 1;
#P toggle 98 45 15 0;
#P newex 98 66 404 196617 appleremote;
#P window linecount 6;
#P comment 145 206 152 196617 < - it stops , because the slider doesn't
output higher or lower numbers than its range , in combination with the
feedback. You could also limit the range of the number box above…..;
#P connect 6 0 7 0;
#P fasten 10 1 8 1 175 148 126 148;
#P fasten 10 0 8 0 152 145 103 145;
#P connect 5 0 10 0;
#P connect 9 1 8 1;
#P connect 9 0 8 0;
#P connect 4 0 9 0;
#P fasten 11 0 8 0 103 265 91 265 91 148 103 148;
#P connect 7 0 11 0;
#P connect 8 0 6 0;
#P connect 1 1 5 0;
#P connect 1 0 4 0;
#P connect 2 0 1 0;
#P connect 3 0 2 0;
#P window clipboard copycount 12;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


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