Hi Ps2 Controller Incremental steps

Apr 17, 2006 at 11:08pm

Hi Ps2 Controller Incremental steps

I am using my ps2 controller, connected to usb, as a hi controller. I have it set to work with my dj patch, drum machine and synth (all one project). I am trying to set it upso that my up down (digital) buttons control the pitch of the track being played. The way i have it set up now is with 2 select obejects which correspond to the correct “on” data from the ps2 controller for those buttons. These both go into a onebang object.

The problem with this is that the user has to keep tapping the down to make it move. Can anyone think of a way to make it so that the longer you hold down the button the faster/more it moves up or down? So in otherwords an incremental step increase.

I have something similar set up for my analogue sticks, which control the crossfader, in whicch you can move side to side but when you hold down the stick to its maximum for a +- 1 sec it sticks on the channel you are pointing towards. But in this case that wouldnt work very well.

Will

#25478
Apr 18, 2006 at 3:07am

Will Pickersgill wrote:
> Can anyone think of a way to make it so that the longer
> you hold down the button the faster/more it moves up or down?
> So in otherwords an incremental step increase.

don’t know if I’m understanding you right …
here is a way I’d do what I think you want to do
(up/down arrowkeys).

oliver

#P window setfont Helvetica 10.;
#P flonum 127 277 80 10 0. 1000. 3 21 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 276 105 40 1376266 keyup;
#P message 284 157 33 1376266 0 100;
#P newex 276 131 48 1376266 sel 30 31;
#P newex 171 106 40 1376266 key;
#P toggle 31 105 15 0;
#P newex 31 126 53 1376266 qmetro 2;
#P newex 171 210 51 1376266 change 0.;
#P message 162 159 46 1376266 0.05 500;
#P message 210 159 49 1376266 -0.05 500;
#P newex 171 189 40 1376266 bline 0.;
#P newex 171 132 48 1376266 sel 30 31;
#P message 74 248 44 1376266 set $1;
#P newex 127 239 33 1376266 + 0.;
#P comment 193 74 100 1376266 arrowkey up/down;
#P fasten 8 0 1 0 36 182 132 182;
#P fasten 8 0 4 0 36 182 176 182;
#P connect 9 0 8 0;
#P connect 4 0 7 0;
#P connect 11 0 12 0;
#P connect 11 1 12 0;
#P connect 13 0 11 0;
#P connect 10 0 3 0;
#P connect 3 0 6 0;
#P connect 3 1 5 0;
#P fasten 14 0 2 0 132 313 68 313 68 240 79 240;
#P connect 1 0 14 0;
#P fasten 12 0 4 0 289 179 176 179;
#P fasten 2 0 1 0 79 272 122 272 122 234 132 234;
#P connect 7 0 1 1;
#P fasten 5 0 4 0 215 179 176 179;
#P fasten 6 0 4 0 167 179 176 179;
#P window clipboard copycount 15;

#75083
Apr 18, 2006 at 7:28am

oliver i can’t open your patch…
did you miss something in the text version?

thnx

#75084
Apr 18, 2006 at 9:30am

tommaso perego wrote:
> oliver i can’t open your patch…
> did you miss something in the text version?

it should work if you copy the text in the mail and do
a “new from clipboard” (in max4.5) …
but anyway here is a version from a patcher-file
‘opened as text’ …

oliver

max v2;
#N vpatcher 534 132 923 505;
#P window setfont Helvetica 10.;
#P flonum 127 277 80 10 0. 1000. 3 21 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 276 105 40 1376266 keyup;
#P message 284 157 33 1376266 0 100;
#P newex 276 131 48 1376266 sel 30 31;
#P newex 171 106 40 1376266 key;
#P toggle 31 105 15 0;
#P newex 31 126 53 1376266 qmetro 2;
#P newex 171 210 51 1376266 change 0.;
#P message 162 159 46 1376266 0.05 500;
#P message 210 159 49 1376266 -0.05 500;
#P newex 171 189 40 1376266 bline 0.;
#P newex 171 132 48 1376266 sel 30 31;
#P message 74 248 44 1376266 set $1;
#P newex 127 239 33 1376266 + 0.;
#P comment 193 74 100 1376266 arrowkey up/down;
#P connect 9 0 8 0;
#P fasten 14 0 2 0 132 313 68 313 68 240 79 240;
#P fasten 2 0 1 0 79 272 122 272 122 234 132 234;
#P fasten 8 0 1 0 36 182 132 182;
#P connect 1 0 14 0;
#P connect 7 0 1 1;
#P connect 3 0 6 0;
#P connect 10 0 3 0;
#P fasten 6 0 4 0 167 179 176 179;
#P fasten 5 0 4 0 215 179 176 179;
#P fasten 12 0 4 0 289 179 176 179;
#P fasten 8 0 4 0 36 182 176 182;
#P connect 4 0 7 0;
#P connect 3 1 5 0;
#P connect 13 0 11 0;
#P connect 11 1 12 0;
#P connect 11 0 12 0;
#P pop;

#75085
Apr 18, 2006 at 10:43am

Yeh thats is pretty much what I was trying. Just tweaking it so I can increment 0.01 every tap and then “roll” when helf down.

This whole project, DJ – DRUMS – SUB SYNTH, has to be at the end of May, so I intend on building it as a standalone and will post a link to it when its done for whoever is interested.

Will

#75086
Apr 18, 2006 at 11:09am

that will be great!
:-)

t.

#75087
Apr 18, 2006 at 11:11am

thanx oliver, i forgot about that great feature that is “new from
clipboard”!!!

#75088

You must be logged in to reply to this topic.