Hi all i am back with a new problem. I ll try to explain it. I have a midi knob (endless) which sends 0 when turned right and 127 when turned left. I used a [select 0 127] and then decrement 1 for each 0 and increment for each 127 using [ i ] [ - 1] and [ i ] [ + 1 ] respectively . This sort of works but:
When i turn it right everithing is ok. Lets say I increment from 0 to 100 then decrement from 100 to 50. that works as expected. If I increment again from 50 it will go 50 51 and then jump to 100. I think thats has something to do with the int objects( the store the last value arent they?) and they way I connected one int with the other.
Its quite hard to explain actually and I hope I make sense. I will apreciate any help.
anton
hello,
may this patch help...
Cyrille
Antonis Galanopoulos wrote:
Hi all i am back with a new problem. I ll try to explain it. I have a midi knob (endless) which sends 0 when turned right and 127 when turned left. I used a [select 0 127] and then decrement 1 for each 0 and increment for each 127 using [ i ] [ - 1] and [ i ] [ + 1 ] respectively . This sort of works but:
When i turn it right everithing is ok. Lets say I increment from 0 to 100 then decrement from 100 to 50. that works as expected. If I increment again from 50 it will go 50 51 and then jump to 100. I think thats has something to do with the int objects( the store the last value arent they?) and they way I connected one int with the other.
Its quite hard to explain actually and I hope I make sense. I will apreciate any help.
anton
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
#N canvas 0 0 185 237 12; #X obj 67 72 sel 0 127; #X msg 32 20 0; #X msg 68 21 127; #X msg 67 100 -1; #X msg 100 100 1; #X obj 67 135 +; #X obj 32 163 i; #X obj 32 48 t b f; #X floatatom 32 193 5 0 0 0 - - -; #X connect 0 0 3 0; #X connect 0 1 4 0; #X connect 1 0 7 0; #X connect 2 0 7 0; #X connect 3 0 5 0; #X connect 4 0 5 0; #X connect 5 0 6 1; #X connect 6 0 5 1; #X connect 6 0 8 0; #X connect 7 0 6 0; #X connect 7 1 0 0;
Hi Anton,
have a look at the patch attached. You can use the right inlet of the [int ] objects to set a value that you'll get on the next bang. I think the trick here is to interconnect the two parts counting up and down so that one part knows 'where' the other is. Only problem with my implementation: the first pulse after a change of direction gets lost....
Olaf
Antonis Galanopoulos schrieb:
Hi all i am back with a new problem. I ll try to explain it. I have a midi knob (endless) which sends 0 when turned right and 127 when turned left. I used a [select 0 127] and then decrement 1 for each 0 and increment for each 127 using [ i ] [ - 1] and [ i ] [ + 1 ] respectively . This sort of works but:
When i turn it right everithing is ok. Lets say I increment from 0 to 100 then decrement from 100 to 50. that works as expected. If I increment again from 50 it will go 50 51 and then jump to 100. I think thats has something to do with the int objects( the store the last value arent they?) and they way I connected one int with the other.
Its quite hard to explain actually and I hope I make sense. I will apreciate any help.
anton
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
#N canvas 0 0 452 302 12; #X obj 64 94 int 0; #X obj 206 98 int 0; #X obj 116 95 - 1; #X obj 263 97 + 1; #X msg 64 15 0; #X msg 135 17 127; #X text 176 17 this is instead of your input; #X obj 64 57 select 0 127; #X floatatom 64 167 5 0 0 0 - - -; #X connect 0 0 2 0; #X connect 0 0 8 0; #X connect 0 0 1 1; #X connect 1 0 3 0; #X connect 1 0 8 0; #X connect 1 0 0 1; #X connect 2 0 0 1; #X connect 3 0 1 1; #X connect 4 0 7 0; #X connect 5 0 7 0; #X connect 7 0 0 0; #X connect 7 1 1 0;
I hope the included tiny little patch will help.
Le sam 29/03/2003 à 10:44, Antonis Galanopoulos a écrit :
Hi all i am back with a new problem. I ll try to explain it. I have a midi knob (endless) which sends 0 when turned right and 127 when turned left. I used a [select 0 127] and then decrement 1 for each 0 and increment for each 127 using [ i ] [ - 1] and [ i ] [ + 1 ] respectively . This sort of works but:
When i turn it right everithing is ok. Lets say I increment from 0 to 100 then decrement from 100 to 50. that works as expected. If I increment again from 50 it will go 50 51 and then jump to 100. I think thats has something to do with the int objects( the store the last value arent they?) and they way I connected one int with the other.
Its quite hard to explain actually and I hope I make sense. I will apreciate any help.
anton
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list