Forums > MaxMSP

Creating a scalable curve with one number box

November 25, 2006 | 6:35 am

Hello. I’m trying to make a patch very similar to the one below. But,
rather than scaling a linear slope, I want to be able to scale an
exponential curve. however, with my extremely limited math and logic
skills, I’ve had trouble with figuring this out. I’ve tried using the
ExpCurve patch by Eric Singer, as well the exponential function of the scale
object, but I haven’t been able to work anything out. Any help appreciated!

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 42 59 405 523;
#P window setfont "Sans Serif" 9.;
#P newex 116 167 31 196617 t 0 b;
#P newex 143 372 29 196617 gate;
#P newex 50 167 31 196617 t 1 b;
#P newex 116 146 32 196617 sel 0;
#P message 71 189 50 196617 flags 35;
#P message 137 188 50 196617 flags 163;
#P newex 50 147 32 196617 sel 1;
#P flonum 170 69 87 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 162 351 101 196617 pak 0. 0. 0. 0. 0. 0.;
#P newex 170 280 27 196617 + 0.;
#P newex 187 245 27 196617 + 0.;
#P newex 204 210 27 196617 + 0.;
#P newex 221 175 27 196617 + 0.;
#P newex 238 140 27 196617 + 0.;
#P newex 255 105 27 196617 + 0.;
#P newex 170 86 97 196617 t f f f f f f;
#P newex 170 50 27 196617 / 6.;
#P flonum 255 123 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 238 158 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 221 193 34 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 204 228 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 187 263 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 170 298 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P inlet 116 126 15 0;
#P inlet 170 30 15 0;
#P outlet 137 208 15 0;
#P outlet 71 209 15 0;
#P outlet 143 394 15 0;
#P fasten 4 0 21 0 121 144 55 144;
#P connect 21 0 25 0;
#P connect 25 1 23 0;
#P connect 23 0 1 0;
#P connect 4 0 24 0;
#P connect 24 0 27 0;
#P connect 27 1 22 0;
#P connect 22 0 2 0;
#P connect 27 0 26 0;
#P connect 25 0 26 0;
#P connect 26 0 0 0;
#P connect 10 0 19 0;
#P connect 19 0 26 1;
#P connect 3 0 11 0;
#P connect 11 0 20 0;
#P connect 20 0 12 0;
#P connect 12 0 18 0;
#P connect 18 0 5 0;
#P connect 9 0 19 1;
#P connect 12 1 17 0;
#P connect 17 0 6 0;
#P connect 6 0 18 1;
#P connect 8 0 19 2;
#P connect 12 2 16 0;
#P connect 16 0 7 0;
#P connect 7 0 17 1;
#P connect 7 0 19 3;
#P connect 12 3 15 0;
#P connect 15 0 8 0;
#P connect 8 0 16 1;
#P connect 6 0 19 4;
#P connect 12 4 14 0;
#P connect 14 0 9 0;
#P connect 9 0 15 1;
#P connect 5 0 19 5;
#P connect 12 5 13 0;
#P connect 13 0 10 0;
#P connect 10 0 14 1;
#P pop;
#P hidden newobj 64 335 127 196617 p Linear Delay Line Scaler;
#P toggle 175 27 15 0;
#P number 189 27 35 9 0 4000 163 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user multiSlider 223 27 194 119 0. 2000. 6 2681 47 0 0 4 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P comment 170 17 61 196617 Line Scaler;
#P hidden fasten 3 0 4 0 180 317 69 317;
#P hidden fasten 2 0 4 1 194 318 186 318;
#P hidden fasten 4 1 2 0 127 365 51 365 51 274 194 274;
#P hidden fasten 4 0 2 0 69 371 45 371 45 269 194 269;
#P hidden fasten 4 2 1 0 185 365 500 365 500 23 228 23;
#P window clipboard copycount 5;


November 25, 2006 | 10:41 am

On 25-Nov-2006, at 7:35, Nic Zwart wrote:

> I’m trying to make a patch very similar to the one below. But,
> rather than scaling a linear slope, I want to be able to scale an
> exponential curve.

You may want to look at lp.scampi and its .help patch for an example
of both calculating and drawing exponential curves.

It’s in the Litter Starter Pack. URI below.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de


November 25, 2006 | 9:18 pm

Peter, thanks for the link, but I’m on an intelmac, and according to your
website, it looks like UB support for litter is in development.

On 11/25/06, Peter Castine

wrote:
>
> On 25-Nov-2006, at 7:35, Nic Zwart wrote:
>
> > I’m trying to make a patch very similar to the one below. But,
> > rather than scaling a linear slope, I want to be able to scale an
> > exponential curve.
>
> You may want to look at lp.scampi and its .help patch for an example
> of both calculating and drawing exponential curves.
>
> It’s in the Litter Starter Pack. URI below.
>
> ————– http://www.bek.no/~pcastine/Litter/ ————-
> Peter Castine +–> Litter Power & Litter Bundle for Jitter
> Universal Binaries on the way
> iCE: Sequencing, Recording &
> Interface Building for |home | chez nous|
> Max/MSP Extremely cool |bei uns | i nostri|
> http://www.dspaudio.com/ http://www.castine.de
>
>
>


November 25, 2006 | 10:54 pm

On 25-Nov-2006, at 22:18, Nic Zwart wrote:
> Peter, thanks for the link, but I’m on an intelmac, and according
> to your website, it looks like UB support for litter is in
> development.

UB will be available to the general public Very Soon.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de


November 28, 2006 | 10:47 pm

Nic Zwart wrote:
> Hello. I’m trying to make a patch very similar to the one below. But,
> rather than scaling a linear slope, I want to be able to scale an
> exponential curve. however, with my extremely limited math and logic
> skills, I’ve had trouble with figuring this out. I’ve tried using the
> ExpCurve patch by Eric Singer, as well the exponential function of the
> scale object, but I haven’t been able to work anything out. Any help
> appreciated!

Two ways for most uses beside an expr object and knowing the math is:

ftom, mtof or dbta, atodb. one for having the exponential curve of pitch
to frequency, the other of decibels to level – covers over 90% of all
needs…

experiement with scales before or after to fit it to the range you are
interested. It has the big advantage that the patch will be also easier
to understand later… (Its closer to a musical way of thinking…)

Stefan


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


November 29, 2006 | 12:45 am

How about Klaus Filip’s llog and ll.!og objects?
Available from http://www.cycling74.com/twiki/bin/view/Share/KlausFilip

> Hello. I’m trying to make a patch very similar to the one below. But, rather
> than scaling a linear slope, I want to be able to scale an exponential curve.
> however, with my extremely limited math and logic skills, I’ve had trouble
> with figuring this out. I’ve tried using the ExpCurve patch by Eric Singer,
> as well the exponential function of the scale object, but I haven’t been able
> to work anything out. Any help appreciated!

Cheers

George
george@georgekhut.com

http://www.georgekhut.com


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