Reaper Grimm
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Fluidsynth / Synth Players
 
Author
All times are GMT. The time now is 04:42. Post New Thread    Post A Reply
Kaiser
Doom64 Guru


Posts: 2672
Registered: 08-00


I've been researching on ways to implement a synth player for the upcoming Doom64EX release and found that Fluidsynth is being used by several source ports already. Though I've read somewhere here that Fluidsynth is heavy on the CPU load which would be bad for low end machines. So there's some questions I'd like to ask and get feedback from.

I've had the joy of experiencing the frustrations of getting Fluidsynth to compile. I've obtained a precompiled .DLL used for Slade and and tried to build a test application. As usual I am getting unresolved symbols on every fluidsynth-related function, even when fluidsynth.h is included. Has anyone had luck in being able to successfully link the fluidsynth library to their application? Also I am assuming that I need the .lib file as well.. but haven't seen any precompiled .lib files yet.

Reason why I am asking these sort of questions is because the majority of Doom64's sound system has been identified, thanks to Natt's help, and I've been identifying more things that makes up the sound system. I've been looking for ways to implement a synth player but if Fluidsynth does in fact hog the CPU then I may consider writing a pseudo-ish synth player to suit my needs. Question is would this be even worth my time? Would I be bitting more than I can chew with this? I am initially thinking this would be simple to do since the music system itself is pretty simple since it only does notes, pitching, panning, and volume fade ins/outs.

I do plan on updating the D64 Bible with information on the sound format and midi format if anyone cares/interested.

Any feedback to my questions/situations is appreciated.

Old Post 07-11-11 00:36 #
Kaiser is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
natt
Junior Member


Posts: 248
Registered: 05-11


Heh, fluidsynth. I use the fluidsynth.dll I compiled myself, however I'm fairly certain I invoked a few black magics for that, so I'd recommend against it, what with the pig blood and all.

Randy Heit maintains a fluidsynth.dll which is better than mine (doesn't pull in glib or gthreads dependencies).

But if you just have a .dll, you need to use a .lib (msvc) or a .a (mingw) file at link time, which you can get by doing magic to the dll:

code:
pexports fluidsynth.dll > fluidsynth.def dlltool -d fluidsynth.def -l libfluidsynth.a lib /def:fluidsynth.def

This creates libfluidsynth.a (usable by mingw at link time), fluidsynth.lib and fluidsynth.exp (usable by msvc at link time).

'pexports' and 'dlltool' are from mingw, 'lib' is from msvc


I believe this is what entryway uses for the official prboom-plus builds; Randy Heit's fluidsynth.dll and a .lib file created as above. If you don't have the appropriate toolchains, I can email you the files no problem.

One thing I can say that's good about this, is the exact same build script works on mingw and linux (and presumably any other posix-like system that fluidsynth compiles on), so you don't lose any cross-platform compatibility.

As far as writing your own synth, IMO it mostly depends on how complex things get. My midi converter spits out "unknown" tags for quite a few of the Doom64 midi events. I know you've looked more closely at the Doom64 sound code than I have; but if one of those turns out to be "set reverb level" and one turns out to be "set lowpass resonance" etc etc, then you're writing a full fledged dsp and you might as well use fluidsynth at that point.

I don't know any real alternatives though. I don't think timidity has a good API. There are a lot of good module file players out there, but I don't think most of them expose their synthesizer as an API either. I did a lot of synthesizer searching when I wrote new sound code for prboom-plus.

Old Post 07-11-11 02:25 #
natt is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Kaiser
Doom64 Guru


Posts: 2672
Registered: 08-00


That's why I am thinking about writing my own synth. Midway's sequence library is capable of doing very simple sequences. So far I've found that Doom64 alone can only do pitch, fade in/outs, panning, and volume control. Quake64 barely does anything with it's sequences despite that it's using the exact same library. I am not catching anything fancy or whatnot. While Doom64 DOES have reverb effects, I do believe its a post mix procedure and not part of the synth itself.

Old Post 07-11-11 04:09 #
Kaiser is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
entryway
Forum Staple


Posts: 2587
Registered: 01-04


DLL by Randy does not work on Win9x. I did not try to understand the reasons (probably because of some *W imports) and just disabled it for 9x.


Kaiser said:
Also I am assuming that I need the .lib file as well.. but haven't seen any precompiled .lib files yet.

You can download libfluidsynth.lib from prboom-plus SVN
https://www.crowproductions.de/repo...bfluidsynth.lib

Last edited by entryway on 07-11-11 at 08:29

Old Post 07-11-11 08:15 #
entryway is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Kaiser
Doom64 Guru


Posts: 2672
Registered: 08-00


I compiled a test application and everything compiled fine but no sound is playing. I assume it's because I am running on Window's XP?

Old Post 07-12-11 04:12 #
Kaiser is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
natt
Junior Member


Posts: 248
Registered: 05-11



Kaiser said:
I compiled a test application and everything compiled fine but no sound is playing. I assume it's because I am running on Window's XP?


Fluidsynth works on WinXP. You can email me your test application if you like, and I'll take a look at it.

Old Post 07-12-11 04:57 #
natt is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Kaiser
Doom64 Guru


Posts: 2672
Registered: 08-00



natt said:


Fluidsynth works on WinXP. You can email me your test application if you like, and I'll take a look at it.



Here ya go:
http://www.speedyshare.com/files/29403529/fs_test.7z

Old Post 07-13-11 01:53 #
Kaiser is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
entryway
Forum Staple


Posts: 2587
Registered: 01-04



Kaiser said:
Here ya go:
http://www.speedyshare.com/files/29403529/fs_test.7z


works for me (test.exe TimGM6mb.sf2)

Old Post 07-13-11 04:40 #
entryway is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Kaiser
Doom64 Guru


Posts: 2672
Registered: 08-00



entryway said:

works for me (test.exe TimGM6mb.sf2)



Yeah, we just resolved it. I was using a broken soundfont but after downloading another one from the web, everything seems to work just fine.

Old Post 07-13-11 05:28 #
Kaiser is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
natt
Junior Member


Posts: 248
Registered: 05-11



Kaiser said:


Yeah, we just resolved it. I was using a broken soundfont but after downloading another one from the web, everything seems to work just fine.



I protest! My awesome soundfont is not broken. It just doesn't supply anything for a lot of instruments because it's not intending to cover the general midi instrument set.

Old Post 07-13-11 05:38 #
natt is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Kaiser
Doom64 Guru


Posts: 2672
Registered: 08-00


haha okay okay I take it back :P

Since now fluidsynth is working without any problems, I may start on working on Doom64ex's synth player. Since I have control over scheduled events, Doom64ex could read and play the midi without converting it to PC format. Though just converting the midi to PC format may just be quicker and easier to do but what's the challenge in that?

Old Post 07-13-11 16:18 #
Kaiser is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 04:42. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Fluidsynth / Synth Players

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory