0

I have followed the instruction in Magenta MIDI Interface, but failed to start a capture session. Basically nothing happens even after I set the modulation wheel in VMPK (Virtual MIDI Piano Keyboard) to its max value, which is 127.

I used the following shell script to start Magenta MIDI interface.

#!/bin/bash
echo "Hello, MIDI!"

CURR_DIR=`pwd`
TMP_DIR=$CURR_DIR/tmp

cd ~/git/magenta

# List all available ports
bazel-bin/magenta/interfaces/midi/midi --list

bazel-bin/magenta/interfaces/midi/midi \
--input_port="VMPK Output" \
--output_port="VMPK Input" \
--generator_name=attention_rnn \
--checkpoint=$TMP_DIR/attention_rnn/logdir/run1/train \
--hparams="{'batch_size':32,'rnn_layer_sizes':[32, 32]}"

Here is an output.

Hello, MIDI!
Input ports: 'VMPK Output'
Output ports: 'VMPK Input'
WARNING:tensorflow:<tensorflow.python.ops.rnn_cell.BasicLSTMCell object at 0x11cbccad0>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.
WARNING:tensorflow:<tensorflow.python.ops.rnn_cell.BasicLSTMCell object at 0x11cbcce10>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.
WARNING:tensorflow:<tensorflow.contrib.rnn.python.ops.rnn_cell.AttentionCellWrapper object at 0x11cbccb90>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.
Waiting for start control signal...

At this point, I rotate the modulation wheel on VMPK, which is surrounded by a green box in the following figure, but nothing happens even if the value is set to 127.

enter image description here

My environment is:

  • Mac OS X Yosemite 10.10.5
  • Python 2.7.11
  • Tensorflow 0.10.0rc0
  • Magenta 86ea30ab27adf5923902d0f297ca42bd12bcb4d1
tanemaki
  • 4,849
  • 1
  • 12
  • 6

4 Answers4

1

Finally, the problem has been solved.

The problem was the configuration of MIDI Connections in VMPK.

This is the setting that does not work.

enter image description here

And this is the setting that works nicely.

enter image description here

Adam, thank you very much for your help and patience.

tanemaki
  • 4,849
  • 1
  • 12
  • 6
  • I'm glad you were able to get things to work! I'm not sure why you needed to make these modifications, however. I don't think it should be necessary. What are the other options on your dropdown menu for Output Midi Connection? – Adam Roberts Sep 15 '16 at 22:09
  • Thanks Adam! Actually, there is no other option available on my dropdown menu for Output MIDI Connection. "FluidSynth virtual port (4644)" is the only option available. Also the number 4644 is not static and changes frequently, so it is a bit tedious to check this number and set it manually in the following command: --output_port="FluidSynth virtual port (4644)". – tanemaki Sep 17 '16 at 13:52
  • Okay, thanks for checking. We are planning on switching to using virtual ports which should simplify things more. Stay tuned! – Adam Roberts Sep 19 '16 at 15:47
0

I succeeded to initialize the capture session in the Magenta MIDI Interface by changing MIDI OUT Driver from FluidSynth to CoreMIDI. I could start the capture session by setting the value of modulation wheel to 127 and finish the session by setting it to 0. Also, I could "see" the key is pressed automatically by the generated sequences. Here is an output on my terminal.

Waiting for start control signal...
Capturing notes until stop control signal..........................................................Done
Generating response...Done
Playing sequence.....................................................Done

However, after this modification, I lost sound completely... I could visually "see" the piano keys were pressed by the generated sounds, but I could not "hear" anything. This loss of sound persists until I set the MIDI OUT Driver back to its original setting, which is FluidSynth. Then, I lose the way to initialize Magenta MIDI Interface...

Does anybody have any idea?


enter image description here

Here is my default setting of VMPK MIDI Connections (Edit > MIDI Connections). With this setting,

  • I cannot initialize Magenta MIDI Interface
  • I can hear piano sound

enter image description here

Here is my modified setting of VMPK MIDI Connections. With this setting,

  • I can initialize Magenta MIDI Interface and can generate sequence.
  • I cannot hear piano sound
tanemaki
  • 4,849
  • 1
  • 12
  • 6
0

This is my reply to the question: "Have you already started fluidsynth at this point? You should also see it in the list. – Adam Roberts"

No I have not. So I did the following. I first moved to the directory with sound font named FluidR3_GM2-2.SF2. Then I type the following command in a console.

fluidsynth -a coreaudio

The > mark appears in a console, so I typed the following command.

> load FluidR3_GM2-2.SF2

Then the following message appears.

loaded SoundFont has ID 1

I then open VMPK app. First, I went to Edit>MIDI Connections to change MIDI OUT Driver to CoreMIDI and Output MIDI Connection to FluidSynth virtual port (20082).

I then type the following command,

bazel-bin/magenta/interfaces/midi/midi --list 

and get the following output:

Input ports: 'VMPK Output' 
Output ports: 'FluidSynth virtual port (20082)', 'VMPK Input' 

This output looks good, but I still cannot hear the generated sound even if I can prime the model with my keyboard and melody seems to be generated...

Here is the output I got on my console.

Input ports: 'VMPK Output'
Output ports: 'FluidSynth virtual port (20082)', 'VMPK Input'
WARNING:tensorflow:<tensorflow.python.ops.rnn_cell.BasicLSTMCell object at 0x11cbbe910>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.
WARNING:tensorflow:<tensorflow.python.ops.rnn_cell.BasicLSTMCell object at 0x11cbbe210>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.
Waiting for start control signal...
Capturing notes until stop control signal..................................Done
Generating response...Done
Playing sequence..........................................Done
Capturing notes until stop control signal..........................................Done
Generating response...Done
Playing sequence...........................................Done 
tanemaki
  • 4,849
  • 1
  • 12
  • 6
0

You must set the output port to be --output_port="FluidSynth virtual port (20082)"

Adam Roberts
  • 151
  • 3
  • I set the output to be `--output_port="FluidSynth virtual port (20082)"`, then I can hear the sound of piano, but then I cannot initialize Magenta MIDI Interface by setting the dial to 127... – tanemaki Sep 14 '16 at 07:03
  • OK, I finally found the problem. The problem was the configuration of MIDI Connections in VMPK. I put my problem and solution below with screen captures. Thank you very much for your help, Adam. – tanemaki Sep 14 '16 at 07:26