Forums > MaxMSP

problems with lookup~ around zero

December 12, 2006 | 4:59 pm

Hi listmembers,

Realizing that a lookup~ table was not doing what I wanted it to do I
was trying to build a simple input = output table.

I could not get rid of the problem that if I input values little below
zero,
the lookup~ object gives me positive values instead of negative ones.
What I need is the lookup~ object beeing able to deal with negative
values
as proper as it does with positive values.

A patch to illistrate the problem is below.

I’d be glad for hints to solve this problem.

Thanks and best, Cor

——————-

max v2;
#N vpatcher 270 349 1171 895;
#P origin 0 -17;
#P window setfont "Sans Serif" 9.;
#P message 515 163 36 196617 -0.75;
#P message 475 163 36 196617 -0.76;
#P message 423 163 36 196617 -0.98;
#P message 384 163 36 196617 -0.99;
#P message 362 163 19 196617 -1;
#P newex 311 209 29 196617 sig~;
#P newex 76 374 55 196617 delay 500;
#P user scope~ 652 300 782 430 256 3 128 -1. 1. 0 0. 0 0. 102 255 51
135 135 135 0;
#P newex 128 132 48 196617 loadbang;
#P flonum 311 188 72 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 311 132 41 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 311 163 40 196617 / 100.;
#P toggle 77 397 15 0;
#P newex 77 424 31 196617 dac~;
#P user number~ 311 262 403 277 9 3 3 2 0. 0. 0 0. 20 0. 0 0 0 221 221
221 222 222 222 0 0 0;
#P flonum 230 444 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 230 396 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 230 419 69 196617 peek~ dreibit;
#P newex 311 232 95 196617 lookup~ dreibit 0 8;
#P newex 348 338 92 196617 buffer~ dreibit 12;
#P newex 163 231 27 196617 – 1;
#P button 133 169 15 0;
#P newex 133 198 40 196617 Uzi 9;
#P newex 163 415 32 196617 print;
#P newex 180 362 27 196617 – 1.;
#P newex 180 339 27 196617 / 4.;
#P newex 163 387 51 196617 pack 0 0.;
#P newex 163 288 27 196617 t i i;
#P number 163 263 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 350 132 320 196617 < - set to zero and scrol below zero ,
watch outpu below lookup~;
#P window linecount 2;
#P comment 412 263 217 196617 < - should be negative when values above
are under zero. however , they get again positive.;
#P window linecount 1;
#P comment 553 163 100 196617 < - or try those;
#P connect 23 0 25 0;
#P connect 25 0 19 0;
#P connect 19 0 18 0;
#P connect 23 0 10 0;
#P connect 10 0 9 0;
#P connect 9 2 11 0;
#P connect 11 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 8 0;
#P connect 4 1 6 0;
#P connect 6 0 7 0;
#P connect 7 0 5 1;
#P connect 5 0 14 0;
#P connect 15 0 14 0;
#P connect 14 0 16 0;
#P connect 21 0 20 0;
#P connect 31 0 22 0;
#P connect 30 0 22 0;
#P connect 29 0 22 0;
#P connect 28 0 22 0;
#P connect 27 0 22 0;
#P connect 20 0 22 0;
#P connect 22 0 26 0;
#P connect 26 0 13 0;
#P connect 13 0 17 0;
#P fasten 13 0 24 0 316 254 657 254;
#P pop;


Viewing 1 post (of 1 total)