Getting Started with Magenta

970 views
Skip to first unread message

Jason Brogan

unread,
Dec 6, 2016, 11:34:57 PM12/6/16
to Magenta Discuss
Hi everyone, I'm an AI designer—not necessarily a developer—looking to get started with Magenta. I get through most of the (Mac) installation steps without difficulty, but have a question about setting up MIDI: I receive "unknown command: magenta_midi" [see attachment].

More generally, I'm uncertain about how the following command is entered into terminal, i.e., is it all copy and pasted, or entered line-by-line? I've included another example beneath it.

BUNDLE_PATH=<absolute path of .mag file>
CONFIG=<one of 'one_drum' or 'drum_kit'>

drums_rnn_generate \
--config=${CONFIG} \
--bundle_file=${BUNDLE_PATH} \
--output_dir=/tmp/drums_rnn/generated \
--num_outputs=10 \
--num_steps=128 \
--primer_drums="[(36,)]"

magenta_midi \
  --input_port="VMPK Output" \
  --output_port="FluidSynth virtual port" \
  --bundle_file=/tmp/attention_rnn.mag \
  --phrase_bars=4
Screen Shot 2016-12-06 at 11.28.59 PM.png

Cihan SARI

unread,
Dec 7, 2016, 2:45:56 AM12/7/16
to Magenta Discuss
Hi Jason,

Did you:
source activate magenta

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.

Jason Brogan

unread,
Dec 7, 2016, 12:01:03 PM12/7/16
to Magenta Discuss
Thanks Cihan.

I have everything installed correctly, but couldn't get beyond the "magenta_midi --list_ports" command.

I'm more concerned about the commands that I posted. Are these entered directly into terminal—and do I copy and paste all of it at once—or do they need to be used within a Python script, etc.?

Curtis "Fjord" Hawthorne

unread,
Dec 7, 2016, 12:31:09 PM12/7/16
to Jason Brogan, Magenta Discuss
Hi Jason,

From your screenshot, it looks like you were trying to enter the  "magenta_midi --list_ports" into the FluidSynth prompt. You'll need to start FluidSynth in a separate terminal and then enter the rest of the commands in your original terminal.

-Fjord

--
Magenta project: magenta.tensorflow.org
To post to this group, send email to magenta...@tensorflow.org
To unsubscribe from this group, send email to magenta-discu...@tensorflow.org
---
You received this message because you are subscribed to the Google Groups "Magenta Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magenta-discu...@tensorflow.org.

Claudia Hicks

unread,
Mar 31, 2017, 10:32:18 PM3/31/17
to Magenta Discuss
I am also having this problem. Did you figure it out?

Jose Cano

unread,
Apr 1, 2017, 12:24:40 AM4/1/17
to Magenta Discuss
Jason (and Claudia),
You can copy and paste the whole script into your terminal. Once you have installed magenta, go inside your magenta directory and paste the script. So that something like this would work. This is in the documentation btw. Good luck and happy hacking.

bazel run //magenta/models/drums_rnn:drums_rnn_generate \
-- drums_rnn_generate \
--config=drum_kit \
--bundle_file=/path-to-mag-file \
--output_dir=/tmp/drums_rnn/generated \
--num_outputs=10 \
--num_steps=128 \
--primer_drums="[(36,)]"
Reply all
Reply to author
Forward
0 new messages