Interpolate / Morph between Waveforms
Hi,
I'm looking to build a simple patch that will consist of a dial that will morph / interpolate between 16 no. 4096 samples waveforms.
This video seems to morph how i would imagine it but unfortunately the patch isnt shared.
https://www.youtube.com/watch?v=mLJNovdGsd0
can anyone give some pointers on where to start?
thanks :)
what happens there is just drawing the waveform with multislider and overwriting the buffer with new samples.
Have a look at this example :
That's enough to get you on the right path
thanks source audio - having a mess around now. am i right in thinking i could incorporate this with .wav files?
thanks,
P
You mean to load wave files 4096 samples long
into buffers and to morph between them ?
I thought you want to draw waveforms like what was seen on that video.
To get the sound as it is there, one slides sample values from
1 waveform to another.
means if audio 1 has at position 0 sample value of -0.2
and sound 2 has at same position value of 0.6 than
sample 0 will slide from -0.2 to 0.6 using ramp time.
But how one hears it, depends on playback.
But maybe you want something totaly else ?
Like just crossfading between wave files ?
Yeah I mean to crossfade between sounds - I would like to have 16 x waveforms and a dial to morph between the waveforms. I did some reading up on this and i heard interpolation come up a lot and some people doing crossfader work arounds.
when i saw that video i thought this may be what i was wanting but perhaps its not?
i really like the patch you done and its taught me about expr obj and gave me some ideas as well - so much appreciated :)
thanks max! this looks like a really good starting point
read the full article and delved into the patch and its not making any sense to me, I think I need to break this down really simply. Nothing fancy 2 waveforms interpolating / morphing using a slider - I read that interpolation is (y1 - y2) / (x1 - x2). I cant see this in the patch in the link?
If that is all you want,
then just crossfade 2 out of 16 waveforms.
Pick 2 buffers, let them play in sync, and move the slider.
yeah im looking into that now but struggling to find any examples. I can see the MSP tut 22 but cant find anywhere to download the patch in the msp tutorials? https://docs.cycling74.com/max6/dynamic/c74_docs.html#mspchapter22
I'm not even sure if the above is what i need to be looking at?
I would like to crossfade from a cycle obj to a noise but I'm really struggling at present youtube isn't really giving a lot of hope either. Is there a website resource or any books i can get that you could recommend, it seems the learning curve for max is way steeper than I imagined.
I've made some basic synths with envelopes and some straight forward sequencers but im wanting to do more with it such as crossfading/interpolating sounds, evenlopes etc. in lookup tables.
Any help would be much appreciated as there seems to be a big gap in learning resources from basic to intermediate.
Have you considered typing the words "crossfade" and "buffer" into the Forum search up top? You might find something of interest.
Hi max,
thanks I did the search with buffer and it came up with this resource:
see attached my patch -
doesnt seem to be working for me?
I can find an example in PD on youtube that looks to be a simple way to work it but it uses a function called Swap. I'm going to try and translate that patch to max and see if it works. I really thought something like this would be simple to do, how wrong I was haha.
I tried the puredata patch i found and i can see the swap working but its not cross fading the sound either. any help much appreciated :)
I've also tried this after finding another thread but it's also not working - where am i going wrong here?
Ok i finally managed it !
Okay - so now i have the patch working i need to understand it a little better - i started tweaking with the values in pack (0. 20).
I noticed when i increased the value (0. 500) and used number~ obj to read the line output there was a delay in slider reaching its final value when moved.
To break down i can see that the midi number is outputted from the slider and divided by 127 into a float number
this then goes into the pack object which i believe is a list.
The list then goes into the line~ object onto a multiplier then summed into DAC with an addition.
I noticed when i deleted the second value in pack (20) and the slider is set to 0 the DAC throws out both the cycle and noise source, yet when it is at 127 it is noise source fully. I'm confused as to how the second value in pack works as all i can tell is that the pack list is basically telling the line objects to move 0. to 'value' in a set amount of milliseconds?
if someone could explain it would be a great help - its one thing getting something to work but i really like to know why it works.
You have to open help file for objects that you use.
There you will find most needed infos about them
and there would be no need to ask here in the forum why line
needs at least 2 arguments to make a ramp.
It is not possible that fader at position 0 would
make both sound sources get out.
You simply made some mistake while patching.
number~ adds it's own ramp time, and using both
line~~ and number~ makes no sense.
If you use number~ to monitor line~ output
than set it's update interval to lowest value - 20 ms.
Better would be to use meter~ set at 10 ms
you can monitor the actual output with it anyway.
+~ at the end is not needed, signals will mix without it.
-------------
here one example with matrix~ as better alternative:
----------------
Back to the original idea of using 16 buffers,
selecting and mixing 2 of them like this, how do you see that happen ?