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.
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.
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.