Use Non-Frames Version Previous Page Next Page
Instrument Control: Macros

#include

    #include  "filename"

Description

It is sometimes convenient to have the orchestra arranged in a number of files, for example with each instrument in a separate file. This style is supported by the #include facility which is part of the macro system. A line containing the text

  #include "filename"

where the character " can be replaced by any suitable character. For most uses the double quote symbol will probably be the most convenient. The file name can include a full path.

This takes input from the named file until it ends, when input reverts to the previous input. There is currently a limit of 20 on the depth of included files and macros.

Another suggested use of #include would be to define a set of macros which are part of the composer's style.

An extreme form would be to have each instrument defines as a macro, with the instrument number as a parameter. Then an entire orchestra could be constructed from a number of #include statements followed by macro calls.

  #include "clarinet"
  #include "flute"
  #include "bassoon"
  $CLARINET(1)
  $FLUTE(2)
  $BASSOON(3)

It must be stressed that these changes are at the textual level and so take no cognizance of any meaning.

Author

John ffitch
University of Bath/Codemist Ltd.
Bath, UK
April, 1998 (New in Csound version 3.48)


Use Non-Frames Version Previous Page Next Page
Instrument Control: Macros