I just came across this old post when doing a search for "normalize" and found it to be pretty fun to mess with (in addition to it being a great tool for editing audio files.)
I was looping sounds and then taking the out-point and sliding it back and forth. However, I did notice that if the in-point and the out-point get too close to each other (with the loop switched on) then Pd freezes up on me and I need to quit and re-open. This kinda makes sense to me because the loop probably gets too short and there may be some sort of overflow.
So I figured out how to make it so that when one point gets too close to the other (like within 0.01) it makes the other point jump back to either the beginning or the end depending on which one you are manipulating. I did this using [<] and [>] and then sending a bang.
This solved the problem of it freezing up for the most part, but I haven't been able to figure something else out... hence, my question (and I should post the modified patch here to show you but I am at work, so maybe I can post it tonight when I get home.)
Anyway, let's say I open a 3-second soundfile and start it looping. I move the slider over to change the out-point to be 1.5 seconds. Then I start dragging my in-point over to the right. How do I set it up so that when it gets to be within 0.5 seconds away from the out-point then the outpoint will slide over to the right as I continue to slide the in-point and maintain that 0.5 second window. So basically, I want to take the value from the top slider and as soon as it gets to a 0.5 second difference from the bottom slider, then the bottom slider will start moving to the right as well. If I slide the top over to 2 seconds, then the bottom slider will move over to 2.5 seconds, maintaining the 0.5 second loop window.
I don't know if that explanation will be easy to understand, but that's what I am trying to figure out. I guess it would be a matter of taking the value of the top slider and then just adding 0.5 to it and sending that to the bottom slider, but I only want it to do that once the top gets within that 0.5 difference. Oh yeah, and I also want it to go both ways, meaning if I drag the out-point over to the left it will move the in-point to maintain the same 0.5 second window.
Let's see, any other complications to throw into the mix? I think that's all. Any ideas on how to make this work?