Csound Csound-dev Csound-tekno Search About

[Csnd] 'Click' on tied note

Date2017-09-29 08:07
Fromsjakops
Subject[Csnd] 'Click' on tied note
Dear group, I have a little issue with tied notes.. in the code below I am
hearing a 'click' sound when the tied note begins (at time 1). The click is
audible if I use a 'clean' (sine-like) sound. I can make the click go away
by moving the 'tie2' label down after the 'out' statement, but then the
release envelope is cut short! (why is that?)
I hope someone can give a solution or a workaround for this.
Best regards,
Søren



-odac


sr = 44100
kr = 441
nchnls = 2
0dbfs = 1
instr 1
             tigoto      tie1
irate        init        p4
             tie1:
krate        linseg      irate, 0.2, p4
             tigoto      tie2
al, ar       loscil      0.5, krate, 2, 1
             tie2:
aenv         madsr       0.0001, 0.0001, 1, 1
             out        al * aenv, ar * aenv
endin


f 2 0 0 1 "tone.wav" 0 0 0
i  1.0 0 -1 1.4
i  1.0 1 -1 1.0
i -1.0 2 -1
i  1.0 2 -1 1.4
i -1.0 3 -1
e 3






--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-10-03 20:09
FromSteven Yi
SubjectRe: [Csnd] 'Click' on tied note
Hi Søren,

My guess is that madsr is being reinitialized in the original form,
which would reset the envelope to the start and cause a click.  That
is my guess at least, in looking at the code and the behavior you
mentioned in moving tie2:

steven


On Fri, Sep 29, 2017 at 4:07 AM, sjakops  wrote:
> Dear group, I have a little issue with tied notes.. in the code below I am
> hearing a 'click' sound when the tied note begins (at time 1). The click is
> audible if I use a 'clean' (sine-like) sound. I can make the click go away
> by moving the 'tie2' label down after the 'out' statement, but then the
> release envelope is cut short! (why is that?)
> I hope someone can give a solution or a workaround for this.
> Best regards,
> Søren
>
> 
> 
> -odac
> 
> 
> sr = 44100
> kr = 441
> nchnls = 2
> 0dbfs = 1
> instr 1
>              tigoto      tie1
> irate        init        p4
>              tie1:
> krate        linseg      irate, 0.2, p4
>              tigoto      tie2
> al, ar       loscil      0.5, krate, 2, 1
>              tie2:
> aenv         madsr       0.0001, 0.0001, 1, 1
>              out        al * aenv, ar * aenv
> endin
> 
> 
> f 2 0 0 1 "tone.wav" 0 0 0
> i  1.0 0 -1 1.4
> i  1.0 1 -1 1.0
> i -1.0 2 -1
> i  1.0 2 -1 1.4
> i -1.0 3 -1
> e 3
> 
> 
>
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-10-04 14:51
FromSøren Jakobsen
SubjectRe: [Csnd] 'Click' on tied note
Hi Steven, thanks for the tip, that seems indeed to be the issue. And
I luckily found a way to preserve the release envelope (not using
madsr) by using xtratim.
Best regards,
Søren

On 10/3/17, Steven Yi  wrote:
> Hi Søren,
>
> My guess is that madsr is being reinitialized in the original form,
> which would reset the envelope to the start and cause a click.  That
> is my guess at least, in looking at the code and the behavior you
> mentioned in moving tie2:
>
> steven
>
>
> On Fri, Sep 29, 2017 at 4:07 AM, sjakops  wrote:
>> Dear group, I have a little issue with tied notes.. in the code below I
>> am
>> hearing a 'click' sound when the tied note begins (at time 1). The click
>> is
>> audible if I use a 'clean' (sine-like) sound. I can make the click go
>> away
>> by moving the 'tie2' label down after the 'out' statement, but then the
>> release envelope is cut short! (why is that?)
>> I hope someone can give a solution or a workaround for this.
>> Best regards,
>> Søren
>>
>> 
>> 
>> -odac
>> 
>> 
>> sr = 44100
>> kr = 441
>> nchnls = 2
>> 0dbfs = 1
>> instr 1
>>              tigoto      tie1
>> irate        init        p4
>>              tie1:
>> krate        linseg      irate, 0.2, p4
>>              tigoto      tie2
>> al, ar       loscil      0.5, krate, 2, 1
>>              tie2:
>> aenv         madsr       0.0001, 0.0001, 1, 1
>>              out        al * aenv, ar * aenv
>> endin
>> 
>> 
>> f 2 0 0 1 "tone.wav" 0 0 0
>> i  1.0 0 -1 1.4
>> i  1.0 1 -1 1.0
>> i -1.0 2 -1
>> i  1.0 2 -1 1.4
>> i -1.0 3 -1
>> e 3
>> 
>> 
>>
>>
>>
>>
>> --
>> Sent from:
>> http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here