Buffer - Infinite Loop

[email protected] Wed, 11 Apr 2018 09:32:09 -0700 (MST)
Newsgroups gmane.comp.audio.supercollider.devel
Message-ID <[email protected]>
Hi all :)

a very large described request, how can I have an infinite Buffer read loop
without clicks or empty spaces?

PlayBuf(1,0, loop:1); *clicks*

PlayBuf(1,0, loop:1) * EnvGen.ar(Env([0,1,1,0],[0.1, *the buffer duration in
seconds* - 0.2 ,0.1])); *clicks*

I found this linked on a thread:

(
  SynthDef(\loopPlayer, {
    arg out=0, bufnum = ~pad.bufnum, speed=1, rate=1, looptime=5,
startPos=0, loop=1,gate=1;
    
    var bufRate = BufRateScale.kr(bufnum) * speed * rate;
    var bufTrig = Impulse.kr((looptime  / speed.abs).reciprocal);
    var bufStartPos = BufFrames.ir(bufnum)*startPos;
	var sig = PlayBuf.ar(2, ~pad.bufnum, bufRate, bufTrig, bufStartPos, loop);
	var env = EnvGen.kr(Env.cutoff(0.1, 1), gate, doneAction: 2);
    
	Out.ar(out,Pan2.ar(sig,0.0,env));
     
}).add
);           *clicks*


tried with PlayBufCF

(
z = SynthDef(\sample, { var bufnum = 0;
	
	var sig, trig;
	trig = Impulse.kr();
	sig = PlayBufCF.ar(2, bufnum, 1, trig, 0,0,0.01);
	Out.ar(0, Pan2.ar(sig,0));

}).add
);

it doesn't click, but leaves a huuge gap starting the sample again. STrange
thing is if I write loop:1 as argument for PlayBufCF it returns to click!

What I need is a ""simple"" (not so simple I'm start to think) loop as the
one the DAW can do (the same loop in Cubase doesn't click)

Here is the sample I'm trying to use:
https://www.dropbox.com/s/ersovprhqya3t2q/GSALL%20-%200001.wav?dl=0

Thank you so much



--
Sent from: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/SuperCollider-Developers-New-Use-this-f2681767.html

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/