[Csnd] Defining macros

At present macros can only be defined in the orc, score or the
command line. There has been a request for macro definitions to be
allowed in .csound6rc (and also in .csound7rc) file.

Can anyone see any objection? I have code that appears to work but I
suspect there was a reason for this as it is deliberate in the code.

==John ffitch

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

Only issue that comes to my mind is portability. Would that matter?

Richard Dobson

I think it is OK in that way.. csound?rc is done first so is low priority.

⁣​

Trying to frame this in my head to understand, it’s kind of curious to put macros at the system level (.csound6rc) vs project-level (i.e, CsOptions) or at run-time (command-line). Do macros get overridden if a user sets it in .csound6rc then sets it on command-line?

I believe that macros afe pushed ionto a list; when it ids called there is a linear search so if defined twice the second oned id used. This is exploited in dealing with arhguments to macros which can be recursive.

I assue the desire for macros defined in .csound?rc is to have sme renaming of opcodes for ones musical language. I suspect itv is harmless.

==John ff

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here