Open drscotthawley opened 10 months ago
Aha! As per this Closed pyfluidsynth
Issue from earlier this year, setting the sample rate to be a float instead of an int makes the error go away.
i.e.
_SAMPLING_RATE = 16000.0
is the fix. Unclear to me why this only shows up on the Mac and not Colab. 🤔
Feel free to close this Issue.
Should we change this: https://github.com/craffel/pretty-midi/blob/0ada945d18d1cbc498db957a715ddee8944c64e6/pretty_midi/fluidsynth.py#L15 to a float then?
What if you just multiplied the sample rate by 1.0 when calling fluidsynth itself? e.g. on line 60
synthesizer = fluidsynth.Synth(samplerate=fs*1.0)
? (To me, this strategy is just a workaround for an issue that "really" should be fixed on fluidsynth's end. )
Better to call float
on it, but yes.
Hello there, this issue seems to be fixed on pyfluidsynth 1.3.3 now
Hi Colin. I wonder if you might have any suggestions for the following.
I'm noticing an error on my Mac with new versions of
pyfluidsynth
,pretty-midi
andfluidsynth
, when I try to run the following codeThat code still works fine on Colab (e.g. in the Tensorflow RNN MIDI demo), but running on my Mac, I get:
On the Mac, I'm getting the error message with both
pyfluidsynth
versions 1.3.1 and 1.3.2.Any idea how one might fix this? Thanks.
Screenshot from my notebook.