Forums > MaxMSP

split range scale?

June 11, 2008 | 7:06 pm

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?

– Pasted Max Patch, click to expand. –

June 11, 2008 | 8:50 pm

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…

– Pasted Max Patch, click to expand. –

Chris Muir
cbm@well.com

http://www.xfade.com


June 11, 2008 | 9:06 pm

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.

– Pasted Max Patch, click to expand. –

Chris Muir
cbm@well.com

http://www.xfade.com


June 11, 2008 | 9:08 pm

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!


June 12, 2008 | 9:54 am

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


June 12, 2008 | 8:55 pm

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.

– Pasted Max Patch, click to expand. –

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


June 12, 2008 | 9:30 pm

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


June 12, 2008 | 10:02 pm

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.


June 13, 2008 | 9:41 am

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


June 14, 2008 | 1:02 am

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


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