crossfading between loop points?

Jan 4, 2007 at 5:56pm

crossfading between loop points?

hello,

I’m pretty sure this subject has been covered but I have the well known ‘clicks’ when my loop changes ‘loop points’.

in more detail, i use a ‘groove’ object which chops an audio loop into 16 smaller pieces. In order to succed that i calculate the total duration of the audio sample and then devide this value by 16. Then the start and end points are changing accordingly to the value ‘totalduration / 16′. However, when the loop points move I get audio clicks (mainly with bass loops,etc. with drumloops sounds ok for obvius reasons).

any ideas/techniques are used in these situations?

thanks,
mike

#29500
Jan 4, 2007 at 6:11pm

#92326
Jan 4, 2007 at 6:22pm

Hi Francisco and thanks for the reply.
I have alredy used xgroove~ from this library but as far as I’m concerned this object allows you to fade in and out only at the beginning and the end of the loop. What I really need is ‘something’ that can also fade between the loop points (when these change).

thanks,
mike

#92327
Jan 4, 2007 at 6:36pm

Im not an MSP~ guy, but I think the solution was to use to groove
objects. There was recently a discussion about this however on the
forum.

On Jan 4, 2007, at 1:22 PM, michael wrote:

>
> Hi Francisco and thanks for the reply.
> I have alredy used xgroove~ from this library but as far as I’m
> concerned this object allows you to fade in and out only at the
> beginning and the end of the loop. What I really need is
> ‘something’ that can also fade between the loop points (when these
> change).
>
> thanks,
> mike

v a d e //

http://www.vade.info
abstrakt.vade.info

#92328
Jan 4, 2007 at 7:08pm

Hello,
I am trying to make a patch that sort of does a similar thing. I want
to be able to change the loop time in real time without getting
clicks (I don’t need cross-fading). I’v tried many different
possibilities but still get glitches when there are sudden changes.
I’v read all the previous posts but there doesn’t seem to be a
solution. could someone please recommend anything?
Thanks
Peiman

On 4 Jan 2007, at 18:36, vade wrote:

> Im not an MSP~ guy, but I think the solution was to use to groove
> objects. There was recently a discussion about this however on the
> forum.
>
> On Jan 4, 2007, at 1:22 PM, michael wrote:
>
>>
>> Hi Francisco and thanks for the reply.
>> I have alredy used xgroove~ from this library but as far as I’m
>> concerned this object allows you to fade in and out only at the
>> beginning and the end of the loop. What I really need is
>> ‘something’ that can also fade between the loop points (when
>> these change).
>>
>> thanks,
>> mike
>
> v a d e //
>
> http://www.vade.info
> abstrakt.vade.info
>
>
>

#92329
Jan 4, 2007 at 7:22pm

I believe the solution was to fade out at the end of the loop in
groove 1 while simultaneously fading in the beginning of the loop in
groove 2. Sorry if this is unhelpful, but it sounds (no pun intended)
like it should work.

On Jan 4, 2007, at 2:08 PM, peiman khosravi wrote:

> Hello,
> I am trying to make a patch that sort of does a similar thing. I
> want to be able to change the loop time in real time without
> getting clicks (I don’t need cross-fading). I’v tried many
> different possibilities but still get glitches when there are
> sudden changes. I’v read all the previous posts but there doesn’t
> seem to be a solution. could someone please recommend anything?
> Thanks
> Peiman

v a d e //

http://www.vade.info
abstrakt.vade.info

#92330
Jan 4, 2007 at 7:36pm

vade , you are right.

This is what I’m tryin to do. I use 2 groove~ and for each one i multiply the output with a cycle~. Also, the second cycle~ (for the 2nd groove~) is phase inverted with the first one. Both have an offset to avoid the minus values.

Unfortunatelly, it doesn’t seem to work well..

thanks,
mike

#92331
Jan 4, 2007 at 8:41pm

you can use the sync output of groove~ for controlling a phase-driven amplitude envelope like trapezoid~

#92332
Jan 4, 2007 at 9:32pm

thank you julien.
This helps a lot! simple and acurate.
However, I’, still getting some ‘clicks’ periodically.Is there anything I can do to improve it even more?

thanks,
mike

#92333
Jan 4, 2007 at 10:04pm

To be more specific, I realised that clicks depend on the duration of the sample. for example, the smaller the total duration is, the more clicks I get (unless I increase the Lo and Hi points of trapezoid~).

Is it possible somehow to calculate the correct values of the Lo/Hi points for each seperate sample?

Thanks,
mike

#92334
Jan 4, 2007 at 10:29pm

Quote: warp wrote on Thu, 04 January 2007 23:04
—————————————————-
> To be more specific, I realised that clicks depend on the duration of the sample. for example, the smaller the total duration is, the more clicks I get (unless I increase the Lo and Hi points of trapezoid~).
>
> Is it possible somehow to calculate the correct values of the Lo/Hi points for each seperate sample?
>
> Thanks,
> mike
>
—————————————————-

Mike, is it possible for you to post a patch that demonstrates what you’ve done so far and illustrates your problem?

Mattijs

#92335
Jan 4, 2007 at 10:33pm

Hi Mattijs,

Thank you for the interest but I’m afraid my patch at the moment it’s too messy and complex. It contains about 10 subpatches..

thanks,
mike

#92336
Jan 4, 2007 at 10:53pm

Thanks for your reply Julien,

I did try that but the problem is that changing the looping points
(with control signals) is not precisely synched with the output of
trapezoid~ which means that I still get the occasional clicks. I have
not managed to figure out how to use audio signals to change the
looping points in synch with trapezoid~ (using sah~ I suppose it
should be somehow possible).

Best
Peiman

On 4 Jan 2007, at 20:41, julienbreval wrote:

>
> you can use the sync output of groove~ for controlling a phase-
> driven amplitude envelope like trapezoid~

#92337
Jan 4, 2007 at 11:00pm

Quote: warp wrote on Thu, 04 January 2007 23:33
—————————————————-
> Hi Mattijs,
>
> Thank you for the interest but I’m afraid my patch at the moment it’s too messy and complex. It contains about 10 subpatches..
>
> thanks,
> mike
—————————————————-

When I post a problem to this forum I isolate it to a minimum that illustrates the problem clearly. This sometimes takes a few hours (the patches I work on are huge) but gives people the possibility to answer very quickly and accurately because they are able to reproduce the problem and see whether I made some obvious mistake.

Sometimes while making the example I encounter the problem myself ;)

I would advise you to take that time.

In the mean time I think the only way to avoid clicks is naturally to use two groove~s (or I mostly use wave~ + phasor~) and fade between them for say 5 ms when the play position encounters a discontinuity.

But when you change a loop point in real time it’s different, theoretically there is no way that you can make your system anticipate an unexpected play cursor change unless you are willing to trade some timing accuracy. Although especially for a bass sound (where clicks are most likely to occur but also exact timing is slightly less important), the latter might be a solution.

Greets,
Mattijs

#92338
Jan 4, 2007 at 11:09pm

Thank you all for the replies.
I’ll try to simplify my patch and post it as soon as I find some free time…

Untill then I think I’ll adjust manually the lo/hi points of the trapezoid~ for every sample :)

thanks,
mike

#92339
Jan 5, 2007 at 1:04am

Quote: warp wrote on Fri, 05 January 2007 00:09
—————————————————-
> Thank you all for the replies.
> I’ll try to simplify my patch and post it as soon as I find some free time…
>
> Untill then I think I’ll adjust manually the lo/hi points of the trapezoid~ for every sample :)
>
> thanks,
> mike
—————————————————-

I somehow felt like trying. The way I would approach a crossfade on loop in general I guess would be like the patch below. Btw this doesn’t deal with clicks when changing looppoints yet.

It’s done quickly after bed-time so it might be a bit messy.. but who knows, maybe it gives you some new ideas.

I also found a nice sample to test with. I attached it.

Greets,
Mattijs

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 88 495 100 9109513 3) enable audio;
#P comment 107 34 100 9109513 1) read sample;
#P button 67 58 15 0;
#P newex 67 75 53 9109513 t 5 10 5 b;
#P newex 150 288 27 9109513 t b f;
#P newex 55 425 27 9109513 !-~ 1;
#P newex 38 470 28 9109513 *~ 1.;
#P newex 67 447 27 9109513 *~;
#P newex 38 447 27 9109513 *~;
#P flonum 221 96 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 605 517 879 782;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 45 93 27 9109513 /~;
#P newex 130 93 27 9109513 /~;
#P newex 15 138 27 9109513 +~ 1;
#P window linecount 0;
#P newex 15 160 54 9109513 selector~ 2;
#P window linecount 1;
#P newex 15 114 27 9109513 >~;
#P newex 147 49 27 9109513 !- 1.;
#P newex 130 114 65 9109513 maximum~ 0.;
#P newex 130 72 27 9109513 -~;
#N comlet (signal) fade amount;
#P outlet 15 182 15 0;
#P newex 45 114 65 9109513 maximum~ 0.;
#P window linecount 0;
#P newex 45 72 27 9109513 -~;
#N comlet (float , perun) fade time;
#P inlet 147 29 15 0;
#N comlet (signal) phase;
#P inlet 62 29 15 0;
#P comment 130 167 100 9109513 can definitly be done more elegant;
#P connect 1 0 9 0;
#P connect 9 0 11 0;
#P connect 11 0 10 0;
#P connect 10 0 5 0;
#P connect 2 0 9 1;
#P connect 4 0 10 1;
#P connect 2 0 3 0;
#P connect 3 0 13 0;
#P connect 13 0 4 0;
#P connect 7 0 10 2;
#P connect 1 0 3 1;
#P connect 2 0 13 1;
#P connect 1 0 6 0;
#P connect 6 0 12 0;
#P connect 12 0 7 0;
#P connect 2 0 8 0;
#P connect 8 0 6 1;
#P connect 2 0 12 1;
#P pop;
#P newobj 55 401 82 9109513 p getFadeAmount;
#P newex 140 353 32 9109513 %~ 1.;
#P comment 167 97 51 9109513 1/ part size;
#P newex 95 198 40 9109513 t b b f;
#P number 130 97 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 140 310 27 9109513 !/ 5.;
#P newex 140 332 27 9109513 +~;
#P newex 140 380 68 9109513 wave~ sample;
#P newex 67 332 27 9109513 f;
#P newex 96 332 27 9109513 f;
#P newex 336 55 97 9109513 loadmess set sample;
#P user waveform~ 336 76 200 74 139 9;
#W mode select;
#W mouseoutput continuous;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P number 67 97 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 67 248 27 9109513 * 0.;
#P newex 104 248 27 9109513 t b f;
#P newex 104 269 27 9109513 + 0.;
#P newex 104 220 27 9109513 / 16.;
#P user ezdac~ 38 494 82 527 0;
#P newex 38 278 40 9109513 !/ 1000.;
#P newex 26 146 105 9109513 info~ sample;
#P newex 38 299 41 9109513 phasor~;
#P newex 38 380 68 9109513 wave~ sample;
#P message 67 34 38 9109513 replace;
#P newex 26 123 72 9109513 buffer~ sample;
#P comment 104 97 21 9109513 part;
#P comment 258 96 70 9109513 Fade time (ms);
#P comment 107 58 100 9109513 2) default settings;
#P fasten 4 0 3 0 72 54 31 54;
#P connect 3 1 7 0;
#P fasten 10 0 8 0 109 241 43 241;
#P lcolor 8;
#P connect 8 0 6 0;
#P connect 6 0 5 0;
#P connect 5 0 28 0;
#P connect 28 0 30 0;
#P connect 29 0 30 0;
#P connect 30 0 9 0;
#P connect 6 0 26 0;
#P connect 26 0 31 0;
#P connect 31 0 28 1;
#P connect 34 0 33 0;
#P connect 33 0 14 0;
#P connect 23 0 13 0;
#P connect 14 0 13 0;
#P connect 13 0 18 0;
#P connect 18 0 5 1;
#P connect 19 0 29 0;
#P connect 30 0 9 1;
#P fasten 10 0 13 1 109 241 89 241;
#P lcolor 8;
#P fasten 26 0 29 1 60 422 89 422;
#P fasten 22 0 23 0 135 193 100 193;
#P connect 11 0 17 0;
#P connect 17 0 5 2;
#P connect 23 1 10 0;
#P connect 7 6 10 0;
#P connect 10 0 12 0;
#P lcolor 8;
#P connect 13 0 11 0;
#P connect 12 0 11 0;
#P connect 23 2 10 1;
#P connect 12 1 11 1;
#P connect 21 0 26 1;
#P connect 33 1 22 0;
#P connect 32 0 21 0;
#P fasten 10 0 21 0 109 241 145 241;
#P lcolor 8;
#P connect 6 0 20 0;
#P connect 21 0 20 0;
#P connect 20 0 25 0;
#P connect 25 0 19 0;
#P fasten 27 0 32 0 226 283 155 283;
#P connect 32 1 21 1;
#P fasten 18 0 19 1 72 375 174 375;
#P fasten 17 0 19 2 101 375 203 375;
#P connect 33 2 27 0;
#P hidden connect 33 3 16 0;
#P lcolor 1;
#P connect 16 0 15 0;
#P hidden connect 13 0 15 2;
#P lcolor 1;
#P hidden connect 11 0 15 3;
#P lcolor 1;
#P window clipboard copycount 37;

#92340
Jan 5, 2007 at 10:11am

Your loop points are A and B; your crossfade length will be, let’s say,
100 ms.

Apply a 100 ms fade in to A – 50 ms and a 100 ms fade out to B – 50 ms.
This is a matter of peek~ and poke~, ok ? Then, add this two lovers in a
buffer, and copy them at the exact same place you took them, to A – 50
and B – 50. To avoid the now coming starting click you could :

- use the fe.nocut~ abstraction i left on the list a few weeks ago
- do a copy of the loop (loop x 2) in the buffer, leave the first one
alone, do the crossfade to the last one. Loop points in groove~ are
really sexy. You can say “play from the beginning, now loop from 1000 to
4000″…

You could also wait for an hypothetical release of my fe.objects which
will contain an fe.Xfade~ that automatically do this in a blink of an eye.

f.e

f.e chanfrault | aka | personal computer music
> >>>>>> http://www.personal-computer-music.com
> >>>>>> |sublime music for a desperate people|

michael wrote:
> Thank you all for the replies.
> I’ll try to simplify my patch and post it as soon as I find some free time…
>
> Untill then I think I’ll adjust manually the lo/hi points of the trapezoid~ for every sample :)
>
> thanks,
> mike
>
>

#92341
Jan 5, 2007 at 10:37am

peiman khosravi wrote:
> Hello,
> I am trying to make a patch that sort of does a similar thing. I want to
> be able to change the loop time in real time without getting clicks (I
> don’t need cross-fading). I’v tried many different possibilities but
> still get glitches when there are sudden changes. I’v read all
> the previous posts but there doesn’t seem to be a solution. could
> someone please recommend anything?

You need to change the looptime while its playing parts which are in
both loop regions. Or, if that’s logistically not possible, use two
grooves, (if they don’t contain similar parts there is no syncronisation
problem).
You could also try to do it with play~ instead of groove~, as you have
better control over absolute position within the soundfile… If you
jump, you can also fadein/out…

Of course, you need to change to clickles loop points elsewise your
claim of “I don’t need cross-fading” would be wrong…

just suggestions…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#92342
Jan 5, 2007 at 12:30pm

have u checked the grooveduck patches in the examples folder?
specifically designed to “duck” at the loopoints… but they still click occasionally, mainly with sudden large changes in loop length.

maybe it’s possible to improve it…

j

#92343
Jan 5, 2007 at 12:59pm

Quote: warp wrote on Thu, 04 January 2007 23:04
—————————————————-
the smaller the total duration is, the more clicks I get (unless I increase the Lo and Hi points of trapezoid~).
>
> Is it possible somehow to calculate the correct values of the Lo/Hi points for each seperate sample?
—————————————————-
As you know the duration of each sample (for example, between 10ms and 100ms), you can program something that changes the parameters of trapezoid~ in function of the sample duration.

For example, you can decide that the parameters of trapezoid~ are “0.5 0.5″ for 10 ms and “0.1 0.9″ for 100 ms; then you can use something like zmap for calculating the other values in function of the sample duration (between 10 and 100 ms here).
If you choose this solution, the calculus must be done just before playing each sample (ie when the amplitude enveloppe has a value of 0).

#92344
Jan 5, 2007 at 1:01pm

Quote: peimankhosravi@gmail.com wrote on Thu, 04 January 2007 23:53
—————————————————-
I have not managed to figure out how to use audio signals to change the looping points in synch with trapezoid~ (using sah~ I suppose it should be somehow possible).
—————————————————-

yes, sah~ and probably also delta~ and edge~

#92345
Jan 5, 2007 at 2:36pm

Hello,

Thanks everyone for your replies. I’v written a patch that
theoretically should work (I think!). But for some reason I am not
getting any audio. I would appreciate any suggestion.

Thanks in advance
Peiman

Here’s the patch:

max v2;
#N vpatcher 917 44 1487 458;
#P origin 0 27;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P hidden message 194 44 14 196617 0;
#P hidden message 173 44 14 196617 1;
#P hidden message 251 42 34 196617 1000;
#P hidden newex 251 15 48 196617 loadbang;
#P newex 194 155 55 196617 sah~ 0.01;
#P user number~ 194 122 233 137 9 3 3 1 0. 0. 0 0. 250 0. 0 0 0 221
221 221 222 222 222 0 0 0;
#P newex 251 154 55 196617 sah~ 0.01;
#P user number~ 251 122 290 137 9 3 3 1 0. 0. 0 1000. 250 0. 0 0 0
221 221 221 222 222 222 0 0 0;
#P toggle 173 67 15 0;
#P message 173 92 41 196617 loop $1;
#P toggle 140 276 15 0;
#P newex 173 309 31 196617 dac~;
#P newex 173 264 33 196617 *~;
#P toggle 95 110 15 0;
#P newex 95 142 29 196617 sig~;
#P newex 252 210 100 196617 trapezoid~ 0.01 0.9;
#P message 404 119 30 196617 read;
#P newex 404 146 82 196617 buffer~ pi 1000;
#P newex 173 185 89 196617 groove~ pi;
#P connect 5 0 4 0;
#P hidden fasten 15 0 17 0 256 37 178 37;
#P hidden connect 17 0 10 0;
#P connect 10 0 9 0;
#P connect 9 0 0 0;
#P fasten 4 0 0 0 100 174 178 174;
#P connect 0 0 6 0;
#P connect 6 0 7 0;
#P fasten 8 0 7 0 145 296 178 296;
#P hidden fasten 15 0 18 0 256 37 199 37;
#P hidden connect 18 0 13 0;
#P connect 13 0 14 0;
#P fasten 6 0 7 1 178 293 199 293;
#P fasten 3 0 6 1 257 241 201 241;
#P connect 14 0 0 1;
#P fasten 3 0 14 1 257 247 372 247 372 147 244 147;
#P hidden connect 15 0 16 0;
#P hidden connect 16 0 11 0;
#P connect 11 0 12 0;
#P connect 12 0 0 2;
#P connect 0 1 3 0;
#P fasten 3 0 12 1 257 241 367 241 367 142 301 142;
#P connect 2 0 1 0;
#P pop;

On 5 Jan 2007, at 13:01, julienbreval wrote:

>
> Quote: peimankhosravi@gmail.com wrote on Thu, 04 January 2007 23:53
> —————————————————-
> I have not managed to figure out how to use audio signals to change
> the looping points in synch with trapezoid~ (using sah~ I suppose
> it should be somehow possible).
> —————————————————-
>
> yes, sah~ and probably also delta~ and edge~
>

#92346
Jan 5, 2007 at 3:21pm

On 05 Jan 2007, at 15:36, peiman khosravi wrote:

> Hello,
>
> Thanks everyone for your replies. I’v written a patch that
> theoretically should work (I think!). But for some reason I am not
> getting any audio. I would appreciate any suggestion.

you can’t have a signal-feedback loop like that. you would have to
introduce at least one signal vector of delay, which in your case
would spoil the whole idea of the feedback.
so, why not use somthing else than groove~?
i think it’s much easier when you can control the playback pointer
yourself.

below is a solution with phasor~ and play~.
+ no-click-guarantee.
volker

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 125 146 100 196617 playbackposition;
#P newex 330 231 29 196617 sig~;
#P newex 330 314 35 196617 sah~;
#P newex 166 207 29 196617 * 1.;
#P user multiSlider 71 161 197 21 0. 1. 1 2680 47 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 206 206 206;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P flonum 185 121 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 107 95 105 196617 info~ pi;
#P newex 355 283 39 196617 < ~ 0.5;
#P flonum 197 244 56 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 233 314 35 196617 sah~;
#P newex 197 277 29 196617 sig~;
#P newex 233 364 79 196617 +~;
#P newex 414 192 49 196617 !/ 1000.;
#P flonum 330 159 54 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 414 216 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 414 236 46 196617 phasor~;
#P hidden newex 336 83 66 196617 loadmess 77;
#P toggle 252 477 15 0;
#P newex 285 510 31 196617 dac~;
#P newex 285 465 33 196617 *~;
#P newex 302 341 38 196617 *~ 10;
#P newex 414 405 100 196617 trapezoid~ 0.01 0.9;
#P message 123 42 43 196617 replace;
#P newex 123 69 82 196617 buffer~ pi 1000;
#P newex 285 410 46 196617 play~ pi;
#P comment 391 161 100 196617 loop size;
#P connect 2 1 19 0;
#P connect 3 0 2 0;
#P connect 21 0 22 0;
#P connect 19 6 20 0;
#P hidden connect 20 0 22 1;
#P fasten 22 0 17 0 171 233 202 233;
#P connect 17 0 15 0;
#P connect 15 0 16 0;
#P connect 16 0 14 0;
#P connect 18 0 16 1;
#P fasten 14 0 1 0 238 391 290 391;
#P connect 1 0 6 0;
#P connect 6 0 7 0;
#P fasten 8 0 7 0 257 497 290 497;
#P fasten 10 0 5 0 419 272 307 272;
#P connect 5 0 14 1;
#P fasten 6 0 7 1 290 494 311 494;
#P fasten 4 0 6 1 419 455 313 455;
#P hidden connect 9 0 12 0;
#P connect 12 0 24 0;
#P connect 24 0 23 0;
#P connect 23 0 5 1;
#P connect 10 0 18 0;
#P connect 18 0 23 1;
#P connect 12 0 13 0;
#P connect 13 0 11 0;
#P connect 11 0 10 0;
#P connect 10 0 4 0;
#P window clipboard copycount 26;

#92347
Jan 5, 2007 at 3:56pm

Hello volker,

Thanks for the patch it is exactly what I was after. And I can’t here
any clicks which is great :)

Thanks again
Peiman

On 5 Jan 2007, at 15:21, vb wrote:

>
> On 05 Jan 2007, at 15:36, peiman khosravi wrote:
>
>> Hello,
>>
>> Thanks everyone for your replies. I’v written a patch that
>> theoretically should work (I think!). But for some reason I am not
>> getting any audio. I would appreciate any suggestion.
>
> you can’t have a signal-feedback loop like that. you would have to
> introduce at least one signal vector of delay, which in your case
> would spoil the whole idea of the feedback.
> so, why not use somthing else than groove~?
> i think it’s much easier when you can control the playback pointer
> yourself.
>
> below is a solution with phasor~ and play~.
> + no-click-guarantee.
> volker
>
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P comment 125 146 100 196617 playbackposition;
> #P newex 330 231 29 196617 sig~;
> #P newex 330 314 35 196617 sah~;
> #P newex 166 207 29 196617 * 1.;
> #P user multiSlider 71 161 197 21 0. 1. 1 2680 47 0 0 2 0 0 0;
> #M frgb 0 0 0;
> #M brgb 206 206 206;
> #M rgb2 127 127 127;
> #M rgb3 0 0 0;
> #M rgb4 37 52 91;
> #M rgb5 74 105 182;
> #M rgb6 112 158 18;
> #M rgb7 149 211 110;
> #M rgb8 187 9 201;
> #M rgb9 224 62 37;
> #M rgb10 7 114 128;
> #P flonum 185 121 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 107 95 105 196617 info~ pi;
> #P newex 355 283 39 196617 < ~ 0.5;
> #P flonum 197 244 56 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 233 314 35 196617 sah~;
> #P newex 197 277 29 196617 sig~;
> #P newex 233 364 79 196617 +~;
> #P newex 414 192 49 196617 !/ 1000.;
> #P flonum 330 159 54 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 414 216 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 414 236 46 196617 phasor~;
> #P hidden newex 336 83 66 196617 loadmess 77;
> #P toggle 252 477 15 0;
> #P newex 285 510 31 196617 dac~;
> #P newex 285 465 33 196617 *~;
> #P newex 302 341 38 196617 *~ 10;
> #P newex 414 405 100 196617 trapezoid~ 0.01 0.9;
> #P message 123 42 43 196617 replace;
> #P newex 123 69 82 196617 buffer~ pi 1000;
> #P newex 285 410 46 196617 play~ pi;
> #P comment 391 161 100 196617 loop size;
> #P connect 2 1 19 0;
> #P connect 3 0 2 0;
> #P connect 21 0 22 0;
> #P connect 19 6 20 0;
> #P hidden connect 20 0 22 1;
> #P fasten 22 0 17 0 171 233 202 233;
> #P connect 17 0 15 0;
> #P connect 15 0 16 0;
> #P connect 16 0 14 0;
> #P connect 18 0 16 1;
> #P fasten 14 0 1 0 238 391 290 391;
> #P connect 1 0 6 0;
> #P connect 6 0 7 0;
> #P fasten 8 0 7 0 257 497 290 497;
> #P fasten 10 0 5 0 419 272 307 272;
> #P connect 5 0 14 1;
> #P fasten 6 0 7 1 290 494 311 494;
> #P fasten 4 0 6 1 419 455 313 455;
> #P hidden connect 9 0 12 0;
> #P connect 12 0 24 0;
> #P connect 24 0 23 0;
> #P connect 23 0 5 1;
> #P connect 10 0 18 0;
> #P connect 18 0 23 1;
> #P connect 12 0 13 0;
> #P connect 13 0 11 0;
> #P connect 11 0 10 0;
> #P connect 10 0 4 0;
> #P window clipboard copycount 26;
>
>

#92348
Jan 5, 2007 at 5:34pm

i’m a little late in this thread…
but in case somebody is still wondering how to do the _crossfade_
version clickless etc.
here is another way one could go about it.

volker.

>> + no-click-Garantie!

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P hidden newex 449 39 72 196617 loadmess 114;
#P button 492 174 18 0;
#P newex 492 194 44 196617 t 0. 0.5;
#P newex 399 242 46 196617 phasor~;
#N vpatcher 301 181 764 728;
#P window setfont “Sans Serif” 9.;
#P message 334 214 43 196617 set env;
#P newex 334 185 61 196617 r notifyEnv;
#P inlet 288 44 15 0;
#P window linecount 0;
#P newex 239 289 59 196617 cycle~ env;
#P newex 206 142 32 196617 *~ 2;
#P window linecount 1;
#P newex 183 89 29 196617 sig~;
#P newex 183 238 35 196617 sah~;
#P newex 208 207 39 196617 < ~ 0.5;
#P newex 86 238 35 196617 sah~;
#P newex 50 141 29 196617 sig~;
#P newex 86 288 79 196617 +~;
#P newex 138 389 50 196617 *~;
#P newex 155 265 38 196617 *~ 10;
#P newex 138 334 46 196617 play~ pi;
#P inlet 50 38 15 0;
#P inlet 183 23 15 0;
#P outlet 138 463 15 0;
#P connect 2 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 6 0;
#P connect 9 0 8 1;
#P fasten 6 0 3 0 91 315 143 315;
#P connect 3 0 5 0;
#P connect 5 0 0 0;
#P fasten 12 0 4 0 211 178 160 178;
#P connect 4 0 6 1;
#P connect 13 0 5 1;
#P connect 1 0 11 0;
#P connect 11 0 10 0;
#P connect 10 0 4 1;
#P connect 14 0 12 0;
#P connect 14 0 9 0;
#P connect 9 0 10 1;
#P connect 16 0 13 0;
#P connect 14 0 13 1;
#P connect 15 0 16 0;
#P pop;
#P newobj 311 284 99 196617 p playme;
#P newex 351 221 35 196617 * 0.5;
#P newex 351 202 49 196617 !/ 1000.;
#P newex 351 242 46 196617 phasor~;
#P number 492 85 35 9 2 250 67 3 0 0 0 255 227 23 222 222 222 0 0 0;
#N vpatcher 380 54 975 519;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 309 294 24 196617 t 0.;
#P newex 247 245 72 196617 split 256 300;
#P window linecount 0;
#P newex 39 209 61 196617 s notifyEnv;
#P inlet 200 45 15 0;
#P newex 247 273 39 196617 !- 256;
#P number 200 72 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 276 132 37 196617 + 256;
#P window linecount 1;
#P newex 247 298 34 196617 / 30.;
#P newex 191 219 66 196617 split 30 256;
#P button 101 112 15 0;
#P window linecount 0;
#P newex 191 242 24 196617 t 1.;
#P newex 147 242 34 196617 / 30.;
#P newex 147 194 54 196617 split 0 30;
#P newex 147 166 27 196617 – 1;
#P newex 101 137 44 196617 uzi 600;
#P newex 125 413 55 196617 peek~ env;
#P newex 449 143 78 196617 buffer~ env 15;
#P connect 2 1 14 0;
#P connect 11 0 7 0;
#P connect 7 0 2 0;
#P fasten 3 0 1 0 152 187 130 187;
#P connect 2 2 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 1 1;
#P connect 9 0 1 1;
#P connect 16 0 1 1;
#P connect 6 0 1 1;
#P connect 11 0 5 1;
#P connect 11 0 4 2;
#P connect 4 1 8 0;
#P connect 8 0 6 0;
#P connect 13 0 11 0;
#P connect 11 0 8 1;
#P connect 8 1 15 0;
#P connect 15 0 12 0;
#P connect 12 0 9 0;
#P connect 11 0 9 1;
#P connect 11 0 10 0;
#P connect 10 0 12 1;
#P connect 10 0 15 2;
#P connect 15 1 16 0;
#P pop;
#P newobj 492 105 50 196617 p envGen;
#N vpatcher 301 181 764 728;
#P window setfont “Sans Serif” 9.;
#P message 334 214 43 196617 set env;
#P newex 334 185 61 196617 r notifyEnv;
#P inlet 288 44 15 0;
#P window linecount 0;
#P newex 239 289 59 196617 cycle~ env;
#P newex 206 142 32 196617 *~ 2;
#P window linecount 1;
#P newex 183 89 29 196617 sig~;
#P newex 183 238 35 196617 sah~;
#P newex 208 207 39 196617 < ~ 0.5;
#P newex 86 238 35 196617 sah~;
#P newex 50 141 29 196617 sig~;
#P newex 86 288 79 196617 +~;
#P newex 138 389 50 196617 *~;
#P newex 155 265 38 196617 *~ 10;
#P newex 138 334 46 196617 play~ pi;
#P inlet 50 38 15 0;
#P inlet 183 23 15 0;
#P outlet 138 463 15 0;
#P connect 2 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 6 0;
#P connect 9 0 8 1;
#P fasten 6 0 3 0 91 315 143 315;
#P connect 3 0 5 0;
#P connect 5 0 0 0;
#P fasten 12 0 4 0 211 178 160 178;
#P connect 4 0 6 1;
#P connect 13 0 5 1;
#P connect 1 0 11 0;
#P connect 11 0 10 0;
#P connect 10 0 4 1;
#P connect 14 0 12 0;
#P connect 14 0 9 0;
#P connect 9 0 10 1;
#P connect 16 0 13 0;
#P connect 14 0 13 1;
#P connect 15 0 16 0;
#P pop;
#P newobj 197 285 99 196617 p playme;
#P comment 86 146 100 196617 playbackposition;
#P newex 166 207 29 196617 * 1.;
#P user multiSlider 32 161 197 21 0. 1. 1 2680 47 0 0 2 0 0 0;
#M frgb 230 2 8;
#M brgb 214 214 214;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P flonum 185 121 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 107 95 105 196617 info~ pi;
#P flonum 197 244 56 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 291 162 54 9 0 0 0 3 0 0 0 255 227 23 222 222 222 0 0 0;
#P hidden newex 336 83 66 196617 loadmess 77;
#P toggle 163 374 24 0;
#P newex 196 433 31 196617 dac~;
#P message 123 42 43 196617 replace;
#P newex 123 69 82 196617 buffer~ pi 1000;
#P comment 346 162 100 196617 loop len;
#P comment 483 70 100 196617 X-FADE length;
#P window linecount 2;
#P comment 514 166 100 196617 sync – can be improved…;
#P window linecount 1;
#P comment 521 448 116 196617 vboehm@gmx.ch;
#P connect 4 1 11 0;
#P connect 5 0 4 0;
#P connect 13 0 14 0;
#P connect 11 6 12 0;
#P hidden connect 12 0 14 1;
#P connect 22 0 6 0;
#P connect 16 0 6 0;
#P fasten 7 0 6 0 168 420 201 420;
#P fasten 14 0 10 0 171 233 202 233;
#P connect 10 0 16 0;
#P connect 22 0 6 1;
#P connect 16 0 6 1;
#P connect 9 0 16 1;
#P fasten 19 0 16 2 356 260 290 260;
#P hidden connect 8 0 9 0;
#P connect 10 0 22 0;
#P connect 9 0 20 0;
#P connect 20 0 21 0;
#P connect 21 0 19 0;
#P connect 9 0 22 1;
#P connect 24 0 19 1;
#P connect 21 0 23 0;
#P connect 23 0 22 2;
#P connect 24 1 23 1;
#P hidden connect 26 0 18 0;
#P connect 18 0 17 0;
#P hidden connect 8 0 25 0;
#P connect 25 0 24 0;
#P window clipboard copycount 27;

#92349
Jan 6, 2007 at 1:45am

nice toy :-)

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P hidden newex 140 59 112 196617 unpack 0 0 0 0 0 0 0 0;
#P hidden newex 140 39 165 196617 loadmess 0 127 2 20 10 40 60 69;
#P number 366 315 34 9 -127 127 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 330 315 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 172 267 35 196617 rate;
#P comment 208 281 29 196617 play;
#P hidden message 130 297 41 196617 min $1;
#P comment 401 299 13 196617 R;
#P comment 401 282 13 196617 L;
#P comment 401 340 78 196617 fp@pan-etc.net;
#P hidden newex 701 175 68 196617 pvar plbapoR;
#P hidden newex 500 175 67 196617 pvar plbapoL;
#P hidden newex 831 110 56 196617 pvar loleR;
#P hidden newex 629 110 55 196617 pvar loleL;
#P comment 396 196 13 196617 R;
#P comment 396 179 13 196617 L;
#P comment 396 245 13 196617 R;
#P comment 396 228 13 196617 L;
#P hidden message 150 105 83 196617 setminmax 0 $1;
#P user multiSlider 150 244 260 15 0. 2338.375 1 2680 47 0 0 2 0 0 0;
#M frgb 230 2 8;
#M brgb 214 214 214;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 150 227 260 15 0. 2338.375 1 2664 47 0 0 2 0 0 0;
#M frgb 230 2 8;
#M brgb 214 214 214;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P number 294 315 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user hslider 258 297 15 19 3 1 0 0;
#P number 330 297 35 9 0 127 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 294 297 35 9 0 127 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 366 297 34 9 -127 127 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user multiSlider 150 195 260 15 0. 1. 1 2680 47 0 0 2 0 0 0;
#M frgb 230 2 8;
#M brgb 214 214 214;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P hidden newex 468 195 29 196617 * 1.;
#P flonum 411 195 57 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname plbapoR;
#N vpatcher 631 347 915 559;
#P window setfont “Sans Serif” 9.;
#P number 50 122 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 133 57 41 196617 min $1;
#P button 70 103 15 0;
#P newex 86 141 40 196617 / 127.;
#N counter 0;
#X flags 0 0;
#P newobj 86 81 109 196617 counter 0;
#P number 86 103 27 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 86 122 142 196617 drunk 128 2;
#B color 5;
#P inlet 70 83 15 0;
#P inlet 133 37 15 0;
#P inlet 86 37 15 0;
#P inlet 182 37 15 0;
#P inlet 110 37 15 0;
#P inlet 218 102 15 0;
#P outlet 86 163 15 0;
#P connect 7 0 13 0;
#P connect 6 0 11 0;
#P connect 12 0 9 0;
#P connect 4 0 9 0;
#P connect 9 0 8 0;
#P connect 8 0 7 0;
#P fasten 11 0 7 0 75 120 91 120;
#P connect 7 0 10 0;
#P connect 10 0 0 0;
#P connect 2 0 9 1;
#P connect 5 0 12 0;
#P connect 3 0 9 4;
#P connect 1 0 7 2;
#P pop;
#P hidden newobj 325 428 172 196617 p positionR;
#N vpatcher 631 347 1231 747;
#P window setfont “Sans Serif” 9.;
#P number 50 122 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 133 57 41 196617 min $1;
#P button 70 103 15 0;
#P newex 86 141 40 196617 / 127.;
#N counter 0;
#X flags 0 0;
#P newobj 86 81 109 196617 counter 0;
#P number 86 103 27 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 86 122 142 196617 drunk 128 2;
#B color 5;
#P inlet 70 83 15 0;
#P inlet 133 37 15 0;
#P inlet 86 37 15 0;
#P inlet 182 37 15 0;
#P inlet 110 37 15 0;
#P inlet 218 102 15 0;
#P outlet 86 163 15 0;
#P connect 7 0 13 0;
#P connect 6 0 11 0;
#P connect 4 0 9 0;
#P connect 12 0 9 0;
#P connect 9 0 8 0;
#P fasten 11 0 7 0 75 120 91 120;
#P connect 8 0 7 0;
#P connect 7 0 10 0;
#P connect 10 0 0 0;
#P connect 2 0 9 1;
#P connect 5 0 12 0;
#P connect 3 0 9 4;
#P connect 1 0 7 2;
#P pop;
#P hidden newobj 149 428 172 196617 p positionL;
#P comment 366 267 24 196617 step;
#P comment 330 267 24 196617 max;
#P user hslider 258 280 15 19 3 1 0 0;
#P number 330 280 35 9 0 127 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 294 280 35 9 0 127 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 831 156 35 196617 * 0.5;
#P hidden newex 831 135 49 196617 !/ 1000.;
#P flonum 411 244 57 9 0 2338.375 2 3 0 0 0 255 227 23 222 222 222 0 0 0;
#P objectname loleR;
#P hidden message 411 105 44 196617 max $1;
#P hidden newex 181 388 70 196617 speedlim 100;
#P number 172 280 35 9 10 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 172 297 35 9 1 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 156 280 15 0;
#P number 366 280 34 9 -127 127 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden button 688 68 18 0;
#P hidden newex 688 88 212 196617 t 0. 0.5;
#P hidden newex 831 175 69 196617 phasor~;
#N vpatcher 626 185 1089 732;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P message 334 214 43 196617 set env;
#P newex 334 185 61 196617 r notifyEnv;
#P inlet 288 44 15 0;
#P newex 239 289 59 196617 cycle~ env;
#P newex 206 142 32 196617 *~ 2;
#P window linecount 1;
#P newex 183 89 29 196617 sig~;
#P newex 183 238 35 196617 sah~;
#P newex 208 207 39 196617 < ~ 0.5;
#P newex 86 238 35 196617 sah~;
#P newex 50 141 29 196617 sig~;
#P newex 86 288 79 196617 +~;
#P newex 183 389 50 196617 *~;
#P newex 155 265 38 196617 *~ 10;
#P newex 138 334 55 196617 play~ pi 2;
#P inlet 50 38 15 0;
#P inlet 183 23 15 0;
#P outlet 183 463 15 0;
#P connect 2 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 6 0;
#P connect 9 0 8 1;
#P connect 6 0 3 0;
#P fasten 12 0 4 0 211 178 160 178;
#P connect 4 0 6 1;
#P connect 1 0 11 0;
#P connect 11 0 10 0;
#P connect 10 0 4 1;
#P connect 3 1 5 0;
#P connect 5 0 0 0;
#P connect 14 0 12 0;
#P connect 14 0 9 0;
#P connect 9 0 10 1;
#P connect 13 0 5 1;
#P connect 16 0 13 0;
#P connect 14 0 13 1;
#P connect 15 0 16 0;
#P pop;
#P hidden newobj 701 195 140 196617 p playme R;
#P hidden newex 629 156 35 196617 * 0.5;
#P hidden newex 629 136 49 196617 !/ 1000.;
#P hidden newex 629 175 69 196617 phasor~;
#P number 300 130 35 9 2 250 67 3 0 0 0 255 227 23 222 222 222 0 0 0;
#N vpatcher 380 54 975 519;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 309 294 24 196617 t 0.;
#P newex 247 245 72 196617 split 256 300;
#P window linecount 0;
#P newex 39 209 61 196617 s notifyEnv;
#P inlet 200 45 15 0;
#P newex 247 273 39 196617 !- 256;
#P number 200 72 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 276 132 37 196617 + 256;
#P window linecount 1;
#P newex 247 298 34 196617 / 30.;
#P newex 191 219 66 196617 split 30 256;
#P button 101 112 15 0;
#P window linecount 0;
#P newex 191 242 24 196617 t 1.;
#P newex 147 242 34 196617 / 30.;
#P newex 147 194 54 196617 split 0 30;
#P newex 147 166 27 196617 – 1;
#P newex 101 137 44 196617 uzi 600;
#P newex 125 413 55 196617 peek~ env;
#P newex 449 143 78 196617 buffer~ env 15;
#P connect 2 1 14 0;
#P connect 11 0 7 0;
#P connect 7 0 2 0;
#P fasten 3 0 1 0 152 187 130 187;
#P connect 2 2 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 1 1;
#P connect 9 0 1 1;
#P connect 16 0 1 1;
#P connect 6 0 1 1;
#P connect 11 0 5 1;
#P connect 11 0 4 2;
#P connect 4 1 8 0;
#P connect 8 0 6 0;
#P connect 13 0 11 0;
#P connect 11 0 8 1;
#P connect 8 1 15 0;
#P connect 15 0 12 0;
#P connect 12 0 9 0;
#P connect 11 0 9 1;
#P connect 11 0 10 0;
#P connect 10 0 12 1;
#P connect 10 0 15 2;
#P connect 15 1 16 0;
#P pop;
#P hidden newobj 300 147 50 196617 p envGen;
#N vpatcher 301 181 764 728;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P message 334 214 43 196617 set env;
#P newex 334 185 61 196617 r notifyEnv;
#P inlet 288 44 15 0;
#P newex 239 289 59 196617 cycle~ env;
#P newex 206 142 32 196617 *~ 2;
#P window linecount 1;
#P newex 183 89 29 196617 sig~;
#P newex 183 238 35 196617 sah~;
#P newex 208 207 39 196617 < ~ 0.5;
#P newex 86 238 35 196617 sah~;
#P newex 50 141 29 196617 sig~;
#P newex 86 288 79 196617 +~;
#P newex 138 389 50 196617 *~;
#P newex 155 265 38 196617 *~ 10;
#P newex 138 334 55 196617 play~ pi 2;
#P inlet 50 38 15 0;
#P inlet 183 23 15 0;
#P outlet 138 463 15 0;
#P connect 2 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 6 0;
#P connect 9 0 8 1;
#P fasten 6 0 3 0 91 315 143 315;
#P connect 3 0 5 0;
#P connect 5 0 0 0;
#P fasten 12 0 4 0 211 178 160 178;
#P connect 4 0 6 1;
#P connect 13 0 5 1;
#P connect 1 0 11 0;
#P connect 11 0 10 0;
#P connect 10 0 4 1;
#P connect 14 0 12 0;
#P connect 14 0 9 0;
#P connect 9 0 10 1;
#P connect 16 0 13 0;
#P connect 14 0 13 1;
#P connect 15 0 16 0;
#P pop;
#P hidden newobj 500 195 139 196617 p playme L;
#P comment 150 164 259 196617 < -----------------playbackposition----------------->;
#P hidden newex 468 175 29 196617 * 1.;
#P user multiSlider 150 178 260 15 0. 1. 1 2680 47 0 0 2 0 0 0;
#M frgb 230 2 8;
#M brgb 214 214 214;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P hidden flonum 487 85 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 409 65 105 196617 info~ pi;
#P flonum 411 178 57 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname plbapoL;
#P flonum 411 227 57 9 0 2338.375 2 3 0 0 0 255 227 23 222 222 222 0 0 0;
#P objectname loleL;
#P toggle 269 134 24 0;
#P hidden newex 500 218 211 196617 dac~;
#P message 193 138 43 196617 replace;
#P hidden newex 409 43 82 196617 buffer~ pi 1000;
#P comment 150 213 259 196617 < --------------------loop lenght------------------->;
#P comment 336 132 74 196617 X-FADE length;
#P window linecount 2;
#P hidden comment 710 60 100 196617 sync – can be improved…;
#P window linecount 1;
#P comment 143 340 84 196617 vboehm@gmx.ch;
#P comment 294 267 24 196617 min;
#P comment 207 297 40 196617 around;
#P comment 401 318 24 196617 L-R;
#P window linecount 2;
#P comment 245 134 23 196617 ON/ OFF;
#P comment 152 134 40 196617 LOAD Sample;
#P window linecount 1;
#P hidden newex 181 366 58 196617 metro 100;
#P window setfont “Arial Black” 9.;
#P comment 155 316 50 791478281 Random;
#P user panel 150 263 278 72;
#X brgb 157 136 107;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow -2;
#X done;
#P user panel 150 130 147 32;
#X brgb 157 136 107;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow -2;
#X done;
#P user panel 144 125 330 215;
#X brgb 197 189 165;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P hidden connect 37 0 73 0;
#P hidden connect 78 0 79 0;
#P hidden fasten 4 0 49 0 186 385 154 385;
#P hidden fasten 21 0 61 0 492 102 155 102;
#P hidden connect 49 0 22 0;
#P hidden connect 50 0 53 0;
#P hidden connect 61 0 59 0;
#P hidden connect 61 0 60 0;
#P hidden connect 79 3 38 0;
#P hidden connect 73 0 38 0;
#P hidden connect 79 4 37 0;
#P hidden fasten 36 0 4 0 161 362 186 362;
#P hidden connect 4 0 39 0;
#P hidden connect 39 0 49 1;
#P hidden connect 46 0 49 2;
#P hidden fasten 37 0 4 1 177 315 234 315;
#P hidden fasten 38 0 39 1 177 299 246 299;
#P hidden connect 44 0 49 3;
#P hidden connect 45 0 49 4;
#P hidden connect 58 0 44 0;
#P hidden connect 58 0 55 0;
#P hidden connect 79 0 58 0;
#P hidden connect 79 7 27 0;
#P hidden connect 27 0 26 0;
#P hidden connect 35 0 49 5;
#P hidden fasten 4 0 50 0 186 385 330 385;
#P hidden connect 76 0 45 0;
#P hidden connect 76 0 56 0;
#P hidden connect 79 1 76 0;
#P hidden connect 39 0 50 1;
#P hidden connect 77 0 35 0;
#P hidden connect 77 0 54 0;
#P hidden connect 79 2 77 0;
#P hidden connect 57 0 50 2;
#P hidden connect 15 0 14 0;
#P hidden fasten 14 1 20 0 486 62 414 62;
#P hidden fasten 21 0 40 0 492 102 416 102;
#P hidden connect 23 0 19 0;
#P hidden connect 52 0 51 0;
#P hidden connect 79 5 18 0;
#P hidden connect 40 0 18 0;
#P hidden connect 59 0 18 0;
#P hidden connect 79 6 41 0;
#P hidden connect 40 0 41 0;
#P hidden connect 60 0 41 0;
#P hidden connect 55 0 50 3;
#P hidden connect 56 0 50 4;
#P hidden connect 22 0 23 0;
#P hidden connect 53 0 52 0;
#P hidden connect 54 0 50 5;
#P hidden connect 20 6 21 0;
#P hidden connect 21 0 23 1;
#P hidden connect 21 0 52 1;
#P hidden connect 68 0 25 0;
#P hidden fasten 17 0 16 0 274 215 505 215;
#P hidden connect 25 0 16 0;
#P hidden fasten 66 0 25 1 634 130 569 130;
#P hidden connect 28 0 25 2;
#P hidden connect 66 0 29 0;
#P hidden connect 29 0 30 0;
#P hidden connect 30 0 28 0;
#P hidden connect 34 0 33 0;
#P hidden connect 33 0 28 1;
#P hidden connect 69 0 31 0;
#P hidden connect 31 0 16 1;
#P hidden fasten 67 0 31 1 836 130 771 130;
#P hidden connect 67 0 42 0;
#P hidden connect 42 0 43 0;
#P hidden connect 43 0 32 0;
#P hidden connect 32 0 31 2;
#P hidden connect 33 1 32 1;
#P window clipboard copycount 80;

#92350
Jan 6, 2007 at 12:11pm

hi fp

>
> nice toy :-)

yeah, nice.
although for this approach you wouldn’t need the x-fade technique i
posted,
cause by giving different loop sizes for the two players they are out
of sync anyway.
cheers,
vb

#92351
Jan 8, 2007 at 4:41pm

Quote: Mattijs wrote on Fri, 05 January 2007 02:04
—————————————————-
> I somehow felt like trying. The way I would approach a crossfade on loop in general I guess would be like the patch below. Btw this doesn’t deal with clicks when changing looppoints yet.

I was looking at my try again and saw that there was a mistake. Here is an update.

Mattijs

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#N vpatcher 125 541 472 823;
#P window setfont “Sans Serif” 9.;
#P newex 225 112 29 196617 t b f;
#P newex 193 112 29 196617 t b f;
#P newex 225 131 27 196617 – 0.;
#P newex 193 131 27 196617 – 0.;
#P newex 186 64 29 196617 t b f;
#P newex 67 161 33 196617 !-~ 1;
#P newex 50 206 35 196617 *~ 1.;
#P newex 79 183 27 196617 *~;
#P newex 50 183 27 196617 *~;
#N vpatcher 605 517 929 760;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 45 93 27 196617 /~;
#P newex 130 93 27 196617 /~;
#P newex 15 138 31 196617 +~ 1;
#P window linecount 0;
#P newex 15 160 62 196617 selector~ 2;
#P window linecount 1;
#P newex 15 114 27 196617 >~;
#P newex 147 49 30 196617 !- 1.;
#P newex 130 114 71 196617 maximum~ 0.;
#P newex 130 72 27 196617 -~;
#N comlet (signal) fade amount;
#P outlet 15 182 15 0;
#P newex 45 114 71 196617 maximum~ 0.;
#P window linecount 0;
#P newex 45 72 27 196617 -~;
#N comlet (float , perun) fade time;
#P inlet 147 29 15 0;
#N comlet (signal) phase;
#P inlet 62 29 15 0;
#P comment 130 167 163 196617 can definitly be done more elegant;
#P connect 1 0 9 0;
#P connect 9 0 11 0;
#P connect 11 0 10 0;
#P connect 10 0 5 0;
#P connect 2 0 9 1;
#P connect 4 0 10 1;
#P connect 2 0 3 0;
#P connect 3 0 13 0;
#P connect 13 0 4 0;
#P connect 1 0 3 1;
#P connect 2 0 13 1;
#P connect 7 0 10 2;
#P connect 1 0 6 0;
#P connect 6 0 12 0;
#P connect 12 0 7 0;
#P connect 2 0 8 0;
#P connect 8 0 6 1;
#P connect 2 0 12 1;
#P pop;
#P newobj 67 137 86 196617 p getFadeAmount;
#P newex 161 131 37 196617 %~ 1.;
#P newex 178 89 31 196617 !/ 5.;
#P newex 161 112 27 196617 +~;
#P newex 161 151 74 196617 wave~ sample;
#P newex 82 92 27 196617 f;
#P newex 114 92 27 196617 f;
#P newex 50 50 49 196617 !/ 1000.;
#P newex 50 69 46 196617 phasor~;
#P newex 50 114 74 196617 wave~ sample;
#P comment 211 89 86 196617 fade time (perun);
#P inlet 186 30 15 0;
#P inlet 50 30 15 0;
#P inlet 114 30 15 0;
#P inlet 82 30 15 0;
#P outlet 50 228 15 0;
#P connect 3 0 8 0;
#P connect 8 0 7 0;
#P connect 7 0 6 0;
#P connect 6 0 16 0;
#P connect 16 0 18 0;
#P connect 17 0 18 0;
#P connect 18 0 0 0;
#P connect 7 0 15 0;
#P connect 15 0 19 0;
#P connect 19 0 16 1;
#P connect 11 0 17 0;
#P connect 1 0 10 0;
#P connect 10 0 6 1;
#P fasten 15 0 17 1 72 158 101 158;
#P connect 2 0 9 0;
#P connect 9 0 6 2;
#P connect 13 0 15 1;
#P connect 7 0 12 0;
#P connect 12 0 14 0;
#P connect 14 0 11 0;
#P fasten 3 0 13 0 55 47 183 47;
#P connect 20 0 13 0;
#P connect 13 0 12 1;
#P connect 4 0 20 0;
#P fasten 4 0 23 0 191 52 198 52;
#P connect 10 0 21 0;
#P connect 23 0 21 0;
#P connect 21 0 11 1;
#P connect 20 1 13 1;
#P connect 23 1 21 1;
#P fasten 4 0 24 0 191 52 230 52;
#P connect 9 0 22 0;
#P connect 24 0 22 0;
#P connect 22 0 11 2;
#P connect 24 1 22 1;
#P pop;
#P newobj 417 185 53 196617 p player;
#P hidden newex 545 125 63 196617 loadmess 5.;
#P hidden newex 107 51 62 196617 prepend set;
#P hidden newex 170 51 62 196617 prepend set;
#P hidden newex 169 149 30 196617 !- 0.;
#N vpatcher 471 349 638 536;
#P window setfont “Sans Serif” 9.;
#P newex 23 52 27 196617 f;
#P newex 79 84 29 196617 t b f;
#P newex 79 104 27 196617 + 0.;
#N comlet (float , ms) loop length;
#P inlet 23 32 15 0;
#N comlet (float , ms) loop start;
#P inlet 50 32 15 0;
#N comlet (float , ms) loop length;
#P outlet 23 124 15 0;
#P outlet 50 124 15 0;
#N comlet (float , ms) loop end;
#P outlet 79 124 15 0;
#P connect 4 0 7 0;
#P connect 7 0 2 0;
#P connect 3 0 1 0;
#P fasten 7 0 6 0 28 81 84 81;
#P connect 3 0 5 0;
#P connect 6 0 5 0;
#P connect 5 0 0 0;
#P connect 6 1 5 1;
#P pop;
#P newobj 417 163 74 196617 p start&len;
#P flonum 417 89 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 417 107 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 467 107 62 196617 Loop Length;
#P comment 467 89 57 196617 Play Start;
#P comment 467 71 62 196617 Read sample;
#P flonum 417 125 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 13 51 102 196617 loadmess set sample;
#P user waveform~ 13 71 403 75 3 9;
#W mode select;
#W mouseoutput continuous;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P user ezdac~ 417 206 461 239 0;
#P message 417 71 43 196617 replace;
#P hidden newex 337 53 78 196617 buffer~ sample;
#P comment 467 125 77 196617 Fade time (ms);
#P comment 14 154 109 196617 mattijs@smadsteck.nl;
#P hidden connect 6 0 5 0;
#P hidden connect 13 1 16 0;
#P hidden connect 5 2 14 0;
#P hidden connect 13 2 15 0;
#P hidden connect 5 3 14 1;
#P hidden connect 16 0 5 2;
#P hidden connect 15 0 5 3;
#P hidden connect 3 0 2 0;
#P hidden connect 5 2 12 0;
#P hidden connect 14 0 11 0;
#P hidden connect 17 0 7 0;
#P hidden connect 11 0 13 0;
#P connect 13 0 18 0;
#P connect 18 0 4 0;
#P connect 13 1 18 1;
#P connect 13 2 18 2;
#P connect 18 0 4 1;
#P hidden connect 7 0 18 3;
#P hidden connect 12 0 13 1;
#P window clipboard copycount 19;

#92352
Jan 12, 2007 at 11:06pm

Hi, Volk, I fianlly noticed that I posted my message under the wrong topic prevsiouly.

I am still trying to figure out the 2nd patch. I was wondering how does the X-fade length in the 2nd patch affect the result. All if it should always be 114 in that patch ?

Regarding the 1st patch, I think I figure it out.

Please let me know if I misunderstood it.

I think the saw tooth wave generated by phasor~ actually “ramp down” very fast so as long as sah~ hold the sample during the “ramp down” of the saw tooth wave, it is safe.

And 1000 refers to 1 sec for frequency calculation.

Does phasor~ actually “abruptly drop down” from 1 to 0 ? Or does it gradually “ramp down” ?

If it abruptly drops down in no time, then it makes sense to me that sah~ samples the input when comparison result transits from 0 to 1 and makes no click.

Do I think correctly about the 1st patch ?

Thank you very much.

#92353
Jan 13, 2007 at 12:44pm

On 13 Jan 2007, at 00:06, Cheng Chien-Wen wrote:

>
> Hi, Volk, I fianlly noticed that I posted my message under the
> wrong topic prevsiouly.
>
> I am still trying to figure out the 2nd patch. I was wondering how
> does the X-fade length in the 2nd patch affect the result. All if
> it should always be 114 in that patch ?

have you tried changing it? with longer values the crossfade is
longer and therefore more blurry. with short values you accent the
loopstart/endpoints. if you have trouble hearing the differences, you
can observe this visually:
in the player subpatches, create a second outlet and connect the
[cycle~ env] object to this outlet.
connect [scope~] objects to the newly created outlets and obeserve
the envelopes on overlaps of both envelopes with different crossfade
lengths.
>
> Regarding the 1st patch, I think I figure it out.
>
> Please let me know if I misunderstood it.
>
> I think the saw tooth wave generated by phasor~ actually “ramp
> down” very fast so as long as sah~ hold the sample during the “ramp
> down” of the saw tooth wave, it is safe.
>
> And 1000 refers to 1 sec for frequency calculation.
>
> Does phasor~ actually “abruptly drop down” from 1 to 0 ? Or does it
> gradually “ramp down” ?
>
> If it abruptly drops down in no time, then it makes sense to me
> that sah~ samples the input when comparison result transits from 0
> to 1 and makes no click.
>
> Do I think correctly about the 1st patch ?

yes. there is no “ramp down” when phasor~ approaches the value 1. it
is an “abrupt” jump back to 0 (to be precise, to some value near 0).
don’t forget that time inside your computer is discrete. so even
though the sampling interval is a real time-interval (depending on
the sampling rate), inside your machine there is _no_ data (or ramp
down in your case) between consecutive sample points.
try recording the output of a phasor~ to a buffer and look at the
values.
hope that helps.
volker.

#92354

You must be logged in to reply to this topic.