nwhitehead / pyfluidsynth

Python bindings for FluidSynth
GNU Lesser General Public License v2.1
197 stars 56 forks source link

fluidsynth: error: Unknown integer parameter 'synth.sample-rate' #37

Closed jakerieger closed 1 year ago

jakerieger commented 2 years ago

Running the sample code in the readme works but I get this error in the console. I tried supplying a sample rate to the fluidsynth.Synth() constructor but that didn't remove it.

lenkaYhH commented 2 years ago

Hi, have you perhaps found a solution? I am currently encountering the same problem and I am also trying to find a solution...

Rainbow-Dreamer commented 2 years ago

You can change the default value of samplerate in __init__ function of Synth class from 44100 to 44100.0, which will fix the error. Change line 614

def __init__(self, gain=0.2, samplerate=44100, channels=256, **kwargs):

to

def __init__(self, gain=0.2, samplerate=44100.0, channels=256, **kwargs):
Fruchtzwerg94 commented 1 year ago

I've created #44 fixing this issue by ensuring a float is passed.