Instructions on using the PortAudio driver in the Fluidsynth Extension



Navigation: Go to End of Page

Installing and configuring Fluidsynth backends in jOrgan 3.18 and upwards.



Following Windows XP, Microsoft changed the main audio driver from DirectSound to not-so-direct Sound, while retaining the name.

One result in performance was that the latency became worse. However, Fluidsynth can be used with other “backends” or drivers.

You may wish to do this to improve latency or to gain compatibility with the soundcard being used.



Currently (July 2023) the available backends for jOrgan are:



default – using the dsound driver of Windows



drivers at [http://sourceforge.net/projects/jorgan/files/fluidsynth/]:

Fluidsynth 2.2.8 (click to access download)

Fluidsynth 2.1.0 (click to access download)

fluidsynth470-portaudio1920-x86-experimental.zip

fluidsynth1.1.6.dsound.portaudio.jack.x86-1.1.zip





Warnings

1. Backends referred to in the original version of this Tutorial began to present problems when used with any Windows

version later than 8.1. The only sure way to run jOrgan with those later Windows versions and be confident of having good latency,

was now to use a computer with a very capable CPU, and not depend on the backends at all.

However, the picture has improved with the introduction of jOrgan 4.0 beta 1. Note that it is 64-bits and uses Fluidsynth version 2.



The top two backends in the list above provide good latency using jOrgan 4.0 beta 1:

fluidsynth-2.2.8, allowing you to select WASAPI and to use multi-instances of fluidsynth in the disposition (if desired)

Fluidsynth2.1.0_PortAudioALLa64, allowing you to select PORT AUDIO. Its name implies that other options are available,

but this may require other programs such as JACK, ASIO etc. to be installed on your computer.



If you wish to use 32-bits, the third of the backends listed above seems to offer PORT AUDIO with Windows 10 (behaviour with

Windows 11 is unknown currently), with the following possible limitations: it is 32-bits, and does not provide for JACK or for ASIO.

Installing those programs on your computer may remove the latter limitation, but I have not explored that.

(It is listed on the downloads page as “fluidsynth470-portaudio1920-x86-experimental.zip”. You will need to download and unzip it,

and then open TWO folders until you reach the folder called “fluidsynth-portaudio-x86” - as described in 2. below.)



The problems are discussed at some length in the thread “Problems with Fluidsynth Backends on Windows 10”

of the jOrgan-user Mailing List Link Archive:

https://jorgan.info/base/arch/l/link2022a.html#B4 (this bookmark link may be slow to connect).


2. When you unzip the file you have downloaded, you should be presented with a folder which contains a number of files, but no

folders. That is the folder which needs to be placed within the /jorgan/lib/fluidsynth folder, as explained below.

However, in at least one case, the folder you are presented with turns out to be one or more “outer” folders containing

the required folder. So before doing anything further, you should examine the folder (usually by double-clicking on it)

to make sure that it contains only files. No other folder should be used.



(These two warnings were inserted by John Reimer in February 2022 and revised in July 2023.)





NOTE: When using PortAudio-WASAPI you must make sure that the sample rate configured in the Fluidsynth element matches
the sample rate that your soundcard is configured to.



Start jOrgan 3.18 or later and click View/Configuration/Fluidsynth.

Before adding any additional backends you should see:

Fluidsynth backends html 4a0a0417.png

To install the additional backends, open (i.e. unzip) the .zip archives and place the respective subdirectories within the jOrgan directory

found in one of the Program Files folders, as shown below (the actual backend subdirectories may differ from the diagram):

Fluidsynth backends html m5fac64de.png

To configure a backend, start jOrgan 3.18 or later, open a disposition and click View/Configuration/Fluidsynth.

Click on the small black triangle in the Backend drop-down box to open it.

Select the backend you want to use, click Apply, click OK, close jOrgan and restart it.

Clicking Restore installs the “default” backend.


After having placed the backend subdirectories as indicated above you could see for ASIO:

Fluidsynth backends html m7598e309.png

or for WMME/WDMKS/WASAPI:


Fluidsynth backends html m7f4fc512.png

Using the Christie Theatre Organ disposition as example with the WASAPI driver, hereafter is what you see when you go into

Construct mode and open the respective fluidsynth sound elements:

Fluidsynth backends html m2a77e83.png

Fluidsynth backends html m4ef31922.png

Fluidsynth backends html 21b360be.png



NOTE: You will probably need to change the Fluidsynth Properties audio driver to what you are using, such as “portaudio”

(as in the graphics immediately above).

OLD Fluidsynth with PortAudio instructions for pre-jOrgan 3.18 users

Fluidsynth with PortAudio is supported starting with jOrgan 3.13 beta 7 and up to the most recent release - jOrgan 3.15.

Go to jOrgan Installer to download the latest version.

I have been asked by a few people about what the difference is between ASIO and WDM/KS and which one would be

better for them to use.

The bottom line is this:

If you have an ASIO driver for your soundcard, or you want to add VST reverb using JackRouter, then the ASIO driver

is what you should be using.

If you don't have an ASIO driver for your audio device, and are not using VST reverb, then the WDM/KS driver is the one

that you should be using.

For those that are using ASIO4ALL, the ASIO4ALL driver receives audio through the ASIO specification interface, but it

connects to your audio device through WDM/KS or its Win7 update called WaveRT, so unless you are using VST reverbs

with JackRouter, there is no real difference between ASIO -> ASIO4ALL and WDM/KS.



Fluidsynth with PortAudio WDM/KS

WDM/KS is the Windows Driver Model Kernel Streaming driver, which offers much lower latency than the default DSound driver.

  • Download: [fluidsynth-1.1.4-wdmks.zip]

  • Decompress the ZIP file into your 32-bit jOrgan folder, and either allow the old libfluidsynth.dll to be overwritten

    or rename it in order to keep a copy of it.

  • Start jOrgan

  • Load a fluidsynth based disposition

  • Enter Construct Organ mode

  • Locate the Fluidsynth Sound element(s)

  • In the Fluidsynth element's audio driver select portaudio

  • Then in the audio device property select your WDM device

  • Exit Construct Organ mode

  • Test the organ

Notes:

Some audio device drivers are set to a specific sample rate, so the only way to connect to them is to adjust the Fluidsynth

sample rate (which is the sample rate used to connect to the audio device) to match what is set by the driver. Unfortunately I don't

know of a tool that reports back what these set sample rates are.... I just know that some audio devices are hardcoded for 44.1khz,

others to 48khz. Use the trial and error method to see what works for you.

Fluidsynth with PortAudio ASIO

Audio Stream Input/Output (ASIO) is a computer sound card driver protocol for digital audio specified by Steinberg,

providing a low-latency and high fidelity interface between a software application and a computer's sound card. If you do not

have an ASIO driver for your soundcard you may consider using the ASIO4ALL generic driver

(see Instructions on using the generic ASIO4ALL driver).

  • Download: [fluidsynth-1.1.4-asio.zip]

  • Decompress the ZIP file into your 32-bit jOrgan folder, and either allow the old libfluidsynth.dll to be overwritten

    or rename it in order to keep a copy of it.

  • Start jOrgan

  • Load a fluidsynth based disposition

  • Enter Construct Organ mode

  • Locate the Fluidsynth Sound element(s)

  • In the Fluidsynth element's audio driver select portaudio

  • Then in the audio device property select your ASIO device

  • Exit Construct Organ mode

  • Test the organ

NOTE: (from user Dell) If you have a red "X" in the ASIO4ALL WDM Device list for the desired audio card output, try

adjusting the FluidSynth buffers. For example, on my Creative AudioPC (ES1371,ES1373) the "OUT: 2x 4-48khz, 16Bits" Pin

was inactive. I went into jOrgan construct organ menu, selected the FluidSynth driver, and cranked the number of buffers down

from 8 to 2. Went back to usual play mode in jOrgan and magically the ASIO4ALL 'out' pin was a blue arrow again!

Also see the Instructions on using the Jack Audio Connection Kit in Windows so that you can connect the ASIO output

of fluidsynth to other ASIO capable programs (like VST convolution reverbs) and use multiple fluidsynth ASIO sound elements.

Fluidsynth with PortAudio WASAPI

WASAPI (Windows Audio Session API) is an updated Microsoft Windows low latency audio layer available in Windows

Vista and Windows 7.

  • Download: [fluidsynth-1.1.4-wasapi.zip]

  • Decompress the ZIP file into your 32-bit jOrgan folder, and either allow the old libfluidsynth.dll to be

    overwritten or rename it in order to keep a copy of it.

  • Start jOrgan

  • Load a fluidsynth based disposition

  • Enter Construct Organ mode

  • Locate the Fluidsynth Sound element(s)

  • In the Fluidsynth element's audio driver select portaudio

  • Then in the audio device property select your WASAPI device

  • Exit Construct Organ mode

  • Test the organ

Notes: WASAPI can also operate in 'shared' mode, like the dsound driver, so multiple fluidysnth elements are supported.

Release Licenses

Fluidsynth

The Fluidsynth libraries available from these downloads are released under the Lesser General Public License (LGPL).

Please see the Fluidsynth website [[1]] for links to the project SourceCode.

PortAudio

The PortAudio libraries are released under the MIT license:

PortAudio Portable Real-Time Audio Library Copyright (c) 1999-2011 Ross Bencina and Phil Burk

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files

(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,

publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to

do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,

INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR

PURPOSE AND ON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE

LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE

OR OTHER DEALINGS IN THE SOFTWARE. (See http://opensource.org/licenses/mit-license.php)

The PortAudio ASIO library

ASIO is a trademark of [Steinberg Media Technologies GmbH].



This tutorial was written by Graham Goode.



Navigation