[Cs-dev] functional syntax in manual
Date | 2015-05-11 22:11 |
From | Oeyvind Brandtsegg |
Subject | [Cs-dev] functional syntax in manual |
Just a thought (and even just a half thought thought..), if we should start teaching the functional syntax, maybe the manual should be updated with syntax examples for each opcode? for example in the page for oscil ares oscil xamp, xcps [, ifn, iphs] ares = oscil(xamp,xcps) or something along those lines? -- Oeyvind Brandtsegg Professor of Music Technology NTNU 7491 Trondheim Norway Cell: +47 92 203 205 http://flyndresang.no/ http://www.partikkelaudio.com/ http://soundcloud.com/brandtsegg http://soundcloud.com/t-emp ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2015-05-12 17:21 |
From | Dave Seidel |
Subject | Re: [Cs-dev] functional syntax in manual |
Attachments | None None |
+1 I have recently made the switch and strongly prefer this syntax. Looking forward to being able to use it even more consistently (e.g., with opcodes that return multiple values). On Mon, May 11, 2015 at 5:11 PM, Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no> wrote: Just a thought (and even just a half thought thought..), |
Date | 2015-05-12 17:40 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] functional syntax in manual |
Attachments | None None |
I think you can already use multiple value returns in Csound 6.05 (Steven might confirm this) a1, a2 = opcode(...) What you can't and will probably not be able to do is to use them inline as input to functions. That is one problem that has not got an easy solution, and many languages do not actually allow it. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-05-12 17:44 |
From | Dave Seidel |
Subject | Re: [Cs-dev] functional syntax in manual |
Attachments | None None |
Thanks, Victor, good to know and I will give it a try. I am not concerned about the other case you mention, as it does not tend to enhance readability. - Dave On Tue, May 12, 2015 at 12:40 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2015-05-12 17:50 |
From | Dave Seidel |
Subject | Re: [Cs-dev] functional syntax in manual |
Attachments | None None |
Alas, this is not working yet (I'm on the develop branch, so I would presume post-6.05, and the displayed version is 6.05. The statement aLeft, aRight = pan2(aout, ipan) results in error: syntax error, unexpected '=', expecting T_OPCODE or T_FUNCTION or ',' or '[' (token "= ") from file imaginary_harmony.csd (1) line 124: >>> aLeft, aRight = <<< Unexpected untyped word aRight when expecting a variable On Tue, May 12, 2015 at 12:44 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
|
Date | 2015-05-12 17:50 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] functional syntax in manual |
Attachments | None None |
That's exactly the point. Anyway, I think Steven added the case, but I am not quite sure. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-05-12 17:54 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] functional syntax in manual |
Attachments | None None |
Ah, it must be parser3 then. Csound 7. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-05-12 19:02 |
From | Steven Yi |
Subject | Re: [Cs-dev] functional syntax in manual |
I had to check but it is implemented in the parser3 branch, and has a test file: https://github.com/csound/csound/blob/feature/parser3/tests/commandline/test_multiple_return.csd On Tue, May 12, 2015 at 12:54 PM, Victor Lazzarini |
Date | 2015-05-12 20:53 |
From | Dave Seidel |
Subject | Re: [Cs-dev] functional syntax in manual |
Attachments | None None |
Good to know, thanks. I may try building that branch locally. On Tue, May 12, 2015 at 2:02 PM, Steven Yi <stevenyi@gmail.com> wrote: I had to check but it is implemented in the parser3 branch, and has a test file: |