nwhitehead / pyfluidsynth

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

dll name on windows #11

Closed reedjones closed 3 years ago

reedjones commented 6 years ago

On my windows machine the dll name is "libfluidsynth64"

had to add this line at the top:

lib = find_library('libfluidsynth64')

I also removed the "set reverb full" and "set chorus full" functions, because they aren't present in that dll and gave me errors..

ChristianRomberg commented 6 years ago

Is this an issue for all windows installations of fluidsynth? I'd be surprised because AFAIK the reverb and chorus functions you mentioned are part of all recent binaries.

Reed notifications@github.com schrieb am Do., 26. Juli 2018, 10:14:

On my windows machine the dll name is "libfluidsynth64"

had to add this line at the top:

lib = find_library('libfluidsynth64')

I also removed the "set reverb full" and "set chorus full" functions, because they aren't present in that dll and gave me errors..

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nwhitehead/pyfluidsynth/issues/11, or mute the thread https://github.com/notifications/unsubscribe-auth/AYlAVk0TGVFZQbZUPXa5XEVBLtcb11Cjks5uKXpOgaJpZM4VhXuj .

reedjones commented 6 years ago

Hmm, yeah I think it might be a windows thing. I tried it with multiple different versions.

ChristianRomberg commented 6 years ago

Hm. I haven't found any fluidsynth installer for windows online, and for me (without a windows installation) testing would be pretty awful. I think one way to solve this is to pack known good&tested fluidsynth binaries into the wheel. What do you think? @nwhitehead

nwhitehead commented 6 years ago

I'm OK with including the DLL for Windows wheels (maybe with a special name). I don't have convenient Windows access to do this, sorry.

Laubeee commented 5 years ago

@ChristianRomberg well yes unfortunately there are no binaries for fluidsynth. However fluidsynth 1.1.10 is available through vcpkg which is fairly easy to install and then you can just use: vcpkg install fluidsynth (make sure you use the --triplet x64-windows option for x64 build.)

on a side note: i couldn't get your demo to work (play a chord for 1s with noteon). It runs through but nothing is audible... any idea why? fluidsynth itself seems to work as expected when i play a midi file with the same .sf2 file

ChristianRomberg commented 5 years ago

on a side note: i couldn't get your demo to work (play a chord for 1s with noteon). It runs through but nothing is audible... any idea why? fluidsynth itself seems to work as expected when i play a midi file with the same .sf2 file

@Laubeee That's kinda odd… Maybe a new issue? Do the other tests work? If not I think it might be an issue with the midi drivers. Did you try out the other ones? On my machine it also doesn't work using the standard driver, but using the alsa drivers as specified in the comment works https://github.com/nwhitehead/pyfluidsynth/blob/45772638f92194e4d13f7c71c28f3f2053e20141/test/sequencerTest.py#L35-L37

Laubeee commented 5 years ago

Sorry for the late reply. I didn't see that test file, I was talking about your demo in the readme file, where there is no mention about drivers. Since I am on Windows I don't have alsa, but I have Direct Sound. However when I specify that I got:

fluidsynth: error: Couldn't find the requested audio driver Direct Sound. Valid drivers are: dsound, file.

So I tried dsound, which gave an error in your assert statement (which I think you should remove completely as there is already an error from fluidsynth when the driver cannot be found). When I added dsound to your list of options for assert, it worked :) thanks for the hint

albedozero commented 3 years ago

Most of the issues raised in this thread seem to have been fixed by solving #12, #15, and #19. OP's problem with finding the correct DLL name might have to do with how the FluidSynth binaries were obtained (i.e. installing QSynth or something like). I think @ChristianRomberg 's comment about adding FS binaries to the wheel is a good idea and deserves its own issue, so I'm closing here.