Closed RZz96 closed 3 years ago
That doesn‘t sound like a pyfluidsynth issue at all. What is the exact import? I think you got that mixed up. Try one of the examples please and report if that works. Thanks!
Am Freitag 12.02.2019 um 12:53 schrieb RZz96 notifications@github.com:
i have installed pyFluidSynth using pip but by import pyFluidSynth give an error :ModuleNotFoundError: No module named 'pyFluidSynth'. also if i import fluidsynth the i get the error ImportError: Couldn't find the FluidSynth library.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Thank you for the reply :)
i tried this one and i got error : AttributeError: 'module' object has no attribute 'Synth'
import time import fluidsynth
fs = fluidsynth.Synth() fs.start()
sfid = fs.sfload("example.sf2") fs.program_select(0, sfid, 0, 0)
fs.noteon(0, 60, 30) fs.noteon(0, 67, 30) fs.noteon(0, 76, 30)
time.sleep(1.0)
fs.noteoff(0, 60) fs.noteoff(0, 67) fs.noteoff(0, 76)
time.sleep(1.0)
fs.delete()
Don't name one of your own modules / scripts fluidsynth.py
I have this same issue, my script is called player.py I have installed FluidSynth with apt install fluidsynth for debian and can run it from console directly. Runing the py script yeilds the error Module FluidSynth not found
Update: it might be that PyFluidSynth is just not compatible with FluidSynth 2 (latest) using Python3.4 on debian jessie (cant update)
@RZz96 and @digimbyte there is some understandable confusion because there's another, somewhat older package on PyPi called fluidsynth which is not maintained here and does not have a Synth
object. Also, to install pyfluidsynth you would type at the command line
pip install pyfluidsynth
but to use in your code you would add at the top
import fluidsynth
i have installed pyFluidSynth using pip but by import pyFluidSynth give an error :ModuleNotFoundError: No module named 'pyFluidSynth'. also if i import fluidsynth the i get the error ImportError: Couldn't find the FluidSynth library.