VOGONS

Common searches


First post, by andy504

User metadata
Rank Newbie
Rank
Newbie

Hello-
I would like to get DosBox to play MIDI music using soundfonts in Fluidsynth in OS X. I can't change soundfonts in Quicktime preferences after switching to Snow Leopard (apparently that functionality is gone). I've installed Jack and Fluidsynth and Midi Patchbay in fink and followed the setup instructions for Fluidsynth. They are far from clear, however, and I'm wondering if someone has set up Dosbox with Fluidsynth in OS X and could share what they did to get it working. I'm not even sure I need to run JACK. Any help would be appreciated.
-Thank You

Reply 1 of 18, by DrLex

User metadata
Rank Newbie
Rank
Newbie

I'm reanimating this old thread because I have exactly the same question. Have you (or anyone else) had any success in either getting DOSBox in OS X connected to fluidsynth, or changing the QuickTime soundfont?

I'm currently playing System Shock in DOSBox, and the music sounds pretty awful rendered through QuickTime. I never played the game before, but I seriously doubt that the music is supposed to have out-of-tune bagpipe-like instruments.

I downloaded the FluidR3 sound font and installed fluidsynth through Fink. If I record some of the MIDI output from System Shock with ctrl-alt-F8 and load it in fluidsynth, it sounds a whole lot better. So I would need a way to play DOSBox' midi output with that sound font.

Reply 2 of 18, by DrLex

User metadata
Rank Newbie
Rank
Newbie

In the meantime I have found out that the standard instrument set that QuickTime uses is stored in
/System/Library/Components/CoreAudio.component/Contents/Resources/gs_instruments.dls

I figured, if I replace this file with a better one, the instruments will probably be less icky. First attempts to drop a SF2 file in place failed, apparently it has to be in the demented DLS format. I managed to convert the FluidR3 SF2 file into a DLS level 1 file with Awave in Windows (and merged the GM and GS fonts in the process). And behold, putting this converted file in place of the gs_instruments.dls does the trick! A lot has been lost during the SF2->DLS conversion, but it's better than what the original QuickTime DLS file produced.
The quality still doesn't come anywhere near FluidSynth's output however, so I still hope someone got FS working with DOSBox and can tell me how.

Reply 4 of 18, by DrLex

User metadata
Rank Newbie
Rank
Newbie

I don't have Dune 2, but FluidR3 is very good overall:
http://soundfonts.homemusician.net/collection … _release_3.html
It has two separate files (GM and GS) that need to be loaded together to get the full GS instrument set. For most old games the GM set should suffice.

Reply 5 of 18, by robertmo

User metadata
Rank l33t++
Rank
l33t++

It looks the game uses only GM.

If i am doing everything correctly it sounds way worse than default windows synth. Half of the sfx I hear in intro are just chopper or telephone ringing (by the way, there are no choppers nor telephones in dune 2) 😉

Reply 6 of 18, by DrLex

User metadata
Rank Newbie
Rank
Newbie

😮 I have music through FluidSynth on OS X 10.6! 😎
And it proved to be easy, if you know where to look. The only required software is FluidSynth itself. It was this post by jez that put me on the right track.

In a nutshell, this is what you need to do:

  1. Install fluidsynth (e.g. through Fink) and get a good SoundFont (e.g. see previous post). To convert sfArk to SF2, you can use sfArkXT.
  2. Run fluidsynth with the SF2 file as argument. You can load additional SF2 files from within FS.
  3. Open Audio MIDI Setup (in Applications/Utilities).
  4. Choose ‘Show MIDI Window’ from the ‘Window’ menu and double-click the ‘Network’ icon.
  5. If there's not already a ‘Session’ in the ‘My Sessions’ list, click the ‘+’ button.
  6. Check the ‘Enabled’ checkbox for the session.
  7. In your DOSBox configuration (~/Library/Preferences/DOSBox x.y Preferences), change these values in the [midi] section:
    mididevice=coremidi
    midiconfig=1

Then you can start DOSBox and play your favourite games without being aurally tortured. Each time you have quit DOSBox, you need to re-start fluidsynth (step 2) before starting DOSBox again.
Make sure to setup the game to output music through a MIDI device. You can verify if fluidsynth is actually being used by entering ‘voice_count’ in it while music is playing. This should return a number larger than 0.

Last edited by DrLex on 2010-05-24, 15:30. Edited 1 time in total.

Reply 8 of 18, by DrLex

User metadata
Rank Newbie
Rank
Newbie
robertmo wrote:

It looks the game uses only GM.

If i am doing everything correctly it sounds way worse than default windows synth. Half of the sfx I hear in intro are just chopper or telephone ringing (by the way, there are no choppers nor telephones in dune 2) 😉

It all sounds correct here through FluidR3, no choppers or telephones...

robertmo wrote:

is midiconfig=1 needed?
what happens if you set it to 0 or 2?

Nothing, there is no music. I think the number is supposed to be the ID of the MIDI device, so if it's wrong the commands go nowhere...

Reply 9 of 18, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Good find. I suspect that if you don't write midiconfig=1 at all it will still work, or does it default to 0? I'd really like to know 😉
Much easier would be for dosbox to implement fluidsynth directly and have a config option for it where you enter the soundfont path (Exult does that)

Edit: I have to take this back... Fluidsynth depends on glib and thus implementing Fluidsynth would be a nightmare for releasing Dosbox as you'd need too many libs statically compiled into the binary

Last edited by Dominus on 2010-06-03, 12:29. Edited 1 time in total.

Reply 10 of 18, by DrLex

User metadata
Rank Newbie
Rank
Newbie

The default config file had "midiconfig=", and that doesn't work. It will even mess up the Audio MIDI Setup program if it's open while trying to run DOSBox this way. It's not the same as "midiconfig=0" which just produces no output.

Reply 12 of 18, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Did you try and did not succeed or do you think you can'T compile it? With MacPorts it's quite easy to install/compile it...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 13 of 18, by jikoo

User metadata
Rank Newbie
Rank
Newbie

Hello everybody,

I hope that you will do not consider me as a spammer. I am here to help you.
If you need sfArk, the website is down. So you can download sfARK on this page :

Windows, Mac OSX and Linux versions.
http://woolyss.com/chipmusic-soundfonts.php

Reply 14 of 18, by ruftytufty

User metadata
Rank Newbie
Rank
Newbie

Hi - I'm trying to use the FluidR3 soundfont under 10.6 for the first time, and found the instructions above on this thread.

I installed fluidsynth using macports, and when running fluidsynth, get the following output. Note "coreaudio" error at the bottom.

  • bash-3.2# fluidsynth /Users/phillip/Library/Audio/Sounds/Banks/FluidR3\ GM.SF2
    FluidSynth version 1.1.1
    Copyright (C) 2000-2009 Peter Hanappe and others.
    Distributed under the LGPL license.
    SoundFont(R) is a registered trademark of E-mu Systems, Inc.

    jackd 0.118.0
    Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
    jackd comes with ABSOLUTELY NO WARRANTY
    This is free software, and you are welcome to redistribute it
    under certain conditions; see the file COPYING for details

    JACK compiled with POSIX SHM support.
    loading driver ..
    This device hasn't required input channels inchannels = 2 in_nChannels = 0
    Cannot open the coreaudio driver
    cannot load driver module coreaudio
    poll failed (Bad file descriptor)
    fluidsynth: error: Failed to connect to Jack server.
    Failed to create the audio driver

Anyone know what's going on here, and how to fix it??

Reply 15 of 18, by JCZorkmid

User metadata
Rank Newbie
Rank
Newbie

I tried this out, and it sort of worked. I have an actual MT-32 attached to my system, but I was hoping to use fluidsynth for GM/GS based stuff. For whatever reason DOSBox/CoreMIDI would sometimes decide there were no MIDI devices at all any more and I'd have to reset all my MIDI devices and restart DOSBox (seems like a OS X issue more than a DOSBox issue) before they would be detected again.

Since CoreAudio supports SoundFonts directly I took a stab at adding it to MidiHandler_coreaudio directly. It was a pretty simple change, so I posted the patch on the tracker. Sounds similar to what I was hearing from fluidsynth, and it's a lot fewer moving parts.

JasonPenney.NET

Reply 16 of 18, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

That sounds interesting

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 17 of 18, by johnbear

User metadata
Rank Newbie
Rank
Newbie

Howdy,

Just in case it's useful for anyone (like me) that comes across this thread, I've found a way to achieve the same goal (OS X + soundfonts + DosBox) without using FluidSynth, and I've posted a new thread about it here:

How-to: OS X + soundfonts + DosBox - FluidSynth

Cheers,

John