r statementrepeat statementr Statement (Repeat Statement)r
Starts a repeated section.
Description
Starts a repeated section, which lasts until the next s, r or e statement.
Syntaxr p1 p2Initializationp1 -- Number of times to repeat the section.
p2 -- Macro(name) to advance with each repetition (optional).
Performance
In order that the sections may be more flexible than simple editing, the macro named p2 is given the value of 1 for the first time through the section, 2 for the second, and 3 for the third. This can be used to change p-field parameters, or ignored.
Warning
Because of serious problems of interaction with macro expansion, sections must start and end in the same file, and not in a macro.
Examples
Here is an example of the r statement. It uses the file r.csd.
Example of the r statement.See AlsoScore StatementsCreditsAuthor: &namejohn;University of Bath/Codemist Ltd.Bath, UKApril, 1998New in Csound version 3.48Example written by &namekevin;