[Csnd] chnget with function syntax?

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

[Csnd] chnget with function syntax?

Dave Seidel
I am working on a csd with a bunch of control channels, and when I switched from

k1 chnget "foo"

to

k1 = chnget("foo")

it stopped working. I've experienced this with a few other opcodes as well Is there a list somewhere of opcode that don't work with function syntax? I understand that opcodes with multiple outputs are not expected to work, but chnget doesn't seem to fall into that category. 

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] chnget with function syntax?

Victor Lazzarini
chnget:k(…)
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 4 Mar 2017, at 16:39, Dave Seidel <[hidden email]> wrote:
>
> I am working on a csd with a bunch of control channels, and when I switched from
>
> k1 chnget "foo"
>
> to
>
> k1 = chnget("foo")
>
> it stopped working. I've experienced this with a few other opcodes as well Is there a list somewhere of opcode that don't work with function syntax? I understand that opcodes with multiple outputs are not expected to work, but chnget doesn't seem to fall into that category.
>
> - Dave
>
> --
> http://mysterybear.net
> https://soundcloud.com/mysterybear
> https://mysterybear.bandcamp.com
> 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] chnget with function syntax?

akjmicro
In reply to this post by Dave Seidel
Dave, now that you mention it: I'm curious why multiple outputs couldn't be designed to work, a la Python?

In Python, you can have a function that returns a tuple or list, etc. etc.

e.g.:

alpha, beta = myfunction(gamma, theta)



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

On Sat, Mar 4, 2017 at 10:39 AM, Dave Seidel <[hidden email]> wrote:
I am working on a csd with a bunch of control channels, and when I switched from

k1 chnget "foo"

to

k1 = chnget("foo")

it stopped working. I've experienced this with a few other opcodes as well Is there a list somewhere of opcode that don't work with function syntax? I understand that opcodes with multiple outputs are not expected to work, but chnget doesn't seem to fall into that category. 

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] chnget with function syntax?

Victor Lazzarini
in this case, because both

k1 = ivar

and

k1 = kvar

are valid, the compiler can’t tell which one of polymorphic opcode forms
the user wants and falls back to chnset:i(). So we need the type hint.

========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 4 Mar 2017, at 16:51, Aaron Krister Johnson <[hidden email]> wrote:
>
> Dave, now that you mention it: I'm curious why multiple outputs couldn't be designed to work, a la Python?
>
> In Python, you can have a function that returns a tuple or list, etc. etc.
>
> e.g.:
>
> alpha, beta = myfunction(gamma, theta)
>
>
>
> Aaron Krister Johnson
> http://www.untwelve.org
>
> On Sat, Mar 4, 2017 at 10:39 AM, Dave Seidel <[hidden email]> wrote:
> I am working on a csd with a bunch of control channels, and when I switched from
>
> k1 chnget "foo"
>
> to
>
> k1 = chnget("foo")
>
> it stopped working. I've experienced this with a few other opcodes as well Is there a list somewhere of opcode that don't work with function syntax? I understand that opcodes with multiple outputs are not expected to work, but chnget doesn't seem to fall into that category.
>
> - Dave
>
> --
> http://mysterybear.net
> https://soundcloud.com/mysterybear
> https://mysterybear.bandcamp.com
> 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] chnget with function syntax?

jpff
In reply to this post by akjmicro
If we rewrote the entire parser and engine it should be possible.  You got a spare year or two,?

Sent from TypeApp
On 4 Mar 2017, at 16:51, Aaron Krister Johnson <[hidden email]> wrote:
Dave, now that you mention it: I'm curious why multiple outputs couldn't be designed to work, a la Python?

In Python, you can have a function that returns a tuple or list, etc. etc.

e.g.:

alpha, beta = myfunction(gamma, theta)



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

On Sat, Mar 4, 2017 at 10:39 AM, Dave Seidel <[hidden email]> wrote:
I am working on a csd with a bunch of control channels, and when I switched from

k1 chnget "foo"

to

k1 = chnget("foo")

it stopped working. I've experienced this with a few other opcodes as well Is there a list somewhere of opcode that don't work with function syntax? I understand that opcodes with multiple outputs are not expected to work, but chnget doesn't seem to fall into that category. 

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] chnget with function syntax?

Steven Yi

Well the x,y = opcodes() does work in the parser3 branch.


On Sat, Mar 4, 2017, 12:16 PM John ff <[hidden email]> wrote:
If we rewrote the entire parser and engine it should be possible.  You got a spare year or two,?

Sent from TypeApp
On 4 Mar 2017, at 16:51, Aaron Krister Johnson <[hidden email]> wrote:
Dave, now that you mention it: I'm curious why multiple outputs couldn't be designed to work, a la Python?

In Python, you can have a function that returns a tuple or list, etc. etc.

e.g.:

alpha, beta = myfunction(gamma, theta)



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

On Sat, Mar 4, 2017 at 10:39 AM, Dave Seidel <[hidden email]> wrote:
I am working on a csd with a bunch of control channels, and when I switched from

k1 chnget "foo"

to

k1 = chnget("foo")

it stopped working. I've experienced this with a few other opcodes as well Is there a list somewhere of opcode that don't work with function syntax? I understand that opcodes with multiple outputs are not expected to work, but chnget doesn't seem to fall into that category. 

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
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] chnget with function syntax?

Dave Seidel
In reply to this post by Victor Lazzarini
Thanks, Victor!

On Sat, Mar 4, 2017 at 11:49 AM, Victor Lazzarini <[hidden email]> wrote:
chnget:k(…)
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 4 Mar 2017, at 16:39, Dave Seidel <[hidden email]> wrote:
>
> I am working on a csd with a bunch of control channels, and when I switched from
>
> k1 chnget "foo"
>
> to
>
> k1 = chnget("foo")
>
> it stopped working. I've experienced this with a few other opcodes as well Is there a list somewhere of opcode that don't work with function syntax? I understand that opcodes with multiple outputs are not expected to work, but chnget doesn't seem to fall into that category.
>
> - Dave
>
> --
> http://mysterybear.net
> https://soundcloud.com/mysterybear
> https://mysterybear.bandcamp.com
> 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