midi2audio icon indicating copy to clipboard operation
midi2audio copied to clipboard

Problems converting from midi to wav

Open WalkingBass opened this issue 4 years ago • 1 comments

Hi, I am having issues converting from midi to wav using your package with your suggested code fs.midi_to_audio(midi_file_path, wav_file_path).

I have been looking into it and have been able to successfully convert using the following line (directly with fluidsynth) subprocess.call(['fluidsynth', '-T', 'wav', '-F', wav_file_path, '-ni', soundfont, midi_file_path]) but not this other line subprocess.call(['fluidsynth', '-F', wav_file_path, '-ni', soundfont, midi_file_path]) so for some reason it seems like fluidsynth on my computer does not like the default value for the file type -T option and I need to specify it.

Would it be an interesting addition to parse the file type from the file path on (second parameter) on your midi2audio and pass it to the subprocess.call(...). It could probably help avoid these kinds of issues. I am relatively new with Github and python but I would be happy to contribute if you are ok with it.

WalkingBass avatar Dec 04 '20 04:12 WalkingBass

Facing same issue

jaykshirsagar05 avatar Apr 27 '21 17:04 jaykshirsagar05