Description Usage Arguments Details
View source: R/createPerformance.R
These functions provide a safe, streamlined, and R-friendly interface to Csound's API, allowing users to pass lists of matrices and vectors to use as parameter data for controlling Csound instruments.
1 2 3 4 5 6 7 8 9 | createPerformance(orcfile, scorefile = NULL, i = NULL, f
= NULL, flags = c("-odac", "-g"), finishPerformance =
TRUE)
performScore(csInstance, i = NULL, f = NULL)
finishPerformance(csInstance)
cleanupCrash()
|
orcfile |
The path of the orchestra file to be used for the performance |
scorefile |
The path of the score file, if any, to be used for the performance. The whole purpose of this function is to feed the score statements to Csound and bypass the need for score files, but this option is provided in any case. |
i |
A list of matrices containing the i statements, one for each instrument included. Each i statement makes an
instrument active at a specific time and for a certain
duration. Its p-fields are interpreted in the order of
the columns of the |
f |
A list of numeric vectors; these create the function tables Csound uses for oscillators and various other uses. |
flags |
A character vector of extra command-line flags to pass to Csound upon compilation of the orchestra. See The Csound Manual's page on the Csound command-line options. |
finishPerformance |
Should the performance be closed after completing the score? If TRUE , the default, cleans up and closes Csound. If FALSE , returns a pointer to a Csound instance that can be used to continue the performance or eventually close it. |
csInstance |
An instance of Csound that can be used to continue or close the current performance. |
createPerformance()
initializes Csound and
compiles the orchestra and allows the rendering of
matrices and vectors as parameter data; it can either
close its instance of Csound or return it, depending on
the value of the argument finishPerformance
.
If left open, one can use the object returned by
createPerformance()
to control Csound and
subsequently add more control data which Csound then
performs immediately with performScore()
. You can
then finish up the performance and close Csound with
finishPerformance()
.
If you encounter an error and cannot run
finishPerformance()
run cleanupCrash
before
doing anything else. Otherwise you may cause a segfault
and crash R.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.