Opus:
Filter:
Classes (extension) | Libraries > Opus

Opus : CtkObj : Object
ExtensionExtension

A project management system to be used with Ctk objects for real-time and non-real-time works or project organization
Source: Opus.sc
  

Description

Opus helps organize projects based around the Composer's Took Kit (Ctk). A hierarchy of folders to manage Ctk objects (CtkNoteObjects, CtkScores, CtkPMods, etc).

Opus represents a folder structure where files reside that contain functions to to generate specific instances of classes. The aim is to make these functions / files as modular as possible so they can be reused in other pieces. The main modes of working are in support of RT / NRT score based work as well as RT Ctk based pieces (incorporating mostly CtkPEvents and CtkPMod).

The Opus object for a project is a common access point for the resources in a project. For instance, the CtkSynthDef objects that are created in from 'synths' folder can be accessed from the instance variable 'synths' (an IdentityDictionary), using the name of the file as the key into the IdentityDictionary.

An Opus project contains the following file hierarchy:

Project Root /

___audioRoute/

______audioIn.scd

______audioOut.scd

___events/

___init/

______init.scd

______kill.scd

___processes/

___scores/

___synths/

___main.scd

When the 'setup' method is called, the instance of Opus, an initial pass of the file hierarchy will iterate over the folders to create instance of Ctk objects for the project. See the method explanation below for more details on the expected structure in these files, and how to generate templates.

Class Methods

Opus.new(path, server, createIfMissing: true)

Create new instance of a Opus.

Arguments:

path

The full path for this project.

server

A server object to use. Defaults to Server.default

createIfMissing

If this project isn't set up at this path, this tells SuperCollider to create it.

Inherited class methods

Instance Methods

.copyToNewOpus(newBasePathName)

Crete a copy of an Opus project to a new path.

Arguments:

newBasePathName

The full path for this copy of the project.

.setup

Called on an instance of Opus to traverse the directory hierarchy from its root folder to create instances of objects to be used. Below is an in-depth explanations

Inherited instance methods

Undocumented instance methods

.addBufferForKey(key, buffer)

.addDataForKey(key, val)

.addEventForKey(key, event)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Event.sc

.addInputForKey(key, audioBus)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+AudioRoute.sc

.addOutputForKey(key, audioBus)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+AudioRoute.sc

.addResourcesToFree( ... args)

.addSynthForKey(key, synth)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Synth.sc

.argsForProcessAtKey(key)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Process.sc

.audioInPath

.audioOutPath

.audioRoutePath

.bufferForKey(key)

.createTemplateAudioInRoute(force: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+AudioRoute.sc

.createTemplateAudioOutRoute(force: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+AudioRoute.sc

.createTemplateEventWithName(name, force: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Event.sc

.createTemplateInitProcess(force: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Init.sc

.createTemplateKillProcess(force: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Init.sc

.createTemplateMain(force: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Main.sc

.createTemplateProcessWithName(name, force: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Process.sc

.createTemplateScoreWithName(name, force: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Score.sc

.createTemplateSynthWithName(name, force: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Synth.sc

.dataForKey(key)

.eventForKey(key)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Event.sc

.eventFromProcess(eventId, pmodKey ... args)

.eventPath

.freeBufferForKey(key, buffer)

.freeBuffers

.freeResources

.id

.initMod

.initMod = value

.initModPath

.inputForKey(key)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+AudioRoute.sc

.killMod

.killMod = value

.killModPath

.loadAudioRoutes(force: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+AudioRoute.sc

.loadEvents

.loadFiles

.loadInitialProcesses

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Init.sc

.loadMain(filePath, force: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Main.sc

.mainFunc

.mainFunc = value

.mainPath

.newEventFromProcess(processID, eventID ... args)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Event.sc

.newScore(scoreID, initScoreFunction ... args)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Score.sc

.onReadyFunc

.onReadyFunc = value

.openEventFile(name)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Event.sc

.openInitFile

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Init.sc

.openKillFile

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Init.sc

.openMain

.openMainFile

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Main.sc

.openProcessFile(name)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Process.sc

.openScoreFile(name)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Score.sc

.openSynthFile(name)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Synth.sc

.outputForKey(key)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+AudioRoute.sc

.path

.pevents

.pevents = value

.prGetBuffers

.prGetData

.prGetEvents

.prGetInputs

.prGetOutputs

.prGetProcesses

.prGetScores

.prGetSynthNames

.prGetSynths

.processesPath

.runMain

.scoresPath

.server

.synthForKey(key)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/Ctk/Ctk classes/Opus/Opus+Synth.sc

.synthPath

Examples

Setup Details (in depth)

The following describes how each file in the different folders is handled, and typical use cases.

audioRoute: audioIn.sc and audioOut.sc

These files both contain an array of arrays that signify audio signal paths to hardware. For inputs: Each secondary array should contain a key to access the input with, and a 0 based index for a channel on the physical device followed by the number of channels. For outpus: Each secondary array should contain a key to access the output with, and a 0 based index for a channel on the physical device followed by the number of channels.

events:

files that contain a function that returns information about a CtkEvent

TODO

init: init.scd and kill.scd

TODO

main.scd:

for RT pieces with CtkPEvents, the main file to exectute when the 'runMain' instance method is called.

processes

TODO

scores

for RT or NRT pieces, files that contain code that return a CtkScore. When the file is evaluated, the instance of Opus and the name of the file is passed in as a Function argument. CtkScores are stored in the IdentityDictionary instance variable 'scores', and can be accessed with the file name as a key.

synths

Synth files should contain a Function that returns a CtkSynthDef. These can be used in your CtkPMods that are created from the Functions created in Opus processes, or referenced for CtkScores. Each file should contain one CtkSynthDef that is the last statement in the file, and it should have a unique name (preferably the sdKey passed in to the Function).