[Csnd] Re: Re: Orch/sco MACRO?
Date | 2011-01-01 23:57 |
From | "Art Hunkins" |
Subject | [Csnd] Re: Re: Orch/sco MACRO? |
This is a user-defined performance situation, so I'd like to: 1) keep to a single file for simplicity's sake; 2) have all the macros in one place (toward the beginning of the file), all of them being preset by users on a potentially per-performance basis. So, would the following work? in header: define DUR #360# ; overall duration in 2 instruments: instr 1 event_i "i" 5 0 $DUR instr 5 linseg 0, .5, $DUR -1, .5, 0 in score: i1 0 .1 ----- Original Message ----- From: |
Date | 2011-01-02 09:52 |
From | "Colman O'Reilly" |
Subject | [Csnd] Re: Re: Re: Orch/sco MACRO? |
Awesome - that is a very useful way of handling things, and I reworked my example to get it the way I think you (Art) want it. You need two files, the CSD, and a separate text file with a ".inc" extension (this might not be mandatory, but the example I found online used it). I have a file called "test.inc" containing just this text kept in the same folder as the CSD: #define MACRO #440# And my CSD is as follows: <CsoundSynthesizer> <CsOptions> </CsOptions> <CsInstruments> #include "test.inc" instr 1 a1 oscil 10000, $MACRO, 1 out a1 endin instr 2 a1 oscil 10000, p4, 1 out a1 endin </CsInstruments> <CsScore> #include "test.inc" f1 0 4096 10 1 i1 0 1 i2 2 1 $MACRO </CsScore> </CsoundSynthesizer>
I'm pretty sure that's the syntax for what you were after? C On Sat, Jan 1, 2011 at 6:57 PM, Art Hunkins <abhunkin@uncg.edu> wrote: This is a user-defined performance situation, so I'd like to: 1) keep to a single file for simplicity's sake; 2) have all the macros in one place (toward the beginning of the file), all of them being preset by users on a potentially per-performance basis. -- Colman O'Reilly | colmanoreilly@gmail.com | www.colmanoreilly.com
|