[Csnd] score macro not working
| Date | 2020-06-05 18:28 |
| From | joachim heintz |
| Subject | [Csnd] score macro not working |
| Attachments | test2.csd |
there is an example of iain mccurdy in the csound floss manual which
used to work, but now i get this error:
defining argument `SCORE``i as...#1#
Undefined macro: '$`SCORE``'defining argument `SCORE``i as...#2#
Undefined macro: '$`SCORE``'sread: illegal opcode $
this is with
--Csound version 6.14 (double samples) May 22 2020
[commit: 3e6c7ab20bfce8bd6f77de2dd91f3e614e991c1b]
the code is attached. is this a bug? or is anything wrong with the score?
best -
joachim
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
|
| Date | 2020-06-05 19:01 |
| From | "Dr. Richard Boulanger" |
| Subject | Re: [Csnd] score macro not working |
in the CsoundQt console, I get the following defining argument `SCORE``i as...#1# Undefined macro: '$`SCORE``'defining argument `SCORE``i as...#2# Undefined macro: '$`SCORE``'sread: illegal opcode $ section 1: at position 1 WARNING: Internal error in print_input_backtrace() remainder of line flushed sread: unexpected char $ section 1: at position 2 WARNING: Internal error in print_input_backtrace() remainder of line flushed sread: illegal use of carry, 0 substituted i . +<= section 1: at position 7 WARNING: Internal error in print_input_backtrace() Clockbase = 17.000000 sread: illegal opcode $ section 1: at position 0 WARNING: Internal error in print_input_backtrace() remainder of line flushed sread: unexpected char $ section 1: at position 2 WARNING: Internal error in print_input_backtrace() remainder of line flushed ... done Dr. Richard Boulanger Professor of Electronic Production and Design Professional Writing and Technology Division Berklee College of Music On Fri, Jun 5, 2020 at 1:28 PM joachim heintz <jh@joachimheintz.de> wrote: there is an example of iain mccurdy in the csound floss manual which |
| Date | 2020-06-05 19:38 |
| From | Pete Goodeve |
| Subject | Re: [Csnd] score macro not working |
| Attachments | None |
| Date | 2020-06-05 20:08 |
| From | Justin Smith |
| Subject | Re: [Csnd] score macro not working |
naively, I'd expect it to expand SCORE, then attempt to expand the expansion (I wouldn't expect that to do anything useful in this example) On Fri, Jun 5, 2020 at 11:38 AM Pete Goodeve |
| Date | 2020-06-05 20:11 |
| From | Kevin Welsh |
| Subject | Re: [Csnd] score macro not working |
I think it was probably an error, but that's just a guess. I recently dug a few of my old cabbages out of the attic, and one or two had the same issue... a stray $$ instead of $ kept everything from working. I found traces of this issue going back to changes made in ~2017: https://forum.cabbageaudio.com/t/effect-shaped-up/47/3 On Fri, Jun 5, 2020 at 2:38 PM Pete Goodeve <pete.goodeve@computer.org> wrote: On Fri, Jun 05, 2020 at 07:28:36PM +0200, joachim heintz wrote: |
| Date | 2020-06-05 21:04 |
| From | joachim heintz |
| Subject | Re: [Csnd] score macro not working |
yes this fixes it. thanks!
j
On 05/06/2020 20:38, Pete Goodeve wrote:
> On Fri, Jun 05, 2020 at 07:28:36PM +0200, joachim heintz wrote:
>> there is an example of iain mccurdy in the csound floss manual which
>> used to work, but now i get this error:
>>
>> defining argument `SCORE``i as...#1#
>> Undefined macro: '$`SCORE``'defining argument `SCORE``i as...#2#
>> Undefined macro: '$`SCORE``'sread: illegal opcode $
>>
>> this is with
>> --Csound version 6.14 (double samples) May 22 2020
>> [commit: 3e6c7ab20bfce8bd6f77de2dd91f3e614e991c1b]
>>
>> the code is attached. is this a bug? or is anything wrong with the score?
>>
>
> I find that it works if I change the "$$i" in the first line of the macro
> to "$i".
>
> The "$$SCORE" lines seem to be OK, but I don't understand the
> double-$ use. I can't find any reference to it in the manual.
>
> -- Pete --
>
> 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 |
| Date | 2020-06-05 21:25 |
| From | Pete Goodeve |
| Subject | Re: [Csnd] score macro not working |
| Attachments | None |
| Date | 2020-06-05 21:40 |
| From | Kevin Welsh |
| Subject | Re: [Csnd] score macro not working |
I'm pretty certain Iain's $$ was an error, easily overlooked prior to 6.09 since csound didn't complain. I know that was my case, and since logically there's no reason for it... seems like a safe assumption. As to why the overall behavior changed, I think jpff@ had done some reworking of macros at the time. I saw this: https://github.com/csound/csound/releases/tag/6.09.0 "Macro names better policed and bracket matching." I seem to vaguely remember a discussion about the changes breaking certain corner cases, but that those corners were usually exposing errors csound had been silent about before so it wasn't a big concern. On Fri, Jun 5, 2020 at 4:26 PM Pete Goodeve |