Csound Csound-dev Csound-tekno Search About

[Csnd] A "port2" or "lag" opcode?

Date2019-09-28 17:15
FromAaron Krister Johnson
Subject[Csnd] A "port2" or "lag" opcode?
Hi all,

I am wondering about the possibility of a portamento on a signal that would have independent rise and fall response times.

I don't think such an opcode exists. Given existing opcodes, would this be possible to create as an UDO?

I am willing to try my hand at coding an opcode for a pull request if not.

The desire is for a simple A(S)R envelope that could be triggered from a square gate...and it would have a characteristic convex rise and concave fall. Ideally, wouldn't be an envelope-type opcode, but a filter that could be used as a simple envelope when a control gate is passed into it.

To my knowledge, this would be the only way in Csound to easily get an envelope that truly emulated the response of a classic ASR envelope, outside of using a custom GEN routine paired with something like "oscil1".

Cheers,

AKJ

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

Date2019-09-28 17:19
FromVictor Lazzarini
SubjectRe: [Csnd] A "port2" or "lag" opcode?
There's an UDO implementing this kind of envelope, not sure if exactly like what you're
thinking.

http://www.csounds.com/udo/displayOpcode.php?opcode_id=131

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Sep 2019, at 18:16, Aaron Krister Johnson <akjmicro@gmail.com> wrote:

Hi all,

I am wondering about the possibility of a portamento on a signal that would have independent rise and fall response times.

I don't think such an opcode exists. Given existing opcodes, would this be possible to create as an UDO?

I am willing to try my hand at coding an opcode for a pull request if not.

The desire is for a simple A(S)R envelope that could be triggered from a square gate...and it would have a characteristic convex rise and concave fall. Ideally, wouldn't be an envelope-type opcode, but a filter that could be used as a simple envelope when a control gate is passed into it.

To my knowledge, this would be the only way in Csound to easily get an envelope that truly emulated the response of a classic ASR envelope, outside of using a custom GEN routine paired with something like "oscil1".

Cheers,

AKJ

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

Date2019-09-28 17:41
FromAaron Krister Johnson
SubjectRe: [Csnd] A "port2" or "lag" opcode?
That's cool, but not exactly what I am wanting.

What I really want to be able to do is really a lag or portamento on a control signal, but with independent response times on rising and falling edges.

So, in essence, "port" behavior, but parameters for rise time and fall time half-power curves.

This also implies non-linear (curvature) response.

Best,

AKJ

On Sat, Sep 28, 2019, 11:19 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There's an UDO implementing this kind of envelope, not sure if exactly like what you're
thinking.

http://www.csounds.com/udo/displayOpcode.php?opcode_id=131

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Sep 2019, at 18:16, Aaron Krister Johnson <akjmicro@gmail.com> wrote:

Hi all,

I am wondering about the possibility of a portamento on a signal that would have independent rise and fall response times.

I don't think such an opcode exists. Given existing opcodes, would this be possible to create as an UDO?

I am willing to try my hand at coding an opcode for a pull request if not.

The desire is for a simple A(S)R envelope that could be triggered from a square gate...and it would have a characteristic convex rise and concave fall. Ideally, wouldn't be an envelope-type opcode, but a filter that could be used as a simple envelope when a control gate is passed into it.

To my knowledge, this would be the only way in Csound to easily get an envelope that truly emulated the response of a classic ASR envelope, outside of using a custom GEN routine paired with something like "oscil1".

Cheers,

AKJ

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

Date2019-09-28 17:42
FromAaron Krister Johnson
SubjectRe: [Csnd] A "port2" or "lag" opcode?
I will write a PoC UDO for this, and it will clear what I mean. :)


On Sat, Sep 28, 2019, 11:41 AM Aaron Krister Johnson <akjmicro@gmail.com> wrote:
That's cool, but not exactly what I am wanting.

What I really want to be able to do is really a lag or portamento on a control signal, but with independent response times on rising and falling edges.

So, in essence, "port" behavior, but parameters for rise time and fall time half-power curves.

This also implies non-linear (curvature) response.

Best,

AKJ

On Sat, Sep 28, 2019, 11:19 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There's an UDO implementing this kind of envelope, not sure if exactly like what you're
thinking.

http://www.csounds.com/udo/displayOpcode.php?opcode_id=131

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Sep 2019, at 18:16, Aaron Krister Johnson <akjmicro@gmail.com> wrote:

Hi all,

I am wondering about the possibility of a portamento on a signal that would have independent rise and fall response times.

I don't think such an opcode exists. Given existing opcodes, would this be possible to create as an UDO?

I am willing to try my hand at coding an opcode for a pull request if not.

The desire is for a simple A(S)R envelope that could be triggered from a square gate...and it would have a characteristic convex rise and concave fall. Ideally, wouldn't be an envelope-type opcode, but a filter that could be used as a simple envelope when a control gate is passed into it.

To my knowledge, this would be the only way in Csound to easily get an envelope that truly emulated the response of a classic ASR envelope, outside of using a custom GEN routine paired with something like "oscil1".

Cheers,

AKJ

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

Date2019-09-28 18:32
FromEduardo Moguillansky
SubjectRe: [Csnd] A "port2" or "lag" opcode?

that's exactly what sc_lagud does

On 28.09.19 18:15, Aaron Krister Johnson wrote:
Hi all,

I am wondering about the possibility of a portamento on a signal that would have independent rise and fall response times.

I don't think such an opcode exists. Given existing opcodes, would this be possible to create as an UDO?

I am willing to try my hand at coding an opcode for a pull request if not.

The desire is for a simple A(S)R envelope that could be triggered from a square gate...and it would have a characteristic convex rise and concave fall. Ideally, wouldn't be an envelope-type opcode, but a filter that could be used as a simple envelope when a control gate is passed into it.

To my knowledge, this would be the only way in Csound to easily get an envelope that truly emulated the response of a classic ASR envelope, outside of using a custom GEN routine paired with something like "oscil1".

Cheers,

AKJ

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

Date2019-09-29 18:49
FromOeyvind Brandtsegg
SubjectRe: [Csnd] A "port2" or "lag" opcode?
I think maybe follow does what you describe. IIRC the formula is also in the manual page so you can make a k-rate version of you want. I use this a lot in featexmod. https://github.com/Oeyvind/featexmod 

lør. 28. sep. 2019, 6:42 p.m. skrev Aaron Krister Johnson <akjmicro@gmail.com>:
I will write a PoC UDO for this, and it will clear what I mean. :)


On Sat, Sep 28, 2019, 11:41 AM Aaron Krister Johnson <akjmicro@gmail.com> wrote:
That's cool, but not exactly what I am wanting.

What I really want to be able to do is really a lag or portamento on a control signal, but with independent response times on rising and falling edges.

So, in essence, "port" behavior, but parameters for rise time and fall time half-power curves.

This also implies non-linear (curvature) response.

Best,

AKJ

On Sat, Sep 28, 2019, 11:19 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There's an UDO implementing this kind of envelope, not sure if exactly like what you're
thinking.

http://www.csounds.com/udo/displayOpcode.php?opcode_id=131

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Sep 2019, at 18:16, Aaron Krister Johnson <akjmicro@gmail.com> wrote:

Hi all,

I am wondering about the possibility of a portamento on a signal that would have independent rise and fall response times.

I don't think such an opcode exists. Given existing opcodes, would this be possible to create as an UDO?

I am willing to try my hand at coding an opcode for a pull request if not.

The desire is for a simple A(S)R envelope that could be triggered from a square gate...and it would have a characteristic convex rise and concave fall. Ideally, wouldn't be an envelope-type opcode, but a filter that could be used as a simple envelope when a control gate is passed into it.

To my knowledge, this would be the only way in Csound to easily get an envelope that truly emulated the response of a classic ASR envelope, outside of using a custom GEN routine paired with something like "oscil1".

Cheers,

AKJ

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
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

Date2019-09-30 00:04
FromAaron Krister Johnson
SubjectRe: [Csnd] A "port2" or "lag" opcode?
Beautiful, yes, 'sc_lagud' would work, as does 'follow2', which seems to have the bi-directionality I described (i.e., different lag times for rising and falling input signal directions).

Best,

Aaron Krister Johnson
http://www.untwelve.org


On Sun, Sep 29, 2019 at 12:49 PM Oeyvind Brandtsegg <obrandts@gmail.com> wrote:
I think maybe follow does what you describe. IIRC the formula is also in the manual page so you can make a k-rate version of you want. I use this a lot in featexmod. https://github.com/Oeyvind/featexmod 

lør. 28. sep. 2019, 6:42 p.m. skrev Aaron Krister Johnson <akjmicro@gmail.com>:
I will write a PoC UDO for this, and it will clear what I mean. :)


On Sat, Sep 28, 2019, 11:41 AM Aaron Krister Johnson <akjmicro@gmail.com> wrote:
That's cool, but not exactly what I am wanting.

What I really want to be able to do is really a lag or portamento on a control signal, but with independent response times on rising and falling edges.

So, in essence, "port" behavior, but parameters for rise time and fall time half-power curves.

This also implies non-linear (curvature) response.

Best,

AKJ

On Sat, Sep 28, 2019, 11:19 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There's an UDO implementing this kind of envelope, not sure if exactly like what you're
thinking.

http://www.csounds.com/udo/displayOpcode.php?opcode_id=131

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Sep 2019, at 18:16, Aaron Krister Johnson <akjmicro@gmail.com> wrote:

Hi all,

I am wondering about the possibility of a portamento on a signal that would have independent rise and fall response times.

I don't think such an opcode exists. Given existing opcodes, would this be possible to create as an UDO?

I am willing to try my hand at coding an opcode for a pull request if not.

The desire is for a simple A(S)R envelope that could be triggered from a square gate...and it would have a characteristic convex rise and concave fall. Ideally, wouldn't be an envelope-type opcode, but a filter that could be used as a simple envelope when a control gate is passed into it.

To my knowledge, this would be the only way in Csound to easily get an envelope that truly emulated the response of a classic ASR envelope, outside of using a custom GEN routine paired with something like "oscil1".

Cheers,

AKJ

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
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