Metadata-Version: 2.0
Name: synthesizer
Version: 0.1.3
Summary: A simple virtual analog synthesizer.
Home-page: https://github.com/yuma-m/synthesizer
Author: Yuma Mihira
Author-email: info@yurax2.com
License: GPLv3
Description-Content-Type: UNKNOWN
Keywords: analog synthesizer
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: Multimedia :: Sound/Audio :: MIDI
Classifier: Topic :: Multimedia :: Sound/Audio :: Sound Synthesis
Requires-Dist: PyAudio (>=0.2.11)
Requires-Dist: enum34 (>=1.1.6)
Requires-Dist: numpy (>=1.13.3)
Requires-Dist: scipy (>=0.19.1)

Python synthesizer |Build Status|
=================================

-  Virtual analog synthesizer.

Installation
------------

.. code:: bash

    $ pip install synthesizer

Basic usage
-----------

Play 440Hz sine wave
~~~~~~~~~~~~~~~~~~~~

.. code:: python

    >>> from synthesizer import Player, Synthesizer, Waveform


    >>> player = Player()
    >>> player.open_stream()
    >>> synthesizer = Synthesizer(osc1_waveform=Waveform.sine, osc1_volume=1.0, use_osc2=False)
    # Play A4
    >>> player.play_wave(synthesizer.generate_constant_wave(440.0, 3.0))

Play chord
~~~~~~~~~~

.. code:: python

    # Play C major
    >>> chord = [261.626,  329.628, 391.996]
    >>> player.play_wave(synthesizer.generate_chord(chord, 3.0))

Specify audio device
~~~~~~~~~~~~~~~~~~~~

.. code:: python

    >>> player.enumerate_device()
    # index: 00, name: "Built-in Microphone", rate: 44100
    # index: 01, name: "Built-in Output", rate: 44100
    # index: 02, name: "UA-25EX 44.1kHz", rate: 44100
    >>> player.open_stream(device_name="UA-25EX")

Write wav file
~~~~~~~~~~~~~~

.. code:: python

    >>> from synthesizer import Writer
    >>> writer = Writer()

    >>> chord = [261.626,  329.628, 391.996]
    >>> wave = synthesizer.generate_chord(chord, 3.0)
    >>> writer.write_wave("path/to/your.wav", wave)

Supported OS
------------

-  macOS Sierra
-  Ubuntu 16.04

Supported versions
------------------

-  Python 2.7
-  Python 3.4 and above

Author
------

-  `Yuma Mihira <http://yurax2.com/>`__

License
-------

-  GPL v3 License

Links
-----

-  PyPI: https://pypi.python.org/pypi/synthesizer
-  GitHub: https://github.com/yuma-m/synthesizer

.. |Build Status| image:: https://travis-ci.org/yuma-m/synthesizer.svg?branch=master
   :target: https://travis-ci.org/yuma-m/synthesizer


