:mod:`sc3nb.sc` =============== .. py:module:: sc3nb.sc .. autoapi-nested-parse:: Contains classes enabling the easy communication with SuperCollider within jupyter notebooks .. !! processed by numpydoc !! Module Contents --------------- Function List ~~~~~~~~~~~~~ .. autoapisummary:: :nosignatures: sc3nb.sc.startup Class List ~~~~~~~~~~ .. autoapisummary:: :nosignatures: sc3nb.sc.SC Content ~~~~~~~ .. py:data:: _LOGGER .. py:function:: 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, kill_others: bool = True, allowed_parents: Sequence[str] = ALLOWED_PARENTS, timeout: float = 10) -> SC Inits SuperCollider (scsynth, sclang) and registers ipython magics :Parameters: **start_server** : bool, optional If True boot scsynth, by default True **scsynth_path** : Optional[str], optional Path of scscynth executable, by default None **start_sclang** : bool, optional If True start sclang, by default True **sclang_path** : Optional[str], optional Path of sclang executable, by default None **magic** : bool, optional If True register magics to ipython, by default True **scsynth_options** : Optional[ServerOptions], optional Options for the server, by default None **with_blip** : bool, optional make a sound when booted, by default True **console_logging** : bool, optional If True write scsynth/sclang output to console, by default False **allowed_parents** : Sequence[str], optional Names of parents that are allowed for other instances of sclang/scsynth processes, by default ALLOWED_PARENTS **timeout** : float, optional timeout in seconds for starting the executable, by default 10 :Returns: SC SuperCollider Interface class. .. !! processed by numpydoc !! .. class:: 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, kill_others: bool = True, allowed_parents: Sequence[str] = ALLOWED_PARENTS, timeout: float = 5) Create a SuperCollider Wrapper object. :Parameters: **start_server** : bool, optional If True boot scsynth, by default True. **scsynth_path** : Optional[str], optional Path of scscynth executable, by default None. **start_sclang** : bool, optional If True start sclang, by default True. **sclang_path** : Optional[str], optional Path of sclang executable, by default None. **scsynth_options** : Optional[ServerOptions], optional Options for the server, by default None. **with_blip** : bool, optional Make a sound when booted, by default True. **console_logging** : bool, optional If True write scsynth/sclang output to console, by default True. **allowed_parents** : Sequence[str], optional Names of parents that are allowed for other instances of sclang/scsynth processes, by default ALLOWED_PARENTS. **timeout** : float, optional timeout in seconds for starting the executables, by default 5 .. !! processed by numpydoc !! .. py:attribute:: default :type: Optional[SC] :value: None Default SC instance. This will be used by all SuperCollider objects if no SC/server/lang is specified. .. !! processed by numpydoc !! .. py:attribute:: _console_logging .. py:attribute:: _server :value: None .. py:attribute:: _sclang :value: None **Overview:** .. autoapisummary:: :nosignatures: sc3nb.sc.SC.get_default sc3nb.sc.SC.start_sclang sc3nb.sc.SC.start_server sc3nb.sc.SC._try_to_connect sc3nb.sc.SC.__del__ sc3nb.sc.SC.__repr__ sc3nb.sc.SC.exit .. py:method:: get_default() -> SC :classmethod: Get the default SC instance :Returns: SC default SC instance :Raises: RuntimeError If there is no default SC instance. .. !! processed by numpydoc !! .. py:method:: start_sclang(sclang_path: Optional[str] = None, console_logging: bool = True, kill_others: bool = True, allowed_parents: Sequence[str] = ALLOWED_PARENTS, timeout: float = 5) Start this SuperCollider language :Parameters: **sclang_path** : Optional[str], optional Path of sclang executable, by default None **console_logging** : bool, optional If True write scsynth/sclang output to console, by default True **allowed_parents** : Sequence[str], optional Names of parents that are allowed for other instances of sclang/scsynth processes, by default ALLOWED_PARENTS **timeout** : float, optional timeout in seconds for starting the executable, by default 5 .. !! processed by numpydoc !! .. py:method:: start_server(scsynth_options: Optional[sc3nb.sc_objects.server.ServerOptions] = None, scsynth_path: Optional[str] = None, console_logging: bool = True, with_blip: bool = True, kill_others: bool = True, allowed_parents: Sequence[str] = ALLOWED_PARENTS, timeout: float = 5) Start this SuperCollider server :Parameters: **scsynth_options** : Optional[ServerOptions], optional Options for the server, by default None **scsynth_path** : Optional[str], optional Path of scscynth executable, by default None **console_logging** : bool, optional If True write scsynth/sclang output to console, by default True **with_blip** : bool, optional make a sound when booted, by default True **allowed_parents** : Sequence[str], optional Names of parents that are allowed for other instances of sclang/scsynth processes, by default ALLOWED_PARENTS **timeout** : float, optional timeout in seconds for starting the executable, by default 5 .. !! processed by numpydoc !! .. py:method:: _try_to_connect() .. py:method:: __del__() .. py:method:: __repr__() -> str .. py:method:: exit() -> None Closes SuperCollider and shuts down server .. !! processed by numpydoc !!