Home Reference Source
public class | source

SCSynthDef

Extends:

dryadic~Dryad → SCSynthDef

Compile a SynthDef from sclang source code

synthDef is set in the context for children Dryads to access. It is an object:

  • .name
  • .bytes
  • .synthDesc object with descriptive meta data

synthDefName is set in context for children Dryads

options:

  • source - sclang source code to compile
  • compileFrom - path of .scd file to compile
  • watch - watch compileFrom file and recompile on changes
  • saveToDir - path to save compiled .scsyndef to after compiling
  • loadFrom - path of .scsyndef file to load to server

Method Summary

Public Methods
public

add(): *

public

compileFrom(context: *, sourcePath: *): *

Returns a Promise for a SynthDef result object: name, bytes, synthDesc

public

compileSource(context: *, sourceCode: *): *

Returns a Promise for a SynthDef result object: name, bytes, synthDesc

public
public

putSynthDef(context: *, synthDefName: *, synthDesc: *)

public

remove(): *

public

If there is no SCLang in the parent context, then this will wrap itself in an SCLang (language interpreter).

Public Methods

public add(): * source

Return:

*

public compileFrom(context: *, sourcePath: *): * source

Returns a Promise for a SynthDef result object: name, bytes, synthDesc

Params:

NameTypeAttributeDescription
context *
sourcePath *

Return:

*

public compileSource(context: *, sourceCode: *): * source

Returns a Promise for a SynthDef result object: name, bytes, synthDesc

Params:

NameTypeAttributeDescription
context *
sourceCode *

Return:

*

public prepareForAdd(): * source

Return:

*

public putSynthDef(context: *, synthDefName: *, synthDesc: *) source

Params:

NameTypeAttributeDescription
context *
synthDefName *
synthDesc *

public remove(): * source

Return:

*

public requireParent(): string source

If there is no SCLang in the parent context, then this will wrap itself in an SCLang (language interpreter).

Return:

string