Forums > MaxMSP

sustaining audio input

April 20, 2012 | 2:43 pm

Hi,
I’m trying to make a patch which sustains (and adds) incoming audio (i.e. simulating the sustain pedal of the piano). It seems to be about automatically selecting and looping the appropriate portions of the audio.
Could anyone recommend a way?


April 20, 2012 | 4:16 pm

Hi
numerous solutions to this one, dependent on whether you want quick plug-n-play action:

https://www.youtube.com/watch?v=1Db1-WeKoyg

or more complex DIY tools:

http://cycling74.com/forums/topic.php?id=38438

http://www.jeanfrancoischarles.com/2008/10/freeze-sound-with-maxmspjitter.html

My personal preference is for granular playback, and I can send you an example patch if you wish; but it won’t do that "immediate freeze" – it’ll do it retrospectively though.

Brendan


April 21, 2012 | 8:05 am

Thanks a lot for your help, Brendan. Could you please send me that example patch?

I’m just going through the links, the first one doesn’t seem to do that, will try the "melody-to-harmony" patch from J-F Charles now.
I’m not looking for freezing a single spectrum, what I’m rather trying to get is: a monophonic instrument player will be arpeggiating some chords, and whenever ‘the patch’ is active, the notes will be adding up sounding together, just as if we pressed the sustain pedal.


April 21, 2012 | 12:24 pm

Hi
here’s the example patch, in two parts. Save this first one as "grainLiveSub" without the quotes, then close it:

– Pasted Max Patch, click to expand. –

Then save the main patch below, in the same place as the first and call it whatever you wish:

– Pasted Max Patch, click to expand. –

Close the subpatch and reopen the main one, in order to ensure everything is initialized.

For your needs, I think fft-freeze or reverb freeze is the way to go; give the Baz tutorials another chance and explore the examples mentioned in the above thread.

Best
Brendan


April 21, 2012 | 1:22 pm

Thanks again.
Trying your patch. (Somehow not getting any audio, though… connected the outlet of poly to output gain, still just the visual of signal but no sound)


April 21, 2012 | 1:45 pm

I tested the posted version:

Close the subpatch
Save close and reopen main patch
Turn dac’s on and set input level
Click the (set liveFile) message
Activate the record toggle, make some noise and you’ll see the buffer fill up
Change the pitch/location/amp values for the voice(s).

Done

I’ll put up a quick video after my wife and I have some soup and fresh bread for lunch, here in County Down

Brendan



April 22, 2012 | 8:48 pm

Delicious patch thanks!

@Emerson, the main patch is just missing
a signal chord from output of poly~ which
needs to pop into the gain~ slider, without
which you’ll hear nothing.

Seán (here in County Dublin)


April 23, 2012 | 8:38 am

@Sean: Yes, I noticed that, had mentioned in my previous post.
("…connected the outlet of poly to output gain")

Thank you.

Problem was due to some silly speakers…


August 5, 2012 | 8:05 pm

Hi,
As a suggestion to simulating ‘sustain pedaled audio’ I’m posting the attached patch. I didn’t use the fft freezing approaches, however.

The condition for my patch to work is to give slight pauses between the sounds to be added (this time, chosen as > 25 ms.)

What do you think?

Attachments:
  1. sust4.zip

August 6, 2012 | 6:51 am

So, any opinions on comparing its results to those of the fft freezers?

Also, could someone tell whether poly~ is applicable with this kind of patch?


August 6, 2012 | 11:01 am

Hi
Can I first suggest that you add some illustrative comments; the lack of user input/control makes this less than immediately intuitive. But sound-wise it’s great!

Qualitatively at least, fft-feezers (a la J F Charles) seem to give more "bang-for-your-buck"; in trying to duplicate the effect in the time domain I have found my CPU demands increasing.
Brendan


August 8, 2012 | 5:21 pm

Thanks for the comment, Brendan -and sorry for the delay.

It’s true that I have a bad habit of not commenting my code; what’s more, I’m inclined here to totally avoid it rather than decide its dosage from being nothing to insulting to many experienced forum members like you, especially when I’m claiming to demonstrate a simpler thing -at least on the "signal" side.

I forgot to add that input sounds also should last at least 0.5 seconds to be accepted. My final purpose is to ‘sustain-pedal’ a woodwind instrument, so I tailored the default values accordingly. (the instrument can be blown much shorter of course but I’ll tell the player not to!) Shortening the required duration will eventually conflict with the need to avoid the inclusion of the attack portion in the loop.

For sounds with a prominent specialty of change in every aspect over time, choosing what to loop (or its equivalent frequency domain operations) would naturally be hard to imagine; in this respect, the problem of sustaining audio input seems to be limited to having "particular solutions" for expected types of input only.

Uzay Bora


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