Re: [PD] Smooth looping
Hi, On Sat, Apr 24, 2010 at 12:12:08PM -0400, Matt Barber wrote: I don't do very much looping, but if intuition serves I think you need to find loop points that share both the same value and the same first derivative (if your source is more or less periodic you can think of this as looping several sine waves and then mixing the results, and though I haven't thought it through it seems like the value and derivative would match best in places where the phase is similar for each constituent at the loop points). When I've tried to do looping, I've found it a little easier to find peaks with similar values, because I know that the derivative is the same at those peaks, while it's much harder to estimate the rate of change on zero-crossings. Anyway, for the sample you posted the best loop-point I could find was 2931-6153. What irritates me is this knocking sound when the phasor loops back to the beginning, which happens even with your settings, although they set the loop to happen at places where the sample data is almost the same over the 256 samples that lie 128 samples before and after the loop start and end points as the overlaid arrays indicate. I'd assume that the derivatives are sufficiently similar there, and tdditionally he knocking doesn't sound like a click coming from a discontinuity. OTOH the same sound is heard when using for example the [susloop~] external, so maybe it's indeed in the sample data. Ciao -- Frank ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Smooth looping
Hii Ypatios and Matt, On Fri, Apr 23, 2010 at 10:49:19PM +0200, ypatios wrote: As I understand and as Matt already wrote, you wanted a transposition of the phasor~'s frequency (which would change the frequency of the loop but not the sample content), but instead you did the classic up/downsampling-of-the-soundsample transposition. ... I tried to fix the transposition and I also added an offset in the audio path before tabread4~ that corresponds to the beginning of the loop. And I'm sure you've already figured everything out, long before you got our emails. Yes, indeed, what a silly mistake: I was doing timbre stretching instead of transposition here. Thanks a lot for pointing me at this. I guess, the path to a higher state of consiousness sometimes requires to engage in public self-humiliation ... :) Ciao -- Frank ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Smooth looping
On Sat, 2010-04-24 at 10:19 +0200, Frank Barknecht wrote: I guess, the path to a higher state of consiousness sometimes requires to engage in public self-humiliation ... :) The fact, that old Pd rabbits like you also have questions not only answers, is comforting. (even if they turn out to be not real questions ;-) Roman ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Smooth looping
On Sat, Apr 24, 2010 at 11:32:52AM +0200, Roman Haefeli wrote: The fact, that old Pd rabbits like you also have questions not only answers, is comforting. (even if they turn out to be not real questions ;-) The more you learn, the more questions turn up. :) Anyway back to the looping: With the fix, I can smoothly loop sine-waves now, but it still is pretty hard to get good looppoints for samples. Here's an example soundfile: http://footils.org/snd/23.wav With loopstart for example at sample 2912 and loopend at 5402, this looks pretty even in the array overlay, but if you listen to it, you can still hear a nasty rumble. I wonder, how to get rid of this ... Ciao -- Frank BarknechtDo You RjDj.me? _ __footils.org__ ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Smooth looping
Hi :-) Here's an example soundfile: http://footils.org/snd/23.wav With loopstart for example at sample 2912 and loopend at 5402, this looks pretty even in the array overlay, but if you listen to it, you can still hear a nasty rumble. I wonder, how to get rid of this ... I thing this is due to the loop's frequency? With transposition 0 you get about 17-18 Hz. As you transpose lower it should sound smoother but at higher rates the loop frequency is heard as a pitched sound. The problem is that a crossfade wouldn't really help here and I don't know any other solution (maybe filtering, but.). alabala -- ypatios ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Smooth looping
Anyway back to the looping: With the fix, I can smoothly loop sine-waves now, Oh, and as for the sinewaves, if you set the loop start and end points at exactly the beginning and ending of one period, then the loop frequency is the same as the frequency of the actual content of the soundsample, thus making the sound smooth, but also louder? (haven't tested this..) alabala -- ypatios ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Smooth looping
On Sat, Apr 24, 2010 at 11:32:52AM +0200, Roman Haefeli wrote: The fact, that old Pd rabbits like you also have questions not only answers, is comforting. (even if they turn out to be not real questions ;-) The more you learn, the more questions turn up. :) Anyway back to the looping: With the fix, I can smoothly loop sine-waves now, but it still is pretty hard to get good looppoints for samples. Here's an example soundfile: http://footils.org/snd/23.wav With loopstart for example at sample 2912 and loopend at 5402, this looks pretty even in the array overlay, but if you listen to it, you can still hear a nasty rumble. I wonder, how to get rid of this ... I don't do very much looping, but if intuition serves I think you need to find loop points that share both the same value and the same first derivative (if your source is more or less periodic you can think of this as looping several sine waves and then mixing the results, and though I haven't thought it through it seems like the value and derivative would match best in places where the phase is similar for each constituent at the loop points). When I've tried to do looping, I've found it a little easier to find peaks with similar values, because I know that the derivative is the same at those peaks, while it's much harder to estimate the rate of change on zero-crossings. Anyway, for the sample you posted the best loop-point I could find was 2931-6153. Matt ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Smooth looping
On Sat, 24 Apr 2010, Roman Haefeli wrote: The fact, that old Pd rabbits like you also have questions not only answers, is comforting. (even if they turn out to be not real questions ;-) In what manner is it comforting ? (yes, that's a question, not an answer.) _ _ __ ___ _ _ _ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] Smooth looping
Hi, not related to the thread on smoother audio in Pd, I am struggling with doing a smooth loop player for data stored in tables. One building block for this is attached: It is a simple tabread4~ lookup that should loop over a configurable section of a table and play it back with various frequencies. As you'll easily see, I use a [phasor~] | [*~ loopsize] | [+~ loopstart] | [tabread4~ table] idiom here. Now I would like to avoid enveloping the rewind sections, so I built an elaborate mechanism to set the loop points as good as possible by hand. Test sections let you load a sample or try to find the smooth loop points inside of a sine-wave table graphically. Now my problem is, that even when I have found a nice and smooth sounding loop section, as soon as I start to change the frequency played (with the pd transpose things), the sound gets very distorted. I'm puzzled: Shouldn't the tabread4~ interpolate correctly in this case? Any help or explanation is appreciated. (Except anything involving crossfades: I know I could do that and I guess I also know how.) Ciao -- Frank BarknechtDo You RjDj.me? _ __footils.org__ looppoints.pd Description: application/puredata ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Smooth looping
Hi, not related to the thread on smoother audio in Pd, I am struggling with doing a smooth loop player for data stored in tables. One building block for this is attached: It is a simple tabread4~ lookup that should loop over a configurable section of a table and play it back with various frequencies. As you'll easily see, I use a [phasor~] | [*~ loopsize] | [+~ loopstart] | [tabread4~ table] idiom here. Now I would like to avoid enveloping the rewind sections, so I built an elaborate mechanism to set the loop points as good as possible by hand. Test sections let you load a sample or try to find the smooth loop points inside of a sine-wave table graphically. Now my problem is, that even when I have found a nice and smooth sounding loop section, as soon as I start to change the frequency played (with the pd transpose things), the sound gets very distorted. I'm puzzled: Shouldn't the tabread4~ interpolate correctly in this case? Any help or explanation is appreciated. (Except anything involving crossfades: I know I could do that and I guess I also know how.) Shouldn't you be multiplying the output of [pd transpose]-[lop~] with output of [r $0-loopfr]-[vline~] to change the frequency of the phasor, as opposed to multiplying the transpose stuff with the output of the phasor itself? In the latter case aren't you just expanding the output of the phasor to a different point in the file that is no longer necessarily loopable? Matt ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Smooth looping
As I understand and as Matt already wrote, you wanted a transposition of the phasor~'s frequency (which would change the frequency of the loop but not the sample content), but instead you did the classic up/downsampling-of-the-soundsample transposition. (The distortion you get is due to the difference in spectral content, which should be richer as you transpose upwards since you read a longer portion of the sample. Also, the end of the loop changes which could mean a harder discontinuity.) I tried to fix the transposition and I also added an offset in the audio path before tabread4~ that corresponds to the beginning of the loop. And I'm sure you've already figured everything out, long before you got our emails. alabala On 23 April 2010 20:27, Frank Barknecht f...@footils.org wrote: Hi, not related to the thread on smoother audio in Pd, I am struggling with doing a smooth loop player for data stored in tables. One building block for this is attached: It is a simple tabread4~ lookup that should loop over a configurable section of a table and play it back with various frequencies. As you'll easily see, I use a [phasor~] | [*~ loopsize] | [+~ loopstart] | [tabread4~ table] idiom here. Now I would like to avoid enveloping the rewind sections, so I built an elaborate mechanism to set the loop points as good as possible by hand. Test sections let you load a sample or try to find the smooth loop points inside of a sine-wave table graphically. Now my problem is, that even when I have found a nice and smooth sounding loop section, as soon as I start to change the frequency played (with the pd transpose things), the sound gets very distorted. I'm puzzled: Shouldn't the tabread4~ interpolate correctly in this case? Any help or explanation is appreciated. (Except anything involving crossfades: I know I could do that and I guess I also know how.) Ciao -- Frank BarknechtDo You RjDj.me? _ __footils.org__ ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list -- ypatios looppoints2.pd Description: Binary data ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list