Csound API  6.07
Score Handling

Functions

PUBLIC int csoundReadScore (CSOUND *csound, const char *str)
 Read, preprocess, and load a score from an ASCII string It can be called repeatedly, with the new score events being added to the currently scheduled ones. More...
 
PUBLIC double csoundGetScoreTime (CSOUND *)
 Returns the current score time in seconds since the beginning of performance. More...
 
PUBLIC int csoundIsScorePending (CSOUND *)
 Sets whether Csound score events are performed or not, independently of real-time MIDI events (see csoundSetScorePending()). More...
 
PUBLIC void csoundSetScorePending (CSOUND *, int pending)
 Sets whether Csound score events are performed or not (real-time events will continue to be performed). More...
 
PUBLIC MYFLT csoundGetScoreOffsetSeconds (CSOUND *)
 Returns the score time beginning at which score events will actually immediately be performed (see csoundSetScoreOffsetSeconds()). More...
 
PUBLIC void csoundSetScoreOffsetSeconds (CSOUND *, MYFLT time)
 Csound score events prior to the specified time are not performed, and performance begins immediately at the specified time (real-time events will continue to be performed as they are received). More...
 
PUBLIC void csoundRewindScore (CSOUND *)
 Rewinds a compiled Csound score to the time specified with csoundSetScoreOffsetSeconds(). More...
 
PUBLIC void csoundSetCscoreCallback (CSOUND *, void(*cscoreCallback_)(CSOUND *))
 Sets an external callback for Cscore processing. More...
 
PUBLIC int csoundScoreSort (CSOUND *, FILE *inFile, FILE *outFile)
 Sorts score file 'inFile' and writes the result to 'outFile'. More...
 
PUBLIC int csoundScoreExtract (CSOUND *, FILE *inFile, FILE *outFile, FILE *extractFile)
 Extracts from 'inFile', controlled by 'extractFile', and writes the result to 'outFile'. More...
 

Detailed Description

Function Documentation

PUBLIC MYFLT csoundGetScoreOffsetSeconds ( CSOUND )

Returns the score time beginning at which score events will actually immediately be performed (see csoundSetScoreOffsetSeconds()).

PUBLIC double csoundGetScoreTime ( CSOUND )

Returns the current score time in seconds since the beginning of performance.

PUBLIC int csoundIsScorePending ( CSOUND )

Sets whether Csound score events are performed or not, independently of real-time MIDI events (see csoundSetScorePending()).

PUBLIC int csoundReadScore ( CSOUND csound,
const char *  str 
)

Read, preprocess, and load a score from an ASCII string It can be called repeatedly, with the new score events being added to the currently scheduled ones.

PUBLIC void csoundRewindScore ( CSOUND )

Rewinds a compiled Csound score to the time specified with csoundSetScoreOffsetSeconds().

PUBLIC int csoundScoreExtract ( CSOUND ,
FILE *  inFile,
FILE *  outFile,
FILE *  extractFile 
)

Extracts from 'inFile', controlled by 'extractFile', and writes the result to 'outFile'.

The Csound instance should be initialised before calling this function, and csoundReset() should be called after score extraction to clean up. The return value is zero on success.

PUBLIC int csoundScoreSort ( CSOUND ,
FILE *  inFile,
FILE *  outFile 
)

Sorts score file 'inFile' and writes the result to 'outFile'.

The Csound instance should be initialised before calling this function, and csoundReset() should be called after sorting the score to clean up. On success, zero is returned.

PUBLIC void csoundSetCscoreCallback ( CSOUND ,
void(*)(CSOUND *)  cscoreCallback_ 
)

Sets an external callback for Cscore processing.

Pass NULL to reset to the internal cscore() function (which does nothing). This callback is retained after a csoundReset() call.

PUBLIC void csoundSetScoreOffsetSeconds ( CSOUND ,
MYFLT  time 
)

Csound score events prior to the specified time are not performed, and performance begins immediately at the specified time (real-time events will continue to be performed as they are received).

Can be used by external software, such as a VST host, to begin score performance midway through a Csound score, for example to repeat a loop in a sequencer, or to synchronize other events with the Csound score.

PUBLIC void csoundSetScorePending ( CSOUND ,
int  pending 
)

Sets whether Csound score events are performed or not (real-time events will continue to be performed).

Can be used by external software, such as a VST host, to turn off performance of score events (while continuing to perform real-time events), for example to mute a Csound score while working on other tracks of a piece, or to play the Csound instruments live.