I use Jupyter Notebook as well. And I get same issue with Fluidsynth when I call
"mm.play_sequence(sequence_prediction, mm.midi_synth.fluidsynth)"
it returns error as below. Have you resolve this?
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-39-78a35549567a> in <module>()
----> 1 mm.play_sequence(sequence_prediction, mm.midi_synth.fluidsynth)
/home/will/anaconda2/envs/magenta/lib/python2.7/site-packages/magenta/music/notebook_utils.pyc in play_sequence(sequence, synth, sample_rate, colab_ephemeral, **synth_args)
97 **synth_args: Additional keyword arguments to pass to the synth function.
98 """
---> 99 array_of_floats = synth(sequence, sample_rate=sample_rate, **synth_args)
100
101 try:
/home/will/anaconda2/envs/magenta/lib/python2.7/site-packages/magenta/music/midi_synth.pyc in fluidsynth(sequence, sample_rate, sf2_path)
54 """
55 midi = midi_io.sequence_proto_to_pretty_midi(sequence)
---> 56 return midi.fluidsynth(fs=sample_rate, sf2_path=sf2_path)
/home/will/anaconda2/envs/magenta/lib/python2.7/site-packages/pretty_midi/pretty_midi.pyc in fluidsynth(self, fs, sf2_path)
916 # Get synthesized waveform for each instrument
917 waveforms = [i.fluidsynth(fs=fs,
--> 918 sf2_path=sf2_path) for i in self.instruments]
919 # Allocate output waveform, with #sample = max length of all waveforms
920 synthesized = np.zeros(np.max([w.shape[0] for w in waveforms]))
/home/will/anaconda2/envs/magenta/lib/python2.7/site-packages/pretty_midi/instrument.pyc in fluidsynth(self, fs, sf2_path)
414
415 if not _HAS_FLUIDSYNTH:
--> 416 raise ImportError("fluidsynth() was called but pyfluidsynth "
417 "is not installed.")
418
ImportError: fluidsynth() was called but pyfluidsynth is not installed.
在 2017年11月25日星期六 UTC+8上午4:36:10,Alvaro Lopez写道: