Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyfluidsynth is missing when running omnizart synth #35

Closed
hagenw opened this issue Jul 22, 2021 · 4 comments
Closed

pyfluidsynth is missing when running omnizart synth #35

hagenw opened this issue Jul 22, 2021 · 4 comments

Comments

@hagenw
Copy link

hagenw commented Jul 22, 2021

I followed the examples in the Quickstart section, but got the following error:

$ omnizart synth song.mid
Output file as: ./song_synth.wav
Downloading default sondfont file...
Output path: /home/audeering.local/hwierstorf/.envs/omnizart/lib/python3.6/site-packages/omnizart/resource/soundfonts.sf2
Total size: 29.83MB
Progress: 100%, 29.83MB, 892.73KB/s
Synthesizing MIDI...
Traceback (most recent call last):
  File "/home/audeering.local/hwierstorf/.envs/omnizart/bin/omnizart", line 8, in <module>
    sys.exit(entry())
  File "/home/audeering.local/hwierstorf/.envs/omnizart/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/audeering.local/hwierstorf/.envs/omnizart/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/audeering.local/hwierstorf/.envs/omnizart/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/audeering.local/hwierstorf/.envs/omnizart/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/audeering.local/hwierstorf/.envs/omnizart/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/audeering.local/hwierstorf/.envs/omnizart/lib/python3.6/site-packages/omnizart/cli/cli.py", line 220, in synth
    synth_midi(input_midi, output_path=output_file, sf2_path=sf2_path)
  File "/home/audeering.local/hwierstorf/.envs/omnizart/lib/python3.6/site-packages/omnizart/utils.py", line 281, in synth_midi
    raw_wav = midi.fluidsynth(fs=sampling_rate, sf2_path=sf2_path)
  File "/home/audeering.local/hwierstorf/.envs/omnizart/lib/python3.6/site-packages/pretty_midi/pretty_midi.py", line 946, in fluidsynth
    sf2_path=sf2_path) for i in self.instruments]
  File "/home/audeering.local/hwierstorf/.envs/omnizart/lib/python3.6/site-packages/pretty_midi/pretty_midi.py", line 946, in <listcomp>
    sf2_path=sf2_path) for i in self.instruments]
  File "/home/audeering.local/hwierstorf/.envs/omnizart/lib/python3.6/site-packages/pretty_midi/instrument.py", line 456, in fluidsynth
    raise ImportError("fluidsynth() was called but pyfluidsynth "
ImportError: fluidsynth() was called but pyfluidsynth is not installed.

Interestingly, I have that package installed:

$ pip show pyfluidsynth
Name: pyFluidSynth
Version: 1.3.0
Summary: Python bindings for FluidSynth, a MIDI synthesizer that uses SoundFont instruments
Home-page: https://github.com/nwhitehead/pyfluidsynth
Author: Nathan Whitehead
Author-email: [email protected]
License: UNKNOWN
Location: /home/audeering.local/hwierstorf/.envs/omnizart/lib/python3.6/site-packages
Requires: numpy
Required-by: omnizart
@hagenw
Copy link
Author

hagenw commented Jul 22, 2021

Relevant for openjournals/joss-reviews#3391

@hagenw
Copy link
Author

hagenw commented Jul 22, 2021

As before I'm running under Ubuntu 18.04 and using Python 3.6.9.

@BreezeWhite
Copy link
Member

Hi, I found that it is due to the lack of fluidsynth on the system, not pyFluidSynth itself. This issue can be fixed by running apt-get install fluidsynth on Ubuntu. I will update the document later.

@hagenw
Copy link
Author

hagenw commented Aug 9, 2021

Thanks for adding this to the docs.

@hagenw hagenw closed this as completed Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants