We’re happy to announce Magenta, a project from the Google Brain team that asks: Can we use machine learning to create compelling art and music? If so, how? If not, why not?
git clone git@github.com:tensorflow/magenta.git --recursive
cd magenta
The --recursive
flag automatically initializes and updates each submodule in the repository. More info on git submodules
I just went w/ the default options.
cd tensorflow
./configure
cd ..
These are found in magenta/BUILD
.
bazel build //magenta:music_py_pb3
# Generates bazel-genfiles/magenta/protobuf/music_pb2.py
bazel build //magenta:music_proto
# Generates
# * bazel-bin/magenta/*
# * bazel-genfiles/magenta/protobuf/music.pb.cc
# * bazel-genfiles/magenta/protobuf/music.pb.h
bazel build //magenta:midi_io_test
bazel build //magenta:midi_io
music_pb2.py
is a python protocol buffer which was compiled from magenta/protobuf/music.proto
.
// A message containing a symbolic music sequence. The design is largely based on MIDI but it should be able to represent any music sequence.
As such I don't think we run it directly from the command line. Instead I believe that we import
it and use it as an interface in our code.
I think that this is the sample code which we are supposed to run. However when I run python magenta/lib/midi_io_test.py
I get
Traceback (most recent call last):
File "magenta/lib/midi_io_test.py", line 8, in <module>
import google3
ImportError: No module named google3
I'm unable to install google3
via pip
:
$ pip install google3
Collecting google3
Could not find a version that satisfies the requirement google3 (from versions: )
No matching distribution found for google3
I've googled around and I don't see a python package called google3
so I'm still trying to debug this.
Also when I run
$ python magenta/lib/midi_io.py
Traceback (most recent call last):
File "magenta/lib/midi_io.py", line 10, in <module>
import pretty_midi
ImportError: No module named pretty_midi
There is a pretty_midi
package in the third_party
directory which is used in the compilation step above so I'm unclear what's happening here.