FoxDot.lib.Extensions.SonicPi

This extension allows you to use the synths defined by Sonic Pi.

You need to load/download the synths:

from .Extensions.SonicPi import LoadSonicPiSynths, pisynth

# (down)load the SonicPi synths
LoadSonicPiSynths()

# See what new Synths are available
print(pisynth)

# You must update the global namespace manually if you are running FoxDot in library mode. For example:
globals() |= pisynth

After that, you can use the synths normally:

# and use like any other synth
s1 >> sine()
s2 >> zawa()
class FoxDot.lib.Extensions.SonicPi.Container[source]

Bases: dict

Simple dict that allows access to keys via properties

FoxDot.lib.Extensions.SonicPi.GenerateSonicPiData(sonic_pi_dir)[source]

Generate the sonic-pi json metadata from a sonic-pi source repo

FoxDot.lib.Extensions.SonicPi.LoadSonicPiSynths(metadata_file='/workspace/FoxDotExtensions/FoxDot/FoxDot/lib/Extensions/SonicPi/sonicpi.json')[source]

Load sonic-pi synths from json metadata, downloading compiled synths if needed

FoxDot.lib.Extensions.SonicPi.LoadSonicPiSynthsDev(sonic_pi_dir)[source]

Load the sonic pi synths from a live sonic-pi repo

class FoxDot.lib.Extensions.SonicPi.SonicPiSynthDef(name, filename, synthdata)[source]

Bases: CompiledSynthDef

bus_name = 'out_bus'
preprocess_osc(osc_msg)[source]
FoxDot.lib.Extensions.SonicPi.HERE = '/workspace/FoxDotExtensions/FoxDot/FoxDot/lib/Extensions/SonicPi'

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to ‘utf-8’. errors defaults to ‘strict’.

FoxDot.lib.Extensions.SonicPi.SONIC_PI_FILE = '/workspace/FoxDotExtensions/FoxDot/FoxDot/lib/Extensions/SonicPi/sonicpi.json'

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to ‘utf-8’. errors defaults to ‘strict’.

FoxDot.lib.Extensions.SonicPi.RUBY_SCRIPT = '/workspace/FoxDotExtensions/FoxDot/FoxDot/lib/Extensions/SonicPi/generate.rb'

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to ‘utf-8’. errors defaults to ‘strict’.

FoxDot.lib.Extensions.SonicPi.pisynth = {}

Simple dict that allows access to keys via properties