Classes (extension) | Libraries > CTK

CtkSynthDef : CtkNoteObject : Object

A note prototyping system using a CtkNoteObject created from a SynthDef
Source: CTK.sc


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

CtkSynthDef and CtkProtoNotes are the two prototyping classes for creating instances of CtkNote. CtkSynthDef wraps a SynthDef inside a CtkNoteObject.

With CtkSynthDef one creates separate objects for individual SynthDefs, while with CtkProtoNotes one creates a single object storing a group of SynthDefs, accessed by their name.

CtkSynthDef is created similarly to a regular SynthDef, but you don't need to call .load or .send on it.

Class Methods

CtkSynthDef.new(name, ugenGraphFunc, rates, prependArgs, variants)

Create a new instance of a CtkSyntDef.



A String or Symbol (i.e. "name" or \name). This name should be unique.


An instance of Function specifying how the def's UGens are interconnected. See SynthDef for more information.


An optional Array of specifications for the ugenGraphFunc's arguments. The order corresponds to the order of arguments. See the examples below to see how these are used.

A specification can be:

A standard control rate Control is created.
An audio rate AudioControl is created.
a float
the Control will have a lag of the specified time. This can be used to create smooth transitions between different values. t_ and i_ args cannot be lagged.
The Control can be set only at creation ('initial rate'). See discussion above.
The Control is used as a trigger. See discussion above.

An optional Array of objects which will be passed as the first arguments to the ugenGraphFunc when it is evaluated. Arguments which receive values in this way will not be converted to instances of Control. See the wrap example below for an example of how this can be used.


An optional Event containing default argument settings. These can override the defaults specified in the ugenGraphFunc. When creating a Synth a variant can be requested by appending the defName argument in the form 'name.variant' or "name.variant". See example below.


Intended use:

Inherited class methods

Instance Methods

.note(starttime: 0.0, duration, addAction: 0, target: 1, server)

From superclass: CtkNoteObject

This is the default usage. Create a new instance of CtkNote based on the SynthDef contained in this instances of CtkNoteObject. See the CtkNote helpfile for more information and examples.



In non-real-time 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.


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


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


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


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


.args(post: true)

From superclass: CtkNoteObject

get a list of controls and defaults



if 'post' is true, post a list of controls and defaults to the post window.


The Dictionary containing the argument names as keys and default values.

Inherited instance methods