Re: scaleX

Mar 14, 2006 at 9:36pm

Re: scaleX

I am trying to use an old patch that uses Stephan Kay’s old scaleX, but
i seem to have lost the object. Google as i might i don’t see it
anywhere… Anyone know where Stephan Kay keeps his Max externals for
download?

best,

-kp–

#25079
Mar 15, 2006 at 8:57pm

He never updated the old OS 9 versions as far as I know, thats why I
started to make abhaXions. My attempt for scaleX is the following:
(Though I do have the help file, I don’t know if it resembles the
original in every aspect….)

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 82 289 36 196617 print;
#P window linecount 2;
#P message 82 251 60 196617 $1 $2 $3 $4;
#P window linecount 1;
#P newex 82 226 60 196617 prepend set;
#P newex 179 170 154 196617 pak $1 $2 $3 $4;
#P newex 179 197 154 196617 unpack $1 $2 $3 $4;
#P newex 185 268 63 196617 zl slice 4;
#P newex 185 247 63 196617 patcherargs;
#P newex 144 289 104 196617 zl slice 256;
#P newex 144 247 39 196617 thresh;
#P newex 144 197 27 196617 iter;
#P newex 144 226 250 196617 scale $1 $2 $3 $4;
#P inlet 288 137 15 0;
#P inlet 336 137 15 0;
#P inlet 72 137 15 0;
#P inlet 192 137 15 0;
#P inlet 240 137 15 0;
#P outlet 144 325 15 0;
#P window linecount 2;
#P newex 72 157 83 196617 route bang display setrange;
#P connect 5 0 14 3;
#P connect 5 0 7 4;
#P connect 13 3 7 4;
#P connect 13 3 14 3;
#P connect 6 0 14 2;
#P connect 6 0 7 3;
#P connect 13 2 7 3;
#P connect 13 2 14 2;
#P connect 2 0 7 2;
#P connect 13 1 14 1;
#P connect 13 1 7 2;
#P connect 12 1 10 1;
#P connect 2 0 14 1;
#P connect 3 0 7 1;
#P connect 13 0 14 0;
#P connect 13 0 7 1;
#P connect 11 0 12 0;
#P fasten 0 2 13 0 125 192 184 192;
#P connect 3 0 14 0;
#P connect 10 0 1 0;
#P fasten 0 0 10 0 77 273 149 273;
#P connect 9 0 10 0;
#P connect 7 0 9 0;
#P connect 8 0 7 0;
#P connect 0 3 8 0;
#P connect 16 0 17 0;
#P connect 15 0 16 0;
#P connect 0 1 16 0;
#P connect 14 0 15 0;
#P connect 4 0 0 0;
#P window clipboard copycount 18;

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-57 42 91 09

#73395
Mar 16, 2006 at 1:37am

Thanks Peter & Stefan… there are other scale things that i can use,
including the old ircam one (which is now included as “scale” or where
these different?) …. and i’ve even coded one up that i use in python
for use with other languages, but i was hoping i could just drop the
external in since i am likely to have more than one patch that looks
for it. I didn’t know that Kay no longer supports those… I thought
they were pretty current… i guess i am a bit out of touch, things
move so fast in the Max/MSP world now.

thanks!

-kevin

I am guessing that scaleX and scale both do something like (pardon the
python hehe):

import random

def scaleX(in_seq, low, hi):
range1 = max(in_seq) – min(in_seq)
range2 = hi – low
in_low = min(in_seq)
ratio = range2/range1
return [ ((x-in_low) * ratio + low) for x in in_seq ]

def test():
inseq = random.sample(xrange(128), 25)
print
print scaleX(inseq, 0.0, 1.0)
print

if __name__ == “__main__”:
test()

only i think scale and scaleX also hada flag for exponential mode…
anyway i will look at what stefan has here too and see if that gets me
where i need to be.

#73396
Mar 16, 2006 at 9:48am

On 16-Mar-2006, at 2:37, kevin parks wrote:
> but i was hoping i could just drop the external in since i am
> likely to have more than one patch that looks for it.

That’s why I suggested naming the abstraction scaleX. Put it
somewhere in your search path an Max will never notice the difference
when opening your old patches.

> I am guessing that scaleX and scale both do something like
[schnipp]

Yeah.

> flag for exponential mode

That’s the rub. If you need a plug-compatible replacement, then you
may need to work out exactly how Stephan’s version worked. There are
a couple of different ways of calculating a curved transfer function.
I’ve written code for at least three different approaches to this,
and one of them is probably what Stephan did. But which one?

If you can track him down, Stephan might let you know.

Good luck — P

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine | +–> Litter Power & Litter Bundle for Jitter
|…………………………………………….
p@castine.de | iCE: Sequencing, Recording, and Interface Building
pcastine@gmx.net | for Max/MSP
pcastine@bek.no | http://www.dspaudio.com/ Extremely cool
4-15@kagi.com |…………………………………………….
| home|chez nous|wir|i nostri http://www.castine.de/

#73397
Mar 16, 2006 at 7:30pm

kevin parks wrote:
> but i was hoping i could just drop the external in since i am likely
> to have more than one patch that looks for it.

All the abhaXions work like that, you just drop them in, they are
intended to share name AND funcionality…

Name my patch scaleX and be sure none of the old versions sits in the
search path and off you go.

Stefan

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-57 42 91 09

#73398
Mar 17, 2006 at 6:38am

#73399

You must be logged in to reply to this topic.