# split range scale?

I’m trying to make a simple patch that takes the pitch bender and rescales it so that it bends one octave above, but 4 octaves below. I came up with something that works for me, but I’m pretty sure there must be an object or technique that can simplify this patch. Something like scale, but with split ranges would be a great object, especially if it did some sort of smooth between the hi and low bend info so it’s not linear like my patch, but that may be overkill for what I need right now. Could someone look at this and let me know how to simplify it?

**all**of the following text. Then, in Max, select

*New From Clipboard*.

```
----------begin_max5_patcher----------
665.3oc0WtsiaCBDF9ZmmBDWmMBvGSUak5yQ0pJmXpWprwQ1D0ztZe2Kfsyg
s3V1rDjyMX4AL9e9fYF34EAvMMGncPvG.eEDD77hf.sIkgfg2Cf04G1Vk2oG
FjuudCsEtruKVg1Xyle7.IYznbHLdEUn+.7IiM6EiVICV2kK19DiW9sV5VQu
LBCSVgVBHwD0iXjpEudEB73v278Ftni8apd1wxt6M2O6hesi1OOPFW.WBfax
4kvK9XddsdLvuzxxqfpNdYwBUyRKgfnorrhZBBj2.DvSCA7ZMDvIYZVfFaO5
GF81i8tqk1Q4hbAqge1rRxT3BDFEpdfFZ.OdEDfS+ozeGcVA8f9W.KyEFwRn
QrPtVrz+HKaU7Ut2vZTks9RT4zsQS.wO9IPRjIJF4VJFocqjz2UDl2hrvtIx
JBccQV27XDblaVcGcPGFi3nc6SU4.m5lJGQomuzNOqbLMDhcCDHI2APvbfwm
mHumiCLlio8lfHcayqnRn.vjT.R1ZZii4DiIuY7jdNdVe+fGjBPODkAPlnCx
MzYLrpmN8mJXtPmtJVgwbJ+6TJRSpWkj6nZsFGiGROCcpJplMSWF8jWeDSxS
36xTngN8BHQgQ2ikQbJCRQ2BDHEFqdesZHienz4FMIS04TTUS65xKo+UxCik
ZRbSolwsP5qvFRzGAK8FdDL8vfUL9quKuVaJ6WBntl8saG+ICYJ.mjWAsSv3
5qDc1XBuXLOwJJn7KVCYE6ZjK3CRXhiLaqhv1HI08JAX+oIajTjWwzq9cSnI
he0ThEZJ1u6lxrASI9ESgyPMQrMpyiqc1D1otCoO0jMRB6WIkZilx7ZBSB1V
M4ONYUl.7ra2jegj5ZS++Et34WLGxqRxlBcumsRxWdYwe7cYWSE
-----------end_max5_patcher-----------
```

On Jun 11, 2008, at 12:06 PM, Don K wrote:

> Could someone look at this and let me know how to simplify it?

I’m not sure this is very much simpler, but…

**all**of the following text. Then, in Max, select

*New From Clipboard*.

```
----------begin_max5_patcher----------
759.3oc4XtsaaBCFG+ZxSgEWmV4SbZWrGicyT0DAbS7DXhBNZYqpu6KXfDBk
BtlTBQ8FrhM74+7yemBurvxdU1AVtM3afeBrrdYgkkZphIrp9skcZ3gnjvb0
sYmxxyCWyrWVtljcPplGgqmRrOkKRXR08iqlb6NVNSHCk7Lwu1whjk6IBRQO
BWBHP2hAX0EvSmsU1dYswPUyxiUaY1pe+fCrda2FJi1vEquv599JqioECXk4
QNMreowk+cKq7IrsOszyYBoHLUsf8OX6hCEg1MVKm+O0ZAOBKl70EKJtrbjX
DZFEQApWPeGCoHpWJ551jhn4OEQXOS3XPfxcA6RMDi3dwHE1DityeL5RMhhd
pWMLkXHEI8RQzWhP5.h2nxKRc6AhAA36r.5Gn9ifhFmWj50GE8tHd14NHdlL
FHZZVwyGccAQZvWnvYiyIRC5igXuYZ3rf8mip+MHLmk.f.TmfDMDHKKtfPZ.
RxaAIwoOPdgwcbqw46CxUgh01KOO9wAKBeMIazliBgMBvh7oFBV2gAakw0Ar
EvjKj0C2XrJAb.2HphJKKPzoLNtCp1aAnKLdY2k8S0aAQ2mthsaDriPnFxN+
gYGEprqiu1rSEoeicG+NvzJ4kggtPypBQBzHFuz3TrdD8FSx7nvjtSW5pmyo
w8mCG14j3ofHBqQ9xmSxBuiBpQZU+tifZJRiDh5W+9CGTe7MkmtOsXI36vyk
m.V8chvd29+UdIa7MsAT7vbuz1DUC8EePpqY+msbTUOucBWz9iWpTWw7WB17
r86hp2859.AnSxHlkK4BEyZbSEebQv4WiM73Xln4QeJOda1QenJQ.dpyi4qq
lPyPMgmgZhLoZp010slJR52P3e5ZBqqlvSmlP5pIxzoIntZhNs93CpI2oOta
PM4MC0j+LTSASplZscyh7SsNVlE4mZ49NKxO0JLeVjehpUskosWEpN0VHSb9
IcN6Zkv3SWS5jKfLw0V7znmNRvzqIsh6lPebc5UgLl5cG+wqK9eznE8s
-----------end_max5_patcher-----------
```

Chris Muir

cbm@well.com

On Jun 11, 2008, at 12:06 PM, Don K wrote:

> Could someone look at this and let me know how to simplify it?

I don’t know what I was thinking with that last solution. Split is

your friend here.

**all**of the following text. Then, in Max, select

*New From Clipboard*.

```
----------begin_max5_patcher----------
497.3ocyUF0ajBBDG+Y8SAgmsa.EQ4d69Rbuzzzvpba4hhaDL211zu6Gf51s
24tkXysYeAhyL.+meLC9ZbDba2AgFB9F3dPTzqwQQdSNCQSeGAa4GpZ3ZeXP
k32ca+ELYzkQbv3Mq22HM.DflM6RMzJUMBieYYuaravLaMcxpr1uG188tb17
52yMUOIU6drWTYFUXNMeCJAPxHtILF6lRsifGlVz3ladduXbEPox.SFmNFzO
6TFEu0GB7Gh9ZthCOwmV9h2GNcCxY8s3X2PRnDZncqneQLfmysdgVnLbirSc
R9QX97KGU3lPSCG08mCOxEfGcDWDFZ7L7HjE.61xU6NC79duj2rH5vqCcmo3
ph2H.Th8FovVigSWDtzKC2BzXwSAK.3hW.t4WBt49qLRteyYEgA2a.nhbX8N
RI.sFlNUvtdlRCnaejokraJlt5d74rBwVYOdQ.Hy8x0+kdbadJaGZcNPmglI
Gw0bj1t1Uf3VgVy2I9m5VJYQrmFD1yJwqrRs7ywdFyi8rzM4VrWbIr+EKS8q
F1HU+8+t8hyY+ifU2MzWMe1y+lEfOJhZg1HUdlcZP1W7.umDOIqqEpSu5ak0
66rUPSh.7vhWyAqoOdbmQSjqqlXgnI50USEgnI10USzav6txPzTwWPS1OdK9
OnIBXRH
-----------end_max5_patcher-----------
```

Chris Muir

cbm@well.com

Quote: Chris Muir wrote on Wed, 11 June 2008 14:06

—————————————————-

>

> On Jun 11, 2008, at 12:06 PM, Don K wrote:

>

> > Could someone look at this and let me know how to simplify it?

>

>

> I don’t know what I was thinking with that last solution. Split is

> your friend here.

Perfect! That’s exactly what I was looking for. Thanks Chris!

Chris has pointed out [split], so I don’t need to go into that part of your question.

The scale object also has a smoothing parameter, but you might want to look at lp.scampf and lp.scampi, which have far greater flexibility WRT smoothing curves: exponential/log and an assortment of polynomial curves are all there.

In fact, you might find you can skip the split object with the right lp.scampf parameters. Depends on what you want to do. Try [lp.scampi 0 127 -48 12 pow -1]. I’ve attached a picture of what the transfer curve looks like. There are lots more parameters to try.

Scampf and scampi are part of the Litter Starter Pack. URL below.

Hope this helps,

Peter

Thanks Peter. Now, I remember seeing that object in the litter tools, now I know why I need it. :)

However, I couldn’t get it to do exactly what I wanted without using a split object. The interpolation is exactly what I was looking for, easing into the values, like a logarithmic feeling pitch bender. I need the center to be at 64, so I split into two lp.scampi objects.

**all**of the following text. Then, in Max, select

*New From Clipboard*.

```
----------begin_max5_patcher----------
504.3ocyU1raiCBEEds8SAh0IHCF+2radIlMUUiv1zT5XCVFrZ5T028Zv1JI
sDkz1zntwXe78hN2Ot.OGF.KUa4ZH3Wfa.AAOGFD3jrBAyeG.aYaqZXZWXP4
PaIuGtZ5WhZmnp7g0jnEwwPDxFtwk.dmnZvrnRlU6Xlp6ExM+smWYlrQbDFE
sBPJRsCIQ1m3BTD314btSIMZw+4tY2F6j7zradpiOMOPgz.WAfkL4F3AIKYs
tXf+tWvZf1e7RXn8wpyEB7GGK4k50v257NT20HLfHPZrG9jT3kOweT9PHDGR
RicC4TGsvGCPjSBH6fe97GdeMSx9TD5XsIIYWl1jELfoeGsIiNSzNzZCYIww
xaQBSxtnsSsbslsg+t9oTpO.l6EfDu.DeR.V33WLAkLxurOA+tR6sZ5P5JVa
m.zx5.oTjcU.DYGPfN0i.BxCrvIdgU5G9Po7L21LJ0wojbW61wvUABmFgKxO
FxtqQwbMc6XWIq5ea5UCx58W1thDcjjoTvZZNx9pEnq8ST5kgnyseDZxDQo+
DHpKYXiP916DcEfU+PLqUC8UKdXgNfckPMWaDRlQnj6Ej8lx8B5dQcMWdvQM
h5N034Ryl.bq2E8y0S1KdNomdiw+t8jce4ORNgOEmRttdJ+L3j8J0qomxNGO
U7E7z3GuD9ZygBWd
-----------end_max5_patcher-----------
```

Is there an even slicker way to do this with just one of the LP objects and no split?

I can get you the three mappings 0 -> -48, 64->0, 127->12 with [lp.scampi map 0 127 -48 12 pow -3], but that’s not the curve shape you want.

I can get you the curve shape you want with the message [sym 1], but then 64 maps to the midpoint between outMin and outMax, which is not what you want.

So for your specific goal, you will have to use a split object and 2 scampis.

I’m glad that you find the curve options useful.

Best — Peter

Quote: Peter Castine wrote on Thu, 12 June 2008 14:30

—————————————————-

> I can get you the three mappings 0 -> -48, 64->0, 127->12 with [lp.scampi map 0 127 -48 12 pow -3], but that’s not the curve shape you want.

> I can get you the curve shape you want with the message [sym 1], but then 64 maps to the midpoint between outMin and outMax, which is not what you want.

I got really excited that this seemed possible in one node until I noticed my center value was no longer outputting to 0. Maybe in the next litter power tools there could be comething like lp.scampi/lpscampf that has some sort of forced center point? Ideally some sort of skewed distribution remapping object similar to scampi, but I can live with a split with two remapping nodes. In 3D we use hermite curves in expressions all the time to do smooth interpolations between points, is there a way to do this in Max? This would be exactly what I’m looking for, to make 3 (or more) points where the min, max and points interpolate smoothly. I did lousy in calc, so I hope I’m making some sense here.

> So for your specific goal, you will have to use a split object and 2 scampis.

Works good enough for me. Thanks Peter.

I’m working on something like what you’re looking for on a non-LP, non-Max/MSP project. I am not sure how and when (and if) the techniques I use will be added to the scamp cousins, but I will keep your request in mind.

Best — Peter

Thanks Peter. I’ll be looking forward to anything that you develop, I love the random numbers/distributions!