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

CtkNote : CtkNode : CtkObj : Object
ExtensionExtension

A note prototyping object
Source: CTK.sc
 

Description

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

CtkNotes are most easily created through the use of CtkProtoNotes and CtkSynthDef (CtkNoteObjects). Rarely will you create them directly (since it would be difficult to enable all of the functionality available). Examples below show the intended use.

In addition, getter and setter arguments are created for each instance of CtkNote based on the SynthDef's arguments.

Class Methods

CtkNote.new(starttime: 0.0, duration, addAction: 0, target: 1, server, synthdefname, noMaps)

Note: This is not the usual way of creating new instances of CtkNotes. New instances are best created through instances of CtkNoteObject or CtkProtoNotes (see the examples)

Arguments:

starttime

In NRT or CtkScore rendering mode, the starttime of an CtkNote event. In real-time mode, this parameter will schedule the event for starttime seconds in the future.

duration

If not nil, schedules the release of an CtkNote (works in both real-time and non-real-time)

addAction

A symbol (\head, \tail, \before, \after or \replace) or an addAction id (see Server Command Reference: /s_new for a more in-depth description)

target

A node ID (synth or group) or an instance of CtkGroup or CtkNote

server

The server to execute the node on. Defaults to Server.default for real-time performance

synthdefname
noMaps

Returns:

an instance of CtkNote

Discussion:

Intended use - creating CtkNote from CtkSynthDef or CtkProtoNotes

Inherited class methods

Instance Methods

.play(group)

Play an instance of CtkNote, for real-time use.

NOTE: In order to ensure proper timing of scheduled events, CTK sends messages to the server as OSC bundles with a default latency of 0.1s (see Scheduling and Server timing). This is settable in CtkObj: *latency class variable. When CTK messages are meant to be set in real-time using input interfaces (MIDI, GUI etc), setting the CtkObj: *latency to 0 will result in processing the messages as soon as possible (but printing the "late" messages from the server as well).

Arguments:

group

Schedule with a given group.

.release(time, key: 'gate')

From superclass: CtkNode

Releases CtkNote by setting its 'key' argument to 0.

Arguments:

time

In real-time mode,'time' schedules the release in the future (in seconds). In non-real-time mode, a message to release an instance of CtkNote is created at CtkNotes starttime + time.

key

'key' defaults to \gate for use in sustained envelopes.

.free(time: 0.0, addMsg: true)

From superclass: CtkNode

frees an instance of CtkNote.

Arguments:

time

In real-time mode, 'time' schedules the freeing of a node in the future. In non-real-time mode, a message to free the node is created at starttime + time.

addMsg

Add a message to send to the server.

.addTo(aCtkScore)

From superclass: CtkObj

Add this object to a CtkScore

Arguments:

aCtkScore

An instance of CtkScore

.args

.args = argdict

show the args

Arguments:

argdict

Returns:

CtkNote's args

Inherited instance methods

Undocumented instance methods

.defName

Examples

Real-time uses

Examples that create new instances of a CtkNote directly from CtkProtoNotes

CtkScore examples

Examples that populate an instance of CtkScore. The CtkScore can then be rendered in NRT, played or saved as a file. See CtkScore for more examples.