No project description provided
Project description
Supercollider Jupyter Kernel
This kernel allows running SuperCollider Code in a Jupyter environment.
Installation
Please make sure one has installed SuperCollider and Python 3 with pip.
-
To install the kernel for Jupyter execute
pip3 install sc-kernel
This will also install Jupyter Lab if it is not already installed on the system.
-
Start a new Jupyter Lab instance by executing
jupyter lab
in a console. -
Click on the SuperCollider icon
If one has not installed SuperCollider in the default location, one has to set a environment variable
called SCLANG_PATH
which points to the sclang executable.
To uninstall the kernel execute
jupyter kernelspec uninstall sc_kernel
Usage
Stop sound
Currently the Cmd + .
command is not binded. Instead create a new cell with a single dot
.
and execute this cell. This will transform the command to CommandPeriod.run;
which is what is actually called on the Cmd + .
press in the IDE.
Recording
sc_kernel
provides an easy way to record audio to the local directory and store it in the notebook
so one can later share the notebook with the sound examples embedded.
Assuming one has started the server, simply execute
%% record "my_file.flac"
{SinOsc.ar(SinOsc.ar(200)*200)*0.2!2}.play;
to start the recording.
To stop the recording, simply stop the Server recording via
s.stopRecording;
If one has chosen FLAC or WAV as file format, one will see a playback menu for the file within the notebook.
If an relative path is provided as filename it will be put relative to the folder where jupyter lab
was executed.
If an absolute path is given the output will be directed to the absolute path.
Keep in mind that good browser support only exists for FLAC and with WAV the seeking does not work. The standard recording format of supercollider AIFF is not supported by browsers.
Autocomplete
Simply push Tab
to see available autocompletions.
Documentation
To display the documentation of a Class, simply prepend a ?
to it and execute it, e.g.
?SinOsc
Development
Any PR is welcome! Please state the changes in an Issue. To contribute, please
-
Fork the repository and clone it to a local directory
-
If one wants to add the kernel to an existing Jupyter installation one can execute
jupyter kernelspec install sc_kernel
and run
jupyter lab
from within the cloned directory as we need to have access tosc_kernel
. -
Run
./run_tests.sh
and make a PR :) The tests often run into a pexpect timeout for some reason. They should pass if they are run alone.
Maintainers
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sc_kernel-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e3386670f9b4ce9cdc06afadb9f58a3260bc83674a64ad580dccea5a3c335cc |
|
MD5 | d78f2aefef538a3ee080ef03a8af70bc |
|
BLAKE2b-256 | f84b7820edb9a1381a9291a1b248857a5b344cf3df7f4a7a3c4b59e24c43554c |