Forums > MaxMSP

reverse waveshaping ?


FP
January 22, 2014 | 10:17 am

Hello, I can’t find out how to find the function (waveshape ?) to transform a sine to another given shape like in the picture enclosed.

How to ?
Thx.

Attachments:
  1. Capture-d’écran-2014-01-22-à-19.51.16
  2. Capture-d’écran-2014-01-22-à-19.13.51

January 22, 2014 | 5:38 pm

Your pics didn’t post.



FP
January 23, 2014 | 2:39 am

strange. I can see it here.
here it is once again :

Attachments:
  1. waveshape

January 23, 2014 | 6:12 am

Finding a function to perform a specific mapping is an extremely difficult mathematical problem. There are lots of mappings that are quite easy to do (look up, for instance, Chebychev functions). But there are an infinite number of possible functions (aleph-one infinity, I think), that leaves plenty of mappings that aren’t so easy.

If you’ve got the data that generated your images, you could just poke~ the numbers into a waveform and use that for your mapping. But presumably life isn’t that convenient for what you want to do. You could approximate by drawing into a table object. That won’t be super accurate, but might be, as they say, good enough for jazz.



FP
January 23, 2014 | 8:38 am

Thx a lot.
I did the poke~ option with ramps from -1.to 1. & 1.to-1. then separate into 2 [lookup~], one for ascending and one for descending ramp. It’s not really accurate but ok for now…

I’ll have a look at chebychev asap.

I tried an IR option too without success because it’s not linear I suppose…

Anyway, thx for your answer.


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