real time adjustable amplitude windowing

Mar 5, 2009 at 7:42pm

real time adjustable amplitude windowing

Hi. I would like to create an amplitude window with it’s type and size being adjustable in real time. kind of like an audio gate effect or the sequencer gate length. I would like to use it as an effect but also to remove pops between randomly and rapidly read audio files. I was looking into the wave~ / buffer~ method, but i am not sure how to implement the real time control aspect. Are these objects the best way to approach this or is there a better way? I’m just looking for a nudge in the right direction so any help is greatly appreciated!

Thanks for your time and attention.

wppk

#42687
Mar 6, 2009 at 12:34am

“real-time adjustable” implies you want to be able to switch the window in the middle of another window(ex. you have a gaussian window and half-way through a grain with a gaussian window you want the grain to switch to having a square or other type of window?)… but i’m not sure why you’d want that since that would introduce clicks and pops at certain points where the switch between envelope-shapes causes waveform discontinuity… in any case, if you want something like that, you could look at this thread which talks about generating the window without writing it to a buffer~ and if you did that you might be able to work in some smoothing functions for the switches in shape:
http://www.cycling74.com/forums/index.php?t=msg&goto=163225

otherwise, if you are looking to generate different windows for each grain/segment of audio(scaled according to length, and only choosing a different window-shape at the start of each grain/segment) then i’d recommend the old-fashioned way of writing an amp-window into a buffer~ and then reading that buffer~ back at different rates in order to scale the window according to playback-length(plus, just fill the buffer~ with a different waveform or have several buffers with different amp-window shapes and have different poly~ grains address the different buffer~s containing amp-windows to get as many window-function choices as you need).

here’s a patch(attached) that shows two windowing techniques in case it helps(one is similar to your mention of a wave~/buffer~ technique), you could easily modify it to include different amp-window-shapes. (also, check out the adsr~ object, when used in conjunction with poly~ it’s very effective; and if you like adsr~, check out Eric Lyon’s el.adsr~ object for impulse-triggering of envelopes).

#152818
Mar 6, 2009 at 8:18am

This method does a non linear scaling on the domain and range. Because of two pow~s it might be to heavy to use multiple instances. With poke~ it is possible to refresh the buffer in realtime.

_
johan

– Pasted Max Patch, click to expand. –
#152819
Mar 6, 2009 at 7:00pm

Thank you so much for your replies. By real time adjustable I just meant that I want to adjust the window size in real time not necessarily the actual window.

I’m not home right now so I’ll have to check out your examples when I get there.

Thanks for taking the time to post them.

#152820
Mar 6, 2009 at 7:10pm

Johan, when you say that it may be too heavy for multiple instances
because of the pow~s do you mean that those objects are cpu intensive?

#152821

You must be logged in to reply to this topic.