Skip to main content

A modular synthesizer in pytorch, GPU-optional and differentiable

Project description

torchsynth

torchsynth is based upon traditional modular synthesis written in pytorch. It is GPU-optional and differentiable.

Open in Colab

PyPI PyPI - Wheel PyPI - License codecov.io Total alerts Travis CI build status Snyk Vulnerabilities for GitHub Repo

You will need to install the particular version of [torchcsprng][https://github.com/pytorch/csprng] for your CUDA device. Please follow their simple installation instructions. But if you use the CPU version of torchcsprng, it probably won't affect performance much.

Development Installation

git clone https://github.com/turian/torchsynth
cd torchsynth
pip3 install -e ".[dev]"

Make sure you have pre-commit hooks installed:

pre-commit install

This helps us avoid checking dirty jupyter notebook cells into the repo.

Note that torchsynth requires PyTorch version 1.7 or greater.

Examples

Unfortunately, Python 3.9 (e.g. OSX Big Sur) won't work, because librosa repends upon numba which isn't packaged for 3.9 yet. In which case you'll have to create a Python 3.7 conda environment. (You might also need to downgrade LLVM to 10 or 9.):

conda install -c conda-forge ipython librosa matplotlib numpy matplotlib scipy jupytext
conda install -c anaconda ipykernel
python -m ipykernel install --user --name=envname

and change the kernel to envname.

Tests

Unit testing is performed using pytest.

pytest and other project development dependencies can be installed as follows:

pip3 install -e ".[test]"

To run tests, run pytest from the project root:

pytest

To run tests with a coverage report:

pytest --cov=./torchsynth

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torchsynth-0.0.2.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

torchsynth-0.0.2-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file torchsynth-0.0.2.tar.gz.

File metadata

  • Download URL: torchsynth-0.0.2.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for torchsynth-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b364c8cb5dde436d8fa523d42170d76f4353f5417b796468e771da441e8138b1
MD5 7febb00af47f5840b22641ea4985f9e7
BLAKE2b-256 1f41f6672b9e02fe5ce7af7949041ad9babc339659b64f37828c7e6016b56451

See more details on using hashes here.

File details

Details for the file torchsynth-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: torchsynth-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for torchsynth-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 84770e90b532a4eba597789542a3f45b1e4a2abf929c204c7fa307764a131647
MD5 775d718333b82f3b87e892a987e78ad0
BLAKE2b-256 0d0ee062b1a82f174be2cc69f90dee7c1e208ec72ebb0f0bc31b000bc0be4d60

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page