GithubHelp home page GithubHelp logo

sinsixx / magenta Goto Github PK

View Code? Open in Web Editor NEW

This project forked from magenta/magenta

0.0 1.0 0.0 34.72 MB

Magenta: Music and Art Generation with Machine Intelligence

License: Apache License 2.0

Shell 0.82% Python 98.46% C++ 0.72%

magenta's Introduction

Build Status PyPI version

Magenta is a research project exploring the role of machine learning in the process of creating art and music. Primarily this involves developing new deep learning and reinforcement learning algorithms for generating songs, images, drawings, and other materials. But it's also an exploration in building smart tools and interfaces that allow artists and musicians to extend (not replace!) their processes using these models. Magenta was started by some researchers and engineers from the Google Brain team, but many others have contributed significantly to the project. We use TensorFlow and release our models and tools in open source on this GitHub. If you’d like to learn more about Magenta, check out our blog, where we post technical details. You can also join our discussion group.

This is the home for our Python TensorFlow library. To use our models in the browser with TensorFlow.js, head to the Magenta.js repository.

Getting Started

Installation

Magenta maintains a pip package for easy installation. We recommend using Anaconda to install it, but it can work in any standard Python environment. We support both Python 2 (>= 2.7) and Python 3 (>= 3.5). These instructions will assume you are using Anaconda.

Note that if you want to enable GPU support, you should follow the GPU Installation instructions below.

Automated Install (w/ Anaconda)

If you are running Mac OS X or Ubuntu, you can try using our automated installation script. Just paste the following command into your terminal.

curl https://raw.githubusercontent.com/tensorflow/magenta/master/magenta/tools/magenta-install.sh > /tmp/magenta-install.sh
bash /tmp/magenta-install.sh

After the script completes, open a new terminal window so the environment variable changes take effect.

The Magenta libraries are now available for use within Python programs and Jupyter notebooks, and the Magenta scripts are installed in your path!

Note that you will need to run source activate magenta to use Magenta every time you open a new terminal window.

Manual Install (w/o Anaconda)

If the automated script fails for any reason, or you'd prefer to install by hand, do the following steps.

Install the Magenta pip package:

pip install magenta

NOTE: In order to install the rtmidi package that we depend on, you may need to install headers for some sound libraries. On Linux, this command should install the necessary packages:

sudo apt-get install build-essential libasound2-dev libjack-dev

The Magenta libraries are now available for use within Python programs and Jupyter notebooks, and the Magenta scripts are installed in your path!

GPU Installation

If you have a GPU installed and you want Magenta to use it, you will need to follow the Manual Install instructions, but with a few modifications.

First, make sure your system meets the requirements to run tensorflow with GPU support.

Next, follow the Manual Install instructions, but install the magenta-gpu package instead of the magenta package:

pip install magenta-gpu

The only difference between the two packages is that magenta-gpu depends on tensorflow-gpu instead of tensorflow.

Magenta should now have access to your GPU.

Using Magenta

You can now train our various models and use them to generate music, audio, and images. You can find instructions for each of the models by exploring the models directory.

To get started, create your own melodies with TensorFlow using one of the various configurations of our Melody RNN model; a recurrent neural network for predicting melodies.

Playing a MIDI Instrument

After you've trained one of the models above, you can use our MIDI interface to play with it interactively.

We also have created several demos that provide a UI for this interface, making it easier to use (e.g., the browser-based AI Jam).

Development Environment

If you want to develop on Magenta, you'll need to set up the full Development Environment.

First, clone this repository:

git clone https://github.com/tensorflow/magenta.git

Next, install the dependencies by changing to the base directory and executing the setup command:

pip install -e .

You can now edit the files and run scripts by calling Python as usual. For example, this is how you would run the melody_rnn_generate script from the base directory:

python magenta/models/melody_rnn/melody_rnn_generate --config=...

You can also install the (potentially modified) package with:

pip install .

Before creating a pull request, please also test your changes with:

pip install pytest-pylint
pytest

PIP Release

To build a new version for pip, bump the version and then run:

python setup.py test
python setup.py bdist_wheel --universal
python setup.py bdist_wheel --universal --gpu
twine upload dist/magenta-N.N.N-py2.py3-none-any.whl
twine upload dist/magenta_gpu-N.N.N-py2.py3-none-any.whl

magenta's People

Contributors

adarob avatar ashtraysoap avatar asleep avatar cghawthorne avatar chrisdonahue avatar cifkao avatar cinjon avatar czhuang avatar danabo avatar daphnei avatar davidprimor avatar douglaseck avatar dustinvtran avatar ekelsen avatar eraoul avatar faraazn avatar fredbertsch avatar golnazg avatar hardmaru avatar iansimon avatar jesseengel avatar jhowcrof avatar jsawruk avatar kastnerkyle avatar kmalta avatar korymath avatar natashamjaques avatar ringw avatar vitorarrais avatar zuzoovn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.