pyfluidsynth icon indicating copy to clipboard operation
pyfluidsynth copied to clipboard

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

Open jakerieger opened this issue 4 years ago • 2 comments

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.

jakerieger avatar Mar 25 '22 18:03 jakerieger

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

lenkaYhH avatar Apr 25 '22 08:04 lenkaYhH

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):

Rainbow-Dreamer avatar May 09 '22 01:05 Rainbow-Dreamer

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

Fruchtzwerg94 avatar Mar 05 '23 23:03 Fruchtzwerg94