Sorry, I've jumped into this discussion a little late. I'd like to see something like this. One obstacle to this is that there is a different syntax for expressions in orc macros from that in sco macros. If someone were to take on such an overhall, I'd encourage them to include some error-handling. A few years ago there was some discussion of switching to the C-preprocessor... Cheers, Brian > ----- Original Message ----- > From: "Jacob Joaquin" > To: csound@lists.bath.ac.uk > Subject: [Csnd] Re: about Macros > Date: Fri, 15 Feb 2008 09:48:05 -0800 (PST) > > > > Universal macros certainly have my vote. Something like: > > # definecsd sinewave # 1 # > > > However, there is a way to define macros in one place and have them be used > by both the orchestra and score. I put all my macros in a separate file, > and then use the include statement in both the orchestra and score. Saves > me a lot of time. Here's an (untested) example: > > > > /* -------- foo.csmacro -------- */ > > # define sinewave # 1 # > # define squaretone # 2 # > > > /* --------- foo.csd -------- */ > > > > sr = 44100 > kr = 4410 > ksmps = 10 > nchnls = 1 > > # include "./foo.csmacro" > > instr $sinewave > ; stuff goes here > endin > > instr $squaretone > ; stuff goes here > endin > > > > # include "./foo.csmacro" > > i $sinewave 0 1 440 > i $squaretone 1 4 880 > > > > > Hope this helps. > > Best, > Jake > ---- > The Csound Blog > http://www.thumbuki.com/csound/blog/ > > > > k_o_m_p wrote: > > > > I'm not sure if there are many persons using Macros, but now that we have > > the CSD-File wouldn't make sense to have only one definition for the macro > > instead of separated orc and sco macros? > > > > - Luis > > > > -- > View this message in context: > http://www.nabble.com/about-Macros-tp15504252p15505032.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body > "unsubscribe csound" >