converting shapes between multisliders with different resolutions…possible?

Oct 20, 2013 at 11:42am

converting shapes between multisliders with different resolutions…possible?

Hello,

my question: is it possible to convert a shape drawn with a multislider to another multislider with a different resolution (=different amount of sliders)?

explanation:

I’m using multisliders with very high resolutions to draw waves, and morph between waves. Multislider is a great tool as all settings can be stored using preset~ but I can’t morph if the resolution is different. My waves are too difficult to draw myself, they are derived automatically from a recording using a max patch, which is why I did end up with different resolutions..

All help is more than welcome!

#268526
Oct 20, 2013 at 7:11pm

if you have a list, “1 3 7″, and you want to copy that to a list of 5 digits, you have to interpolate between the members according to their difference in length.

for example, from 3 to 5 it is easy, you´ll end up with linear interpolation, a simple averaging between member is enough to build the new list: “1 3 7″ -> “1 2 3 5 7″

i would recommend to not start using multislider but a messagebox with the list in it, then use the [zl] objects to work on the list.

#268563
Oct 21, 2013 at 1:03am

I would convert the list to a jitter matrix and easily change the dimensions of the matrix with interpolation on.

#268572
Oct 21, 2013 at 1:08am

thanks a lot guys for these solutions, I will check them out today!

#268573
Oct 21, 2013 at 4:50am

Ok, so I first tried to solve my problem using a jitter matrix. I have discovered that when I send a multislider with resolution 256 to a jit.matrix with a higher resolution (400 for example), the first 256 values of the jit.matrix get the entire shape of the multislider (or so shows the jit.pwindow), and the extra values, (144 in this case) are not affected. So I did send my multislider to a jit.matrix of the same resolution.

However, I found myself able to interpolate the connected jit.pwindow so the resolution IN THIS WINDOW (= the vizualisation) was higher. My only problem is that I don’t see how I should output the new (interpolated) values…(do they even exist?) ..it doesn’t seem to be possible. It doesn’t seem to matter if you connect the jit.pwindow (with interpolation) or the jit.matrix itself to a jit.spill => prepend set => list-message, the output values are just the same (same amount = same resolution) as those coming directly from the multislider.

Pedro, is it possible to send me a small patch of how you see this working? Would be greatly appreciated!! :)

(I used jitter tutorial 11, which includes all objects, an easy way to start)

#268588
Oct 21, 2013 at 7:34am

Hi. You should receive the list in a matrix with the same length as the list.
Then you upscale it to another matrix with interpolation on. You’ll find it pretty easy once you see the patch. Good luck.

– Pasted Max Patch, click to expand. –
#268612
Oct 21, 2013 at 11:52am

…this is unbelievable, so simple, yet perfect.. I can’t thank you enough Pedro, this really makes my day! Thank you for your help!

#268660
Oct 21, 2013 at 3:09pm

ok, I spent some time with the patch…1 question! the maximum resolution of the resulting list seems to be 256 values. Is it possible to have more values? I was hoping to work with a resolution of at least 1024..

EDIT: I didn’t see that the maximum can be changed in the jit.spill object, thanks again!

#268675
Oct 25, 2013 at 1:14pm

Pedro, one very last, however (probably) insanely difficult question :) but..
..is it possible to interpolate the beginning of the jitter pwindow with the end? just like a loop..

in other words: if the beginning is black and the end is white in the jit.pwindow, is it possible to make the beginning and end both in the same grey after interpolation?

(really enjoying the patch you made for me)

#269120
Oct 25, 2013 at 4:59pm

Yes, the easiest way would be to just end the list with an extra value, similar to the first one. Of course it depends on the “size” of this interpolation…

Good luck!

<code>

– Pasted Max Patch, click to expand. –

</code>

#269161
Oct 26, 2013 at 5:53pm

thanks! :)

#269229
Oct 26, 2013 at 6:56pm

Hi,

perhaps I’m arriving a bit late to this thread to suggest a new solution, but you could also give a try to [sadam.interpol] from The sadam Library (see http://www.sadam.hu/software ). By ‘feeding’ the object with the initial multislider values, you could easily obtain the interpolated values for the new multislider. Moreover, you can choose from a set of different interpolation methods (currently: piecewise linear, Bézier, polinomial or spline), which, depending on your needs, can make the final dataset quite smooth.

Cheers,
Ádám

#269232
Oct 28, 2013 at 8:41am

Hi, Adam. I didn’t know about [sadam.interpol] when I suggested the Jitter/matrix solution. It’s a very useful object! Thanks.

#269349
Oct 28, 2013 at 4:20pm

Thanks for the ideas Ádám and Pedro! More recently I have been struggling with a new problem, which can be found here: http://cycling74.com/forums/topic/huge-problem-when-interpolating-between-waveshapes-multisliders/#post-269365

Ádám, thank you for your ideas, I still have to do some research before I can send you a decent reply. Max is still very new to me.

But,..I was wondering..I used the jitter matrix before to make a multislider-resolution conversion (see above), wouldn’t it be possible to save all my waveforms (=notes: C, C#, D,…) as 3D drawings (jitter-matrix-presets) instead of 2D multislider-presets.

If I could morph from drawing to drawing (from note to note), using a 3d-matrix, the morphing of the waveform could go in both vertical and horizontal directions. If I would manage to get the changing drawings inside of a buffer, like I managed to do with the multislider, the wave-object could play them back.

Am I missing something, or is this possible?

#269431

You must be logged in to reply to this topic.