CtkScore:
Filter:
Classes (extension) | Libraries > CTK

CtkScore : CtkObj : Object
ExtensionExtension

Score of OSC commands for non-real-time rendering, used with CTK objects
Source: CTK.sc
 

Description

Part of the Composer's Tool Kit (CTK) system. See CTK for more details.

CtkScore enables rendering Scores with CTK objects. Examples below show how to populate an instance of CtkScore. The CtkScore can then be rendered in non-real-time (NRT), played or saved as a file. See also Non-Realtime Synthesis (NRT).

Class Methods

CtkScore.new( ... events)

Crete new instance of a CtkScore. Any number of initial events may be passed in at creation time.

Arguments:

... events

Events are instances of CtkNote, CtkGroup, CtkBuffer, CtkEvent, CtkControl or another CtkScore.

Inherited class methods

Instance Methods

.add( ... events)

Add events to the score. Any number of events may be added.

Arguments:

... events

Events are instances of CtkNote, CtkGroup, CtkBuffer, CtkEvent, CtkControl or another CtkScore.

.write(path, duration, sampleRate: 44100, headerFormat: "AIFF", sampleFormat: "int16", options, action, inputFilePath, oscFilePath)

Renders the CtkScore in non-real-time (NRT) mode

Arguments:

path

The output file path.

duration

The duration of the score. This defaults to 'nil' which will render the entire CtkScore.

sampleRate

The sample rate of the output file.

headerFormat

See SoundFile: -headerFormat

sampleFormat

See SoundFile: -sampleFormat

options

An instance of ServerOptions. This is useful e.g. for specifying number of channels in the output file: ServerOptions.new.numOutputBusChannels_(2)

action

A function to be evaluated once the NRT server has finished rendering its score.

inputFilePath

An optional path for an input soundfile.

oscFilePath

An optional path to which the binary OSC file will be written.

.play(server, clock, quant: 0.0, startPoint: 0.0, endPoint: -1.0)

Plays this instance of CtkScore in real-time (RT) on the server.

NOTE: When CtkScore.play is called, the CtkScore is rendered fully before performance starts which may cause a delay. Events that are instances of CtkBuffer are also allocated to the Server before performance starts to ensure they are ready for use. This, too, may cause a delay.

Arguments:

server

The sever on which to play the score.

clock

An optional clock and quant to be used as a tempo base.

quant
startPoint
endPoint

.score

Returns:

the Score that is created as part of CtkScore.

.copy

Make a copy of this score

Returns:

a copy of this score

.offset(duration)

Set an offset for this score, useful whem mergin multiple scores

Arguments:

duration

Offset in seconds

.saveToFile(path)

Saves the Score associated with this instance of CtkScore.

Arguments:

path

'path' to save to

.items

Returns:

An array of all events in the CtkScore.

Inherited instance methods

Undocumented instance methods

.checkEndTime(event)

.collectReleases(noteCollect)

.concatScores(aScore)

.getNotes(aCtkControl)

.grabEvents(thesegroups, thesenotes, thesecontrols, thesebuffers, thesemessages)

.id

.id = value

.loadBuffers(server, clock, quant)

.merge(newScore, newScoreOffset: 0)

.notes(sort: true)

.notesAt(time, thresh: 0.0001)

.prepareObjects(rt: false)

Examples