Forums > MaxMSP

### Another hopeless math question (I dont know what im asking about….)

Nov 29 2007 | 5:47 pm

Hi there

I totally understand those who are fed up by my posting/asking…

I think i need help with something like linear or exponential curve…
I want to type/change a number in a frequency box, then send the number to different object boxes, then ba able to change wether each number is twice/three times or 10% the size of each other,
but the relation between them is always the same. Does this make sence?

max v2;
#N vpatcher 0 0 1024 688;
#P window setfont "Sans Serif" 20.;
#P flonum 510 276 115 20 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 420 377 27 9109513 * 1.;
#P window setfont "Sans Serif" 20.;
#P flonum 223 430 115 20 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 224 331 115 20 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 404 126 115 20 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 211 127 115 20 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 314 227 27 9109513 * 1.;
#P newex 442 651 40 9109513 partial~;
#P newex 391 576 40 9109513 partial~;
#P newex 341 507 40 9109513 partial~;
#P newex 161 434 40 9109513 partial~;
#P newex 159 333 40 9109513 partial~;
#P window setfont "Sans Serif" 20.;
#P comment 353 280 100 9109524 1x n ?;
#P connect 6 0 1 2;
#P connect 11 0 10 0;
#P connect 6 0 9 0;
#P connect 7 0 6 0;
#P connect 8 0 6 1;
#P connect 9 0 11 0;
#P connect 12 0 11 1;
#P pop;

Thank you

Nov 30 2007 | 8:32 am

petterdass schrieb:
> I think i need help with something like linear or exponential
> curve… I want to type/change a number in a frequency box, then send
> the number to different object boxes, then ba able to change wether
> each number is twice/three times or 10% the size of each other, but
> the relation between them is always the same. Does this make sence?

If I understand this correct, you want to route the frequency according
to a range. Look into split, with float arguments it will work with
floats. You might need several split objects. Or you could also devide
by your factor and use a route object…

(Math is never hopeless, because its so logical… ;-)

Stefan

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

Nov 30 2007 | 8:45 am

sounds easy…:)

Thanks alot!

Nov 30 2007 | 8:51 am

Stefan :

Does comparisions work with floats – so i can have the frequency eqivalent to a midi note and make zones for signal processing like from c3 to f3, turn left and amplitude modulate….

Nov 30 2007 | 8:55 am

i want this to work not only by changing pitch by playing different
midinotes, but foremost by changing frequency with (function) envelopes.

Nov 30 2007 | 1:11 pm

petterdass schrieb:
> Does comparisions work with floats – so i can have the frequency
> eqivalent to a midi note and make zones for signal processing like
> from c3 to f3, turn left and amplitude modulate….

I forgot to post my example… In general all can work with floats. You
have to give mostly float arguments to turn an operator into its float
version….

#P window setfont "Sans Serif" 9.;
#P flonum 397 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 360 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 323 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 286 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 249 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 212 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 175 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 138 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 101 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 101 187 306 196617 route 0 1 2 3 4 5 6 7;
#P flonum 180 72 35 9 0.001 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 101 158 50 196617 pack 0 0.;
#P newex 101 114 89 196617 / 2.;
#P flonum 141 72 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 218 73 100 196617 change ratio;
#P connect 1 0 2 0;
#P connect 1 0 3 1;
#P connect 4 0 2 1;
#P connect 5 8 14 0;
#P connect 2 0 3 0;
#P connect 3 0 5 0;
#P connect 5 7 13 0;
#P connect 5 6 12 0;
#P connect 5 5 11 0;
#P connect 5 4 10 0;
#P connect 5 3 9 0;
#P connect 5 2 8 0;
#P connect 5 1 7 0;
#P connect 5 0 6 0;
#P window clipboard copycount 15;

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

Nov 30 2007 | 9:23 pm

Math wants to be your friend!

Try this for ideas…

————————————

#P window setfont "Sans Serif" 14.;
#P window linecount 1;
#P comment 59 633 502 9109518 lots of addictive cool patterns…. math is your friend for that :);
#P comment 64 29 179 9109518 Main value;
#P window setfont "Sans Serif" 9.;
#P newex 90 463 39 9109513 t b f;
#P window setfont "Sans Serif" 14.;
#P comment 176 437 125 9109518 expr offset;
#P window setfont "Sans Serif" 18.;
#P flonum 90 434 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P comment 470 329 102 9109518 uzi scalar;
#P window setfont "Sans Serif" 12.;
#P message 487 561 93 9109516 tabrange \$1;
#P window setfont "Sans Serif" 14.;
#P number 487 535 61 14 1 0 5 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 12.;
#P message 409 561 65 9109516 size \$1;
#P window setfont "Sans Serif" 14.;
#P number 409 535 61 14 1 0 5 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P comment 314 590 344 9109518 adjust table size and range according to function;
#P comment 321 436 390 9109518 good for amp , freq , effect level curves;
#P window setfont "Sans Serif" 9.;
#P newex 91 407 39 9109513 t b f;
#P window setfont "Sans Serif" 14.;
#P comment 23 309 170 9109518 expr single operator;
#N vpreset 4;
#X append 1 1 36 328 385 flonum float 0.04 ; 28 378 91 flonum float 64. ; 51 434 90 flonum float 64. ;;
#X append 2 1 36 328 385 flonum float 5. ; 28 378 91 flonum float 38. ; 51 434 90 flonum float 64. ;;
#X append 3 1 36 328 385 flonum float 10.97 ; 28 378 91 flonum float 9. ; 51 434 90 flonum float 64. ;;
#X append 4 1 36 328 385 flonum float 12.78 ; 28 378 91 flonum float 44.58 ; 51 434 90 flonum float 64. ;;
#P preset 515 272 47 47;
#P comment 321 407 366 9109518 expr could use tangent , log , powers , etc…. etc…;
#P comment 177 381 125 9109518 expr scalar;
#P comment 323 302 158 9109518 uzi / table version;
#P button 295 301 15 0;
#P window setfont "Sans Serif" 18.;
#P flonum 385 328 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#N vtable 157 776 241 1188 621 999901 131;
#P newobj 307 557 71 9109518 table;
#P message 307 526 54 9109518 \$2 \$1;
#P newex 307 494 78 9109518 pack 0 0;
#P newex 385 362 56 9109518 * 0.01;
#P newex 295 330 82 9109518 uzi 128 1;
#P window setfont "Sans Serif" 18.;
#P flonum 56 527 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P button 39 497 15 0;
#P flonum 91 378 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 58 496 200 9109518 expr sin(\$f1) * \$f2 + \$f3;
#P window setfont "Sans Serif" 24.;
#P flonum 23 331 127 24 0.001 0 5 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P comment 350 26 179 9109518 Basic scalars:;
#P window setfont "Sans Serif" 9.;
#P message 536 124 40 9109513 select;
#P message 394 124 40 9109513 select;
#P message 263 124 40 9109513 select;
#P message 124 124 40 9109513 select;
#P window setfont "Sans Serif" 14.;
#P comment 351 73 179 9109518 tab through;
#P window setfont "Sans Serif" 18.;
#P flonum 472 177 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P button 455 134 15 0;
#P flonum 498 96 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 472 134 35 9109518 * 1.;
#P window setfont "Sans Serif" 18.;
#P flonum 336 177 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P button 319 134 15 0;
#P flonum 362 96 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 336 134 35 9109518 * 1.;
#P window setfont "Sans Serif" 18.;
#P flonum 198 177 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P button 181 134 15 0;
#P flonum 224 96 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 198 134 35 9109518 * 1.;
#N vpreset 2;
#X append 1 1 17 96 498 flonum float 4. ; 13 96 362 flonum float 3. ; 9 96 224 flonum float 2. ; 4 96 88 flonum float 1. ;;
#X append 2 1 17 96 498 flonum float 8. ; 13 96 362 flonum float 4. ; 9 96 224 flonum float 2. ; 4 96 88 flonum float 1. ;;
#P preset 255 32 47 47;
#P window setfont "Sans Serif" 18.;
#P flonum 62 177 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P button 45 134 15 0;
#P flonum 88 96 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 62 134 35 9109518 * 1.;
#P window setfont "Sans Serif" 24.;
#P flonum 62 49 127 24 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P comment 350 49 179 9109518 good for harmonics;
#P user panel 44 250 639 7;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X done;
#P hidden connect 4 0 5 0;
#P hidden connect 27 0 30 0;
#P hidden connect 26 0 27 0;
#P hidden connect 32 0 27 0;
#P hidden connect 29 0 27 0;
#P hidden connect 2 0 3 0;
#P hidden connect 5 0 3 0;
#P hidden connect 3 0 6 0;
#P hidden connect 4 0 3 1;
#P hidden connect 7 0 4 0;
#P hidden connect 24 0 4 0;
#P hidden connect 41 0 51 0;
#P hidden connect 51 0 53 0;
#P hidden connect 41 0 28 0;
#P hidden connect 28 0 43 0;
#P hidden connect 4 1 21 0;
#P hidden connect 43 1 27 1;
#P hidden connect 9 0 10 0;
#P hidden connect 2 0 8 0;
#P hidden connect 10 0 8 0;
#P hidden connect 8 0 11 0;
#P hidden connect 9 0 8 1;
#P hidden connect 7 0 9 0;
#P hidden connect 21 0 9 0;
#P hidden connect 53 1 27 2;
#P hidden connect 9 1 22 0;
#P hidden connect 53 0 37 0;
#P hidden connect 36 0 37 0;
#P hidden connect 43 0 37 0;
#P hidden connect 37 0 31 0;
#P hidden connect 27 0 33 0;
#P hidden connect 33 0 34 0;
#P hidden connect 49 0 35 0;
#P hidden connect 47 0 35 0;
#P hidden connect 34 0 35 0;
#P hidden connect 13 0 14 0;
#P hidden connect 2 0 12 0;
#P hidden connect 14 0 12 0;
#P hidden connect 12 0 15 0;
#P hidden connect 13 0 12 1;
#P hidden connect 7 0 13 0;
#P hidden connect 22 0 13 0;
#P hidden connect 46 0 31 1;
#P hidden connect 31 2 33 1;
#P hidden connect 41 0 36 0;
#P hidden connect 31 2 32 0;
#P hidden connect 13 1 23 0;
#P hidden connect 46 0 47 0;
#P hidden connect 36 0 32 1;
#P hidden connect 17 0 18 0;
#P hidden connect 2 0 16 0;
#P hidden connect 18 0 16 0;
#P hidden connect 16 0 19 0;
#P hidden connect 48 0 49 0;
#P hidden connect 17 0 16 1;
#P hidden connect 7 0 17 0;
#P hidden connect 23 0 17 0;
#P hidden connect 17 1 24 0;
#P window clipboard copycount 56;

Nov 30 2007 | 10:06 pm

Better yet… play those data points as MIDI notes…. wacky fun

———————

#P user panel 24 622 639 7;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X done;
#P button 285 747 34 0;
#P window setfont "Sans Serif" 14.;
#P window linecount 1;
#P comment 219 702 208 9109518 min and max range;
#P comment 187 661 208 9109518 playback of data as notes;
#P message 25 787 54 9109518 0 127;
#P user rslider 89 785 509 27 128 1 0 0 0;
#P number 219 724 61 14 0 2 7 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P number 615 761 61 14 0 127 7 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P newex 614 788 84 9109518 pgmout 1;
#P newex 457 751 85 9109518 noteout 1;
#P number 610 685 61 14 5 0 5 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P number 526 683 61 14 0 127 7 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P newex 457 712 150 9109518 makenote 80 250;
#P toggle 14 641 50 0;
#P number 78 669 61 14 5 0 5 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P newex 14 697 91 9109518 metro 250;
#P number 295 724 61 14 0 0 5 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 10.;
#P message 126 724 87 9109514 setmin \$1;
#P window setfont "Sans Serif" 14.;
#P number 126 698 61 14 0 0 5 139 255 255 255 0 0 0 222 222 222 0 0 0;
#N counter 0 127;
#X flags 0 0;
#P newobj 154 752 122 9109518 counter 0 127;
#P comment 41 587 502 9109518 lots of addictive cool patterns…. math is your friend for that :);
#P comment 64 29 179 9109518 Main value;
#P window setfont "Sans Serif" 9.;
#P newex 90 463 39 9109513 t b f;
#P window setfont "Sans Serif" 14.;
#P comment 176 437 125 9109518 expr offset;
#P window setfont "Sans Serif" 18.;
#P flonum 90 434 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P comment 470 329 102 9109518 uzi scalar;
#P window setfont "Sans Serif" 12.;
#P message 491 537 93 9109516 tabrange \$1;
#P window setfont "Sans Serif" 14.;
#P number 491 511 61 14 1 0 5 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 12.;
#P message 413 537 65 9109516 size \$1;
#P window setfont "Sans Serif" 14.;
#P number 413 511 61 14 1 0 5 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P comment 318 566 344 9109518 adjust table size and range according to function;
#P comment 321 436 390 9109518 good for amp , freq , effect level curves;
#P window setfont "Sans Serif" 9.;
#P newex 91 407 39 9109513 t b f;
#P window setfont "Sans Serif" 14.;
#P comment 23 309 170 9109518 expr single operator;
#N vpreset 4;
#X append 1 1 36 328 385 flonum float 0.04 ; 28 378 91 flonum float 64. ; 51 434 90 flonum float 64. ;;
#X append 2 1 36 328 385 flonum float 5. ; 28 378 91 flonum float 38. ; 51 434 90 flonum float 64. ;;
#X append 3 1 36 328 385 flonum float 10.97 ; 28 378 91 flonum float 9. ; 51 434 90 flonum float 64. ;;
#X append 4 1 36 328 385 flonum float 12.78 ; 28 378 91 flonum float 44.58 ; 51 434 90 flonum float 64. ;;
#P preset 515 272 47 47;
#P comment 321 407 366 9109518 expr could use tangent , log , powers , etc…. etc…;
#P comment 177 381 125 9109518 expr scalar;
#P comment 323 302 158 9109518 uzi / table version;
#P button 295 301 15 0;
#P window setfont "Sans Serif" 18.;
#P flonum 385 328 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#N vtable 154 776 241 1188 621 999901 148;
#P newobj 311 533 71 9109518 table;
#P message 311 502 54 9109518 \$2 \$1;
#P newex 311 470 78 9109518 pack 0 0;
#P newex 385 362 56 9109518 * 0.01;
#P newex 295 330 82 9109518 uzi 128 1;
#P window setfont "Sans Serif" 18.;
#P flonum 56 527 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P button 39 497 15 0;
#P flonum 91 378 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 58 496 200 9109518 expr sin(\$f1) * \$f2 + \$f3;
#P window setfont "Sans Serif" 24.;
#P flonum 23 331 127 24 0.001 0 5 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P comment 350 26 179 9109518 Basic scalars:;
#P window setfont "Sans Serif" 9.;
#P message 536 124 40 9109513 select;
#P message 394 124 40 9109513 select;
#P message 263 124 40 9109513 select;
#P message 124 124 40 9109513 select;
#P window setfont "Sans Serif" 14.;
#P comment 351 73 179 9109518 tab through;
#P window setfont "Sans Serif" 18.;
#P flonum 472 177 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P button 455 134 15 0;
#P flonum 498 96 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 472 134 35 9109518 * 1.;
#P window setfont "Sans Serif" 18.;
#P flonum 336 177 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P button 319 134 15 0;
#P flonum 362 96 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 336 134 35 9109518 * 1.;
#P window setfont "Sans Serif" 18.;
#P flonum 198 177 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P button 181 134 15 0;
#P flonum 224 96 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 198 134 35 9109518 * 1.;
#N vpreset 2;
#X append 1 1 17 96 498 flonum float 4. ; 13 96 362 flonum float 3. ; 9 96 224 flonum float 2. ; 4 96 88 flonum float 1. ;;
#X append 2 1 17 96 498 flonum float 8. ; 13 96 362 flonum float 4. ; 9 96 224 flonum float 2. ; 4 96 88 flonum float 1. ;;
#P preset 255 32 47 47;
#P window setfont "Sans Serif" 18.;
#P flonum 62 177 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P button 45 134 15 0;
#P flonum 88 96 80 18 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 62 134 35 9109518 * 1.;
#P window setfont "Sans Serif" 24.;
#P flonum 62 49 127 24 0 0 4 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P comment 350 49 179 9109518 good for harmonics;
#P user panel 44 250 639 7;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X done;
#P hidden connect 62 0 60 0;
#P hidden connect 4 0 5 0;
#P hidden connect 27 0 30 0;
#P hidden connect 26 0 27 0;
#P hidden connect 32 0 27 0;
#P hidden connect 29 0 27 0;
#P hidden connect 2 0 3 0;
#P hidden connect 5 0 3 0;
#P hidden connect 3 0 6 0;
#P hidden connect 4 0 3 1;
#P hidden connect 7 0 4 0;
#P hidden connect 24 0 4 0;
#P hidden connect 71 0 70 0;
#P hidden connect 41 0 51 0;
#P hidden connect 51 0 53 0;
#P hidden connect 41 0 28 0;
#P hidden connect 28 0 43 0;
#P hidden connect 61 0 60 1;
#P hidden connect 4 1 21 0;
#P hidden connect 70 0 57 0;
#P hidden connect 57 0 58 0;
#P hidden connect 43 1 27 1;
#P hidden connect 60 0 56 0;
#P hidden connect 58 0 56 0;
#P hidden connect 9 0 10 0;
#P hidden connect 69 0 56 1;
#P hidden connect 2 0 8 0;
#P hidden connect 10 0 8 0;
#P hidden connect 8 0 11 0;
#P hidden connect 9 0 8 1;
#P hidden connect 7 0 9 0;
#P hidden connect 21 0 9 0;
#P hidden connect 53 1 27 2;
#P hidden connect 9 1 22 0;
#P hidden connect 59 0 56 4;
#P hidden connect 56 2 74 0;
#P hidden connect 53 0 37 0;
#P hidden connect 36 0 37 0;
#P hidden connect 43 0 37 0;
#P hidden connect 37 0 31 0;
#P hidden connect 70 1 59 0;
#P hidden connect 27 0 33 0;
#P hidden connect 33 0 34 0;
#P hidden connect 56 0 35 0;
#P hidden connect 49 0 35 0;
#P hidden connect 47 0 35 0;
#P hidden connect 34 0 35 0;
#P hidden connect 13 0 14 0;
#P hidden connect 2 0 12 0;
#P hidden connect 14 0 12 0;
#P hidden connect 12 0 15 0;
#P hidden connect 13 0 12 1;
#P hidden connect 7 0 13 0;
#P hidden connect 22 0 13 0;
#P hidden connect 46 0 31 1;
#P hidden connect 31 2 33 1;
#P hidden connect 41 0 36 0;
#P hidden connect 31 2 32 0;
#P hidden connect 13 1 23 0;
#P hidden connect 46 0 47 0;
#P hidden connect 36 0 32 1;
#P hidden connect 17 0 18 0;
#P hidden connect 35 0 63 0;
#P hidden connect 63 0 66 0;
#P hidden connect 2 0 16 0;
#P hidden connect 18 0 16 0;
#P hidden connect 16 0 19 0;
#P hidden connect 48 0 49 0;
#P hidden connect 63 1 66 1;
#P hidden connect 17 0 16 1;
#P hidden connect 7 0 17 0;
#P hidden connect 23 0 17 0;
#P hidden connect 64 0 63 1;
#P hidden connect 17 1 24 0;
#P hidden connect 65 0 63 2;
#P hidden connect 68 0 67 0;
#P window clipboard copycount 76;

Dec 01 2007 | 8:22 pm

seejayjames :

thanks alot, but ehhhm what does it do? I understand its a kind of linear curve, where i plot in the Variables, but the rest is greec :)

Stefan :

this is also a linear curve, is it difficult (and useful) to make it into an exponential curve?

Thank you!!

Dec 01 2007 | 9:55 pm

Well, the top part is for simple scaling of a main value. Good for making harmonic frequencies (integer or float) of a main frequency value. Build up your synthesizer with banks of these, store the multipliers as presets (pattrs even better). You could use a multislider for the values, and another one for the volume levels. Good fundamental synth stuff that allows control over a main freq value (which could be entered via a MIDI notein).

For the graph part, it’s really just to show that generating curves is straightforward. The presets disappeared when I pasted the patch (I guess this happens all the time? I didn’t know that, too bad). Essentially it takes values 0 – 127 from an uzi and calculates the sine of each, after it goes through a scalar (to make the values more appropriate for sine). It’s then scaled again (to change the height of the curve) and has an offset (to move the curve up and down). Try a range of scalars; an offset of 64 will put the curve in the middle of the graph.

What does it "do"? ;) Often a good question in Max, since these things can "do" whatever you want. I have it playable as MIDI notes, just as an example. So the first scalar determines how often the sine goes up and down, the second scalar stretches or compresses the curve, and the offset moves it up and down (transposition of notes).

Really it’s just for experimentation and to show how to generate curves automatically. This way there’s a certain level of control while generating values that aren’t totally known, a kind of quasi-randomness that’s fun to mess with. Again, once you see some of the possible curves, use a pattr on the parameters and you’ll have tons of automatically-generated curves to access. The values can do anything you want, not just be MIDI pitches as I’ve got here… amp, FX, durations, mixing levels, brightness levels of a video, etc… it’s up to you.

The key is the expr… with a more complex function there, or stringing several together, you can get pretty nutty with the curves you make. Also, I’m a big math dork ;-) so I’m pretty happy just seeing the results graphically. It’s way cooler rendering the values in GL, but that takes a bit more work.

–CJ

Dec 02 2007 | 7:33 pm

Thanks all!

What i want to do is connect envelopes to the two parameters here,
but in current state, i dont get the parameters to "constantly uppdate" the freq value in my oscillators.

Does this make sense?

#P window setfont "Sans Serif" 9.;
#P flonum 397 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 360 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 323 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 286 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 249 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 212 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 175 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 138 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 101 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 101 187 306 196617 route 0 1 2 3 4 5 6 7;
#P flonum 180 72 35 9 0.001 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 101 158 50 196617 pack 0 0.;
#P newex 101 114 89 196617 / 2.;
#P flonum 141 72 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 218 73 100 196617 change ratio;
#P connect 1 0 2 0;
#P connect 1 0 3 1;
#P connect 4 0 2 1;
#P connect 5 8 14 0;
#P connect 2 0 3 0;
#P connect 3 0 5 0;
#P connect 5 7 13 0;
#P connect 5 6 12 0;
#P connect 5 5 11 0;
#P connect 5 4 10 0;
#P connect 5 3 9 0;
#P connect 5 2 8 0;
#P connect 5 1 7 0;
#P connect 5 0 6 0;
#P window clipboard copycount 15;

Dec 03 2007 | 2:54 pm

The divide only occurs when you change the left float. With pak output
occurs when you change either value.

Try this

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 101 84 49 196617 pak 0. 0.;
#P flonum 397 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 360 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 323 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 286 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 249 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 212 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 175 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 138 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 101 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 101 187 306 196617 route 0 1 2 3 4 5 6 7;
#P flonum 141 61 35 9 0.001 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 101 158 50 196617 pack 0 0.;
#P newex 101 114 89 196617 / 2.;
#P flonum 101 63 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 183 62 100 196617 change ratio;
#P connect 15 0 2 0;
#P connect 15 0 3 1;
#P connect 4 0 15 1;
#P connect 1 0 15 0;
#P connect 5 0 6 0;
#P connect 5 1 7 0;
#P connect 5 2 8 0;
#P connect 5 3 9 0;
#P connect 5 4 10 0;
#P connect 5 5 11 0;
#P connect 5 6 12 0;
#P connect 5 7 13 0;
#P connect 3 0 5 0;
#P connect 2 0 3 0;
#P connect 5 8 14 0;
#P window clipboard copycount 16;

On 12/2/07 2:33 PM, "petterdass" wrote:

> #P window setfont "Sans Serif" 9.;
> #P flonum 397 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 360 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 323 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 286 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 249 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 212 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 175 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 138 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 101 211 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P newex 101 187 306 196617 route 0 1 2 3 4 5 6 7;
> #P flonum 180 72 35 9 0.001 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 101 158 50 196617 pack 0 0.;
> #P newex 101 114 89 196617 / 2.;
> #P flonum 141 72 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P comment 218 73 100 196617 change ratio;
> #P connect 1 0 2 0;
> #P connect 1 0 3 1;
> #P connect 4 0 2 1;
> #P connect 5 8 14 0;
> #P connect 2 0 3 0;
> #P connect 3 0 5 0;
> #P connect 5 7 13 0;
> #P connect 5 6 12 0;
> #P connect 5 5 11 0;
> #P connect 5 4 10 0;
> #P connect 5 3 9 0;
> #P connect 5 2 8 0;
> #P connect 5 1 7 0;
> #P connect 5 0 6 0;
> #P window clipboard copycount 15;

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

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

Forums > MaxMSP