[Csnd] 'Click' on tied note

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

[Csnd] 'Click' on tied note

sjakops
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

<CsoundSynthesizer>
<CsOptions>
-odac
</CsOptions>
<CsInstruments>
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
</CsInstruments>
<CsScore>
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
</CsScore>
</CsoundSynthesizer>




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

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] 'Click' on tied note

Steven Yi
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 <[hidden email]> 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
>
> <CsoundSynthesizer>
> <CsOptions>
> -odac
> </CsOptions>
> <CsInstruments>
> 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
> </CsInstruments>
> <CsScore>
> 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
> </CsScore>
> </CsoundSynthesizer>
>
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] 'Click' on tied note

sjakops
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 <[hidden email]> 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 <[hidden email]> 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
>>
>> <CsoundSynthesizer>
>> <CsOptions>
>> -odac
>> </CsOptions>
>> <CsInstruments>
>> 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
>> </CsInstruments>
>> <CsScore>
>> 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
>> </CsScore>
>> </CsoundSynthesizer>
>>
>>
>>
>>
>> --
>> Sent from:
>> http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>>
>> Csound mailing list
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
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