Skip to main content

Build Status codecov Maintainability PyPI version

[Sine]thesizer

Overview

It is a digital synthesizer that is based on some design principles:

  • Control via text files facilitates automation and boosts reproducibility, so GUI is absent.
  • Although low-level and OS-specific dependencies improve performance, they reduce reliability, portability, and transparency, so they are avoided here. This standalone synth depends only on Python and some its packages.
  • Since performance is not a merit of this synth, it is better to trade off speedups for sound quality. In particular, wavetables are not used at all and full waves are generated. Also, noise is generated from scratch every time it is needed.

The list of implemented and planned features is as follows:

  • Balance between freedom for user and simplicity of input formats
  • Support of additive synthesis, subtractive synthesis, and AM/PM synthesis
  • Sound effects (e.g., phaser, overdrive, reverb, etc)
  • Custom envelopes
  • Noises and drums
  • Rich collection of presets

Installation

To install a stable version, run:

pip install sinethesizer

Usage

This synthesizer converts MIDI files and special text files to WAV files with resulting audio tracks.

For a MIDI file, it can be done with the following command:

python -m sinethesizer \
    -i path/to/track.midi \
    -p path/to/presets.yml \  # Or -p path/to/dir_with_presets
    -m path/to/midi_config.yml \
    -o path/to/output.wav

However, MIDI files are binary and, therefore, quite opaque. Also, integration between them and this synth is not complete: for example, control changes are ignored and event-level effects can not be applied. Here, TSV (Tab-Separated Values) files of special schema can be used as a native and more transparent alternative to MIDI. To process such a file, run:

python -m sinethesizer \
    -i path/to/track.tsv \
    -p path/to/presets.yml \  # Or -p path/to/dir_with_presets
    -o path/to/output.wav

Below table provides links to detailed information about input files that are required from a user.

Option Description Example
-i path/to/track.tsv Track definition Scale
-p path/to/presets.yml Instruments definition Demo instruments
-m path/to/midi_config.yml Settings of MIDI file interpretation Demo MIDI config

If something is still unclear, you can read the source code — it is structured and has built-in documentation. Also, your questions are welcome.

See also

To turn Jupyter notebook into a simple DAW, PyMixer can be used. It is a Python library having good integration with [Sine]thesizer. Together they form a small ecosystem of audio tools which are oriented to text-based control.

Release files for sinethesizer 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sinethesizer 0.6.2
File Size Uploaded
sinethesizer-0.6.2.tar.gz 57.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sinethesizer 0.6.2
File Interpreter ABI Platform
sinethesizer-0.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 108.6 kB

Release files / sinethesizer-0.6.2.tar.gz

Download URL sinethesizer-0.6.2.tar.gz
Size 57.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fb279589c20ba3825b96793b32f63c6786538d322926a0d4e159be382677cf39
BLAKE2b-256 checksum
How to use checksums
e66ba5fb6f9188e414c90022f3d51fbdacc053ac17959d6b4a47817f771a26da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / sinethesizer-0.6.2-py3-none-any.whl

Download URL sinethesizer-0.6.2-py3-none-any.whl
Size 51.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd515740d553888fef034f19aba58483ab4c253ce6eb3792093dcb9e500d4444
BLAKE2b-256 checksum
How to use checksums
16102588d3b319bc00e523f0311c9edb4887b91ca05dfc3fe5a34a9d34e7d3b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.6.2 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.10

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page