Magenta

Magenta:用机器智能生成音乐和艺术。「Magenta: Music and Art Generation with Machine Intelligence」

  • 所有者: magenta/magenta
  • 平台: Linux, Mac, Windows
  • 許可證: Apache License 2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Magenta

Magenta 是一个探索机器学习在艺术和音乐创作过程中的作用的研究项目。主要涉及开发新的深度学习和强化学习算法,用于生成歌曲、图像、绘画和其他材料。但这也是在构建智能工具和界面方面的探索,让艺术家和音乐家能够使用这些模型扩展(而不是取代!)他们的过程。Magenta 是由 Google Brain team(谷歌大脑团队) 的一些研究人员和工程师发起的,但其他许多人也为这个项目做出了重要贡献。我们使用 TensorFlow,并在这个 GitHub 上开源发布我们的模型和工具。如果你想了解更多关于 Magenta 的信息,请查看我们的博客,我们在那里发布技术细节。你也可以加入我们的讨论组

这是我们 Python TensorFlow 库的家。要在浏览器中使用 TensorFlow.js 使用我们的模型,请前往 Magenta.js 仓库。

入门

看看我们的各种模型的 colab notebooks,包括一个入门的 notebooks。Magenta.js 也是一个很好的模型和演示资源,可以在浏览器中运行。这些以及更多的内容,包括博客文章Ableton Live 插件,都可以在 https://magenta.tensorflow.org 中找到。

Magenta Repo

安装

Magenta 维护了一个 pip 包以方便安装。我们推荐使用 Anaconda 来安装,但它可以在任何标准的 Python 环境中工作。我们支持 Python 3 (>= 3.5)。这些说明将假设您正在使用 Anaconda。

自动安装 (用 Anaconda)

如果你正在运行 Mac OS X 或 Ubuntu,你可以尝试使用我们的自动安装脚本。只需在你的终端上粘贴以下命令。

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

脚本完成后,打开一个新的终端窗口,使环境变量的改变生效。

Magenta 库现在可以在 Python 程序和 Jupyter notebooks 中使用了,Magenta 脚本也安装在你的路径中了。

需要注意的是,每次打开新的终端窗口时,你都需要运行 source activate magenta 来使用 Magenta。

手动安装(不含 Anaconda)

如果自动脚本因为任何原因失败,或者你想手动安装,请执行以下步骤。

安装 Magenta pip 包。

pip install magenta

注意:为了安装我们所依赖的 rtmidi 包,你可能需要安装一些声音库的头文件。在 Ubuntu Linux 上,这个命令可以安装必要的包。

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

在 Fedora Linux 上,使用

sudo dnf group install "C Development Tools and Libraries"
sudo dnf install SAASound-devel jack-audio-connection-kit-devel portaudio-devel

Magenta 库现在可以在 Python 程序和 Jupyter notebooks 中使用,而且 Magenta 脚本已经安装在你的路径中了。

使用 Magenta

您现在可以训练我们的各种模型,并使用它们来生成音乐、音频和图像。您可以通过浏览模型目录找到每个模型的说明。

开发环境

如果你想在 Magenta 上开发,你需要设置完整的开发环境。

首先,克隆这个版本库。

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

接下来,通过更改基础目录并执行设置命令来安装依赖关系。

pip install -e .

现在你可以像往常一样通过调用 Python 来编辑文件和运行脚本。例如,你将如何从基础目录中运行 melody_rnn_generate 脚本。

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

你也可以用以下方法安装(可能是修改过的)软件包。

pip install .

在创建一个 pull request 之前,请先用以下方法测试你的变化。

pip install pytest-pylint
pytest

PIP 发布

要为 pip 建立一个新的版本,先将版本升级,然后运行。

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


(The first version translated by vz on 2020.08.30)

主要指標

概覽
名稱與所有者magenta/magenta
主編程語言Python
編程語言Python (語言數: 2)
平台Linux, Mac, Windows
許可證Apache License 2.0
所有者活动
創建於2016-05-05 20:10:40
推送於2025-01-17 12:10:25
最后一次提交
發布數50
最新版本名稱v2.1.4 (發布於 )
第一版名稱v0.1.2 (發布於 )
用户参与
星數19.4k
關注者數742
派生數3.8k
提交數1.4k
已啟用問題?
問題數966
打開的問題數377
拉請求數939
打開的拉請求數47
關閉的拉請求數156
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

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

Take a look at our colab notebooks for various models, including one on getting started.
Magenta.js is a also a good resource for models and demos that run in the browser.
This and more, including blog posts and Ableton Live plugins, can be found at https://magenta.tensorflow.org.

Magenta Repo

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.

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 portaudio19-dev

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

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.

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
twine upload dist/magenta-N.N.N-py2.py3-none-any.whl