[Csnd] Envelope for sampler / declick

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

[Csnd] Envelope for sampler / declick

Roger Kelly-2
Does anyone have a recommendation for how to handle a "key release"/Note off when playing a sample?

Everything seems to cause an audible "click" when the key release happens.  I tried xtratim with lots of various line, linen, etc.


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] Envelope for sampler / declick

Tim Mortimer
at a guess ...

i suggest there is some sort of reinitialisation happening that can either be bypassed with tie / negative p3 combinations ...

http://csoundjournal.com/2005fall/tiedNotes.html

or passing the appropriate "skip reinit" message to the relevant opcode parameter (if it has such a parameter ...) ... i.e. your table reader or phasor or whatever it is paying the sample ...


Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Envelope for sampler / declick

Steven Yi
In reply to this post by Roger Kelly-2
Hi Roger,

I tend to use xtratim + release together with custom envelope
generators these days, but any of the -r envelope generator opcodes
should work well:

http://csound.github.io/docs/manual/linsegr.html
http://csound.github.io/docs/manual/expsegr.html
http://csound.github.io/docs/manual/transegr.html
http://csound.github.io/docs/manual/madsr.html
http://csound.github.io/docs/manual/mxadsr.html

Of these, I liked using transegr in the past so that one could have
linear or convex kind of attack and exponential/concave decay and
release. I'd probably try madsr and mxadsr first, which should solve
your click problem, then work out which envelope generators works best
for you.

All best!
steven





On Mon, Aug 28, 2017 at 4:33 PM, Roger Kelly <[hidden email]> wrote:

> Does anyone have a recommendation for how to handle a "key release"/Note off
> when playing a sample?
>
> Everything seems to cause an audible "click" when the key release happens.
> I tried xtratim with lots of various line, linen, etc.
>
>
> 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] Envelope for sampler / declick

thorin kerr
In reply to this post by Roger Kelly-2
Also worth checking if there's a bit of DC offset in the sample. In theory a good envelope would fix that too, but I've found an offset just makes it harder to get it right.

On 29 Aug 2017 6:34 AM, "Roger Kelly" <[hidden email]> wrote:
Does anyone have a recommendation for how to handle a "key release"/Note off when playing a sample?

Everything seems to cause an audible "click" when the key release happens.  I tried xtratim with lots of various line, linen, etc.


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] Envelope for sampler / declick

Roger Kelly
Thanks all for the input.  I found that expseg with xtratim helped quite a bit along with setting the ksmps much much lower. It is close to acceptable now.

Gonna keep trying the above methods also.

On Mon, Aug 28, 2017 at 7:48 PM, thorin kerr <[hidden email]> wrote:
Also worth checking if there's a bit of DC offset in the sample. In theory a good envelope would fix that too, but I've found an offset just makes it harder to get it right.

On 29 Aug 2017 6:34 AM, "Roger Kelly" <[hidden email]> wrote:
Does anyone have a recommendation for how to handle a "key release"/Note off when playing a sample?

Everything seems to cause an audible "click" when the key release happens.  I tried xtratim with lots of various line, linen, etc.


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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Envelope for sampler / declick

Tim Mortimer
ahh ...

random thought. i have also had problems getting envelopes to close out properly if i haven't completed the termination slightly prior to the actual p3 time ...

i.e. allowing at least 1 kr cycle for the envelope to completely resolve its trajectory (perhaps there can be minor float-type errors or something ...)

'terminate slightly early' is always a general principle i follow now with terminating envelopes ... & then extend the final 0 at the end for the 0.005 secs or so just to be safe & ensure 'full closure' ...

again, another reason i prefer to have separate note on / note off response management via midiin opcode, transmitting to a second instrument with:
* negative p3 duration on note on, &
* fixed release time with tied event management for note off ...

(i apologise, that particular application of negative p3 & tiestatus i don't think is actually spelled out in Stevens article from 2006 ... but the mechanism for implementing the tie & goto command sequence is ...)