Skip to content

Commit

Permalink
Updates for test release.
Browse files Browse the repository at this point in the history
  • Loading branch information
smrg-lm committed Feb 25, 2020
1 parent 087d4eb commit 9450d98
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 48 deletions.
59 changes: 17 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,27 @@
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sc3)
![PyPI](https://img.shields.io/pypi/v/sc3)

sc3
===

Port of core features from sclang to Python 3, 3.6 for sure maybe >= 3.5 (not
tested). It is intended to be the same library in a different language and to
keep sclang elegance in a pythonic way (if possible).

So far SynthDef compiles and Routine and TempoClock are barely working, for that
I started form AbstractFunction. Basics are not finished, I'm still studding the
code. Also I'm not being linear in feature transcription, more like jumping and
iterating (revisiting and completing) from place to place so to have the whole
picture, sclang library has features integrated from bottom up and between
classes. Everything is in a very early stage.

Code is still full of study comments and references (very unprofessional, I
know) most of them useless, don't try understand, those are just reminders to
myself. I will be erasing them gradually. Some original sclang comments were
kept in code with two slash within python comments (`# //`) and each file has a
reference to the source (many are obvious but some are not and some names were
changed for different reasons).
Port of core features from SuperCollider's language to Python 3. It is intended to be the same library in a different language and to keep sclang elegance in a pythonic way (if possible).

The main reason for this port is Python's capacity of interaction with other
libraries applicable to composition, sonic-art and alike, and to be able to
compile synth definitions and send them to the server is very handy.
The main reason for this port is Python's capacity of interaction with other libraries applicable to composition, sonic-art and research. My wish is for this project to be useful for the SuperCollider community.

I still don't know what would be the scope regarding features, what I will get
finished for sure are server abstractions and interaction.

Isn't Python slow?
------------------

Yes it is and so is sclang, the problem would be realtimeness and that's solved
the same way for Python [TODO: brief explanation of logical time, interaction
with the server and time boundaries].
Note that this project is still under development and there are missing parts, bugs you are welcome to report, and is no such a thing like "documentation" here by now. The best way to learn about SuperCollider is going to the [source](https://supercollider.github.io).

Example
-------

The idea is that you can write the same in Python as in sclang, with the same
logic regarding multichannel expansion, arguments conversion to Control ugens,
etc., it should be the same result. For example:
The idea is that you can write the same in Python as in sclang, with the same logic regarding multichannel expansion, arguments conversion to Control ugens, etc., it should be the same result. For example:

```python
from sc3.all import *

# interactive shell run...

s = Server.local
s.boot()

# wait or error...

@synthdef.add()
def sine(freq=440, amp=0.1, gate=1):
sig = SinOsc.ar(freq) * amp
Expand All @@ -74,11 +46,16 @@ n.release()
s.quit() # stop server at the end of interactive session or just quit ipython.
```

That's a working example but many things are not finished or tested and some are
no decided, things may change or move.
Install
-------

From PyPI:

```
pip3 install sc3
```

Install (in develop mode)
-------------------------
From source in develop mode:

```
python3 setup.py develop --user
Expand All @@ -87,6 +64,4 @@ python3 setup.py develop --user
License
-------

The sc3 library holds the same license as SuperCollider: sc3 is free software
available under Version 3 of the GNU General Public License. See
[COPYING](COPYING) for details.
The sc3 library holds the same license as SuperCollider: sc3 is free software available under Version 3 of the GNU General Public License. See [COPYING](COPYING) for details.
3 changes: 3 additions & 0 deletions sc3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
import atexit


__version__ = '0.6.0'


### Configure logger ###

# https://docs.python.org/3/howto/logging-cookbook.html#dealing-with-handlers-that-block
Expand Down
16 changes: 10 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,26 @@

setuptools.setup(
name='sc3',
version='0.0.5',
version='0.6.0',
author='Lucas Samaruga',
author_email='samarugalucas@gmail.com',
description='SuperCollider 3 class library Python 3 port',
long_description=long_description,
long_description_content_type='text/markdown',
url="https://github.com/smrg-lm/sc3",
packages=['sc3', 'sc3.base',
'sc3.seq', 'sc3.seq.patterns',
'sc3.synth', 'sc3.synth.ugens'],
url='https://github.com/smrg-lm/sc3',
packages=[
'sc3', 'sc3.base',
'sc3.seq', 'sc3.seq.patterns',
'sc3.synth', 'sc3.synth.ugens'
],
python_requires='>=3.6',
classifiers=[
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent',
'Development Status :: 1 - Planning',
'Development Status :: 3 - Alpha'
],
keywords='SuperCollider sound synthesis music composition'
)

0 comments on commit 9450d98

Please sign in to comment.