Loading...
Searching...
No Matches
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.
PUBLIC void | csoundReadScoreAsync (CSOUND *csound, const char *str)
| Asynchronous version of csoundReadScore().
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 void | csoundSetScorePending (CSOUND *, int pending)
| Sets whether Csound score events are performed or not (real-time events will continue to be performed).
PUBLIC MYFLT | csoundGetScoreOffsetSeconds (CSOUND *)
| Returns the score time beginning at which score events will actually immediately be performed (see csoundSetScoreOffsetSeconds()).
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).
PUBLIC void | csoundRewindScore (CSOUND *)
| Rewinds a compiled Csound score to the time specified with csoundSetScoreOffsetSeconds().
PUBLIC void | csoundSetCscoreCallback (CSOUND *, void(*cscoreCallback_)(CSOUND *))
| Sets an external callback for Cscore processing.
PUBLIC int | csoundScoreSort (CSOUND *, FILE *inFile, FILE *outFile)
| Sorts score file 'inFile' and writes the result to 'outFile'.
PUBLIC int | csoundScoreExtract (CSOUND *, FILE *inFile, FILE *outFile, FILE *extractFile)
| Extracts from 'inFile', controlled by 'extractFile', and writes the result to 'outFile'.

## Detailed Description

## Function Documentation

## csoundGetScoreOffsetSeconds()

PUBLIC MYFLT csoundGetScoreOffsetSeconds | ( | CSOUND * |  | ) |

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

References PUBLIC.

## csoundGetScoreTime()

PUBLIC double csoundGetScoreTime | ( | CSOUND * |  | ) |

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

References PUBLIC.

## csoundIsScorePending()

PUBLIC int csoundIsScorePending | ( | CSOUND * |  | ) |

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

References PUBLIC.

## csoundReadScore()

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.

References PUBLIC.

Referenced by CsoundTextEvent::operator()().

## csoundReadScoreAsync()

PUBLIC void csoundReadScoreAsync | ( | CSOUND * | csound,
|  | const char * | str )

Asynchronous version of csoundReadScore().

References PUBLIC.

## csoundRewindScore()

PUBLIC void csoundRewindScore | ( | CSOUND * |  | ) |

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

References PUBLIC.

## csoundScoreExtract()

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.

References PUBLIC.

## csoundScoreSort()

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.

References PUBLIC.

## csoundSetCscoreCallback()

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

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.

References PUBLIC.

## csoundSetScoreOffsetSeconds()

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.

References PUBLIC.

## csoundSetScorePending()

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.

References PUBLIC.