Csound Csound-dev Csound-tekno Search About

[Csnd] Defining macros

Date2023-08-23 16:39
FromJohn ff
Subject[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
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2023-08-24 09:43
FromRichard Dobson
SubjectRe: [Csnd] Defining macros
Only issue that comes to my mind is portability. Would that matter?

Richard Dobson


On 23/08/2023 16:39, John ff wrote:
> 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
>          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

Date2023-08-24 13:44
FromJohn ff
SubjectRe: [Csnd] Defining macros
I think it is OK in that way.. csound?rc is done first so is low priority. 

⁣​

On 24 Aug 2023, 09:44, at 09:44, Richard Dobson  wrote:
>Only issue that comes to my mind is portability. Would that matter?
>
>Richard Dobson
>
>
>On 23/08/2023 16:39, John ff wrote:
>> 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
>>          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

Date2023-08-24 15:00
FromSteven Yi
SubjectRe: [Csnd] Defining macros
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? 

On Thu, Aug 24, 2023 at 8:45 AM John ff <jpff@codemist.co.uk> wrote:
I think it is OK in that way.. csound?rc is done first so is low priority.

⁣​

On 24 Aug 2023, 09:44, at 09:44, Richard Dobson <richard@rwdobson.com> wrote:
>Only issue that comes to my mind is portability. Would that matter?
>
>Richard Dobson
>
>
>On 23/08/2023 16:39, John ff wrote:
>> 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
>>          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

Date2023-08-24 17:10
Fromjohn
SubjectRe: [Csnd] Defining macros
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
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here