sc3nb.sc

Contains classes enabling the easy communication with SuperCollider within jupyter notebooks

Module Contents

Function List

startup

Inits SuperCollider (scsynth, sclang) and registers ipython magics

Class List

SC

Create a SuperCollider Wrapper object.

Content

sc3nb.sc._LOGGER[source]
sc3nb.sc.startup(start_server: bool = True, scsynth_path: Optional[str] = None, start_sclang: bool = True, sclang_path: Optional[str] = None, magic: bool = True, scsynth_options: Optional[sc3nb.sc_objects.server.ServerOptions] = None, with_blip: bool = True, console_logging: bool = False, allowed_parents: Sequence[str] = ALLOWED_PARENTS, timeout: float = 10) SC[source]

Inits SuperCollider (scsynth, sclang) and registers ipython magics

Parameters:
start_serverbool, optional

If True boot scsynth, by default True

scsynth_pathOptional[str], optional

Path of scscynth executable, by default None

start_sclangbool, optional

If True start sclang, by default True

sclang_pathOptional[str], optional

Path of sclang executable, by default None

magicbool, optional

If True register magics to ipython, by default True

scsynth_optionsOptional[ServerOptions], optional

Options for the server, by default None

with_blipbool, optional

make a sound when booted, by default True

console_loggingbool, optional

If True write scsynth/sclang output to console, by default False

allowed_parentsSequence[str], optional

Names of parents that are allowed for other instances of sclang/scsynth processes, by default ALLOWED_PARENTS

timeoutfloat, optional

timeout in seconds for starting the executable, by default 10

Returns:
SC

SuperCollider Interface class.

class sc3nb.sc.SC(*, start_server: bool = True, scsynth_path: Optional[str] = None, start_sclang: bool = True, sclang_path: Optional[str] = None, scsynth_options: Optional[sc3nb.sc_objects.server.ServerOptions] = None, with_blip: bool = True, console_logging: bool = True, allowed_parents: Sequence[str] = ALLOWED_PARENTS, timeout: float = 5)[source]

Create a SuperCollider Wrapper object.

Parameters:
start_serverbool, optional

If True boot scsynth, by default True.

scsynth_pathOptional[str], optional

Path of scscynth executable, by default None.

start_sclangbool, optional

If True start sclang, by default True.

sclang_pathOptional[str], optional

Path of sclang executable, by default None.

scsynth_optionsOptional[ServerOptions], optional

Options for the server, by default None.

with_blipbool, optional

Make a sound when booted, by default True.

console_loggingbool, optional

If True write scsynth/sclang output to console, by default True.

allowed_parentsSequence[str], optional

Names of parents that are allowed for other instances of sclang/scsynth processes, by default ALLOWED_PARENTS.

timeoutfloat, optional

timeout in seconds for starting the executables, by default 5

default: Optional[SC][source]

Default SC instance.

This will be used by all SuperCollider objects if no SC/server/lang is specified.

Overview:

get_default

Get the default SC instance

start_sclang

Start this SuperCollider language

start_server

Start this SuperCollider server

_try_to_connect

__del__

__repr__

Return repr(self).

exit

Closes SuperCollider and shuts down server

classmethod get_default() SC[source]

Get the default SC instance

Returns:
SC

default SC instance

Raises:
RuntimeError

If there is no default SC instance.

start_sclang(sclang_path: Optional[str] = None, console_logging: bool = True, allowed_parents: Sequence[str] = ALLOWED_PARENTS, timeout: float = 5)[source]

Start this SuperCollider language

Parameters:
sclang_pathOptional[str], optional

Path of sclang executable, by default None

console_loggingbool, optional

If True write scsynth/sclang output to console, by default True

allowed_parentsSequence[str], optional

Names of parents that are allowed for other instances of sclang/scsynth processes, by default ALLOWED_PARENTS

timeoutfloat, optional

timeout in seconds for starting the executable, by default 5

start_server(scsynth_options: Optional[sc3nb.sc_objects.server.ServerOptions] = None, scsynth_path: Optional[str] = None, console_logging: bool = True, with_blip: bool = True, allowed_parents: Sequence[str] = ALLOWED_PARENTS, timeout: float = 5)[source]

Start this SuperCollider server

Parameters:
scsynth_optionsOptional[ServerOptions], optional

Options for the server, by default None

scsynth_pathOptional[str], optional

Path of scscynth executable, by default None

console_loggingbool, optional

If True write scsynth/sclang output to console, by default True

with_blipbool, optional

make a sound when booted, by default True

allowed_parentsSequence[str], optional

Names of parents that are allowed for other instances of sclang/scsynth processes, by default ALLOWED_PARENTS

timeoutfloat, optional

timeout in seconds for starting the executable, by default 5

_try_to_connect()[source]
__del__()[source]
__repr__() str[source]

Return repr(self).

exit() None[source]

Closes SuperCollider and shuts down server