BufDelay distortion due to Buffer allocation?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

BufDelay distortion due to Buffer allocation?

mousaique
hi list,

im wondering why i get this distortion when using BufDelayC?
with DelayC it works fine...


b = Buffer.alloc(s,1* 96000,1);

(
SynthDef(\test, {| freq,delay|

var sound= SinOsc.ar(freq);
OffsetOut.ar(0, Splay.ar(BufDelayC.ar(b.bufnum,sound,delay))
)
}).add;)

(
p=Pspawner({ | sp |  
loop {
var pat=(
Pmono(
\test,
\dur,2,
\delay,Pfunc{(1..8).linlin(1,8,0,1)},
\freq,Pfunc{400*(1..8).linlin(1,8,1,2)},
);
);sp.seq(pat);};
}
).play;)


is it maybe a matter of having to allocate a multichannel buffer...? ( i tried to raise the nr to 8, but to no avail yet..)


Reply | Threaded
Open this post in threaded view
|

Re: BufDelay distortion due to Buffer allocation?

mousaique
on the BufDelay helpfile it states:

NOTE: The buffers provided to any of the BufDelay units must be one channel. If you want to delay a multichannel signal, you must provide as many separate (one-channel) buffers as there are input channels.

meaning that if i have 8 expanded channels on Pmono ill need 8 separate 1 channel buffers?

so instead of 
b = Buffer.alloc(s,1* 96000,8)  (which is one 8-channel buffer)
this:
b = Buffer.alloc(s,1* 96000,1) ... times 8? is it possible to multichannel expand this buffer under the same variable b?



On Sun, Feb 11, 2018 at 11:54 AM, Jan Ferreira <[hidden email]> wrote:
hi list,

im wondering why i get this distortion when using BufDelayC?
with DelayC it works fine...


b = Buffer.alloc(s,1* 96000,1);

(
SynthDef(\test, {| freq,delay|

var sound= SinOsc.ar(freq);
OffsetOut.ar(0, Splay.ar(BufDelayC.ar(b.bufnum,sound,delay))
)
}).add;)

(
p=Pspawner({ | sp |  
loop {
var pat=(
Pmono(
\test,
\dur,2,
\delay,Pfunc{(1..8).linlin(1,8,0,1)},
\freq,Pfunc{400*(1..8).linlin(1,8,1,2)},
);
);sp.seq(pat);};
}
).play;)


is it maybe a matter of having to allocate a multichannel buffer...? ( i tried to raise the nr to 8, but to no avail yet..)



Reply | Threaded
Open this post in threaded view
|

Re: BufDelay distortion due to Buffer allocation?

mousaique
eureka!

b = Buffer.allocConsecutive(8,s, 96000,1);

(
SynthDef(\test, {| freq,delay,buffer|

var sound= SinOsc.ar(freq);
OffsetOut.ar(0, Splay.ar(BufDelayC.ar(buffer,sound,delay))
)
}).add;)

(
p=Pspawner({ | sp |  
loop {
var pat=(
Pmono(
\test,
\dur,2,
\buffer,Pfunc{b[(0..7)]},
\delay,Pfunc{(1..8).linlin(1,8,0,1)},
\freq,Pfunc{400*(1..8).linlin(1,8,1,2)},
);
);sp.seq(pat);};
}
).play;)


what a feeling to finally solve a problem by oneself. pretty much reciprocal to the frustrations if one doesnt :P

On Sun, Feb 11, 2018 at 1:57 PM, Jan Ferreira <[hidden email]> wrote:
on the BufDelay helpfile it states:

NOTE: The buffers provided to any of the BufDelay units must be one channel. If you want to delay a multichannel signal, you must provide as many separate (one-channel) buffers as there are input channels.

meaning that if i have 8 expanded channels on Pmono ill need 8 separate 1 channel buffers?

so instead of 
b = Buffer.alloc(s,1* 96000,8)  (which is one 8-channel buffer)
this:
b = Buffer.alloc(s,1* 96000,1) ... times 8? is it possible to multichannel expand this buffer under the same variable b?



On Sun, Feb 11, 2018 at 11:54 AM, Jan Ferreira <[hidden email]> wrote:
hi list,

im wondering why i get this distortion when using BufDelayC?
with DelayC it works fine...


b = Buffer.alloc(s,1* 96000,1);

(
SynthDef(\test, {| freq,delay|

var sound= SinOsc.ar(freq);
OffsetOut.ar(0, Splay.ar(BufDelayC.ar(b.bufnum,sound,delay))
)
}).add;)

(
p=Pspawner({ | sp |  
loop {
var pat=(
Pmono(
\test,
\dur,2,
\delay,Pfunc{(1..8).linlin(1,8,0,1)},
\freq,Pfunc{400*(1..8).linlin(1,8,1,2)},
);
);sp.seq(pat);};
}
).play;)


is it maybe a matter of having to allocate a multichannel buffer...? ( i tried to raise the nr to 8, but to no avail yet..)