The Alternative Csound Reference Manual
Previous | The Standard Numeric Score | Next

# Multiple File Score

## Description

Using the score in more than one file.

## Syntax

#include "filename"

## Performance

It is sometimes convenient to have the score in more than one file. This use 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.

A suggested use of #include would be to define a set of macros which are part of the composer's style. It could also be used to provide repeated sections.

    s
    #include :section1:
    ;; Repeat that
    s
    #include :section1:

Alternative methods of doing repeats, use the r statement, m statement, and n statement.

## Credits

Author: John ffitch

University of Bath/Codemist Ltd.

Bath, UK

April, 1998 (New in Csound version 3.48)

Thanks to Luis Jure for pointing out the incorrect syntax in multiple file include statement.

Previous | Home | Next
Score Macros | Up | Evaluation of Expressions