|
Yes, an amplitude envelope will work. Try this:
instr 60
idur = p3 ; duration of note
ivol = p4
ipan = p5 * 1.570796327
aleft, aright diskin "Grand/80/60.wav", 1
aenv linseg 0, 0.02, 1, idur - 0.04, 1, 0.02, 0 ; envelope
aleft = aleft * ivol * cos(ipan) * aenv
aright = aright * ivol * sin(ipan) * aenv
outs aleft, aright
endin
I haven't tested this code, so hopefully there aren't any bugs.
Best,
Jake
----
The Csound Blog
http://www.thumbuki.com/csound/blog
Cambiata wrote:
>
> Hi!
>
> In my project I'm compiling a new wave file from fragments of source wav
> files.
> The problem is that this that using parts of source files sometimes causes
> audiable clicks (when cutting through an wave peak, i guess).
>
> Is there a way to avoid this?
> Maybe implementing some kind of amplitude envelope?
>
> This is a typical instrument from my ORC file:
>
> instr 60
> ivol = p4
> ipan = p5 * 1.570796327
> aleft, aright diskin "Grand/80/60.wav", 1
> aleft = aleft * ivol * cos(ipan)
> aright = aright * ivol * sin(ipan)
> outs aleft, aright
> endin
>
> This is how I use it now in the SCO file:
>
> ;inst start length vol pan
> i60 0 1 1 0
> i62 2 2 1 1
> i64 4 4 .5 .5
> i65 6 1 .2 0
>
> Ideas? Solutions?
> Thank you in advance!
>
> Jonas
>
>
--
View this message in context: http://www.nabble.com/Newbee%3A-Avoiding-click-when-mixing-fagments-of-wav-files--tf4221174.html#a12008544
Sent from the Csound - General mailing list archive at Nabble.com. |