This PR moves mixing of LADSPA effects in fluid_rvoice_mixer_process_fx() before mixing of the internal reverb and chorus effects. Currently, if a user sets synth.audio-groups >1, LADSPA effects can be applied to specific MIDI channels only. The user can then follow @mawe42's great suggestion from the mailing list and use a zero-gain amp effect to mix the LADSPA buffers back to the first host port for output to the sound card (This seems like the most proper way to do this IMO - the LADSPA subsystem shouldn't have to figure out what FluidSynth's audio output channels are on its own). However, since the internal reverb and chorus are applied first and don't care about synth.audio-groups, the LADSPA effects will appear in the internal effects buffers regardless of which audio_group the currently-playing MIDI channels are part of. Increasing synth.effects-groups is not ideal since it adds a lot of processing load, and also would seem to require that effects-groups always be equal to audio-groups. A user could disable the internal reverb and chorus and add them as LADSPA effects, but it's nice to be able to have backing instruments or tracks from MIDI files play "normally" (i.e. according to the soundfonts' reverb and chorus settings), while a user plays lead with interesting effects that don't alter the backing voices. Resolves #1117. |
||
---|---|---|
.azure | ||
.circleci | ||
.github | ||
.obs | ||
cmake_admin | ||
contrib | ||
doc | ||
include | ||
sf2 | ||
src | ||
test | ||
test-android | ||
.cirrus.yml | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
AUTHORS | ||
ChangeLog | ||
CMakeLists.txt | ||
CONTRIBUTING.md | ||
fluidsynth.conf.in | ||
fluidsynth.pc.in | ||
fluidsynth.service.in | ||
FluidSynthConfig.cmake.in | ||
LICENSE | ||
README.cmake.md | ||
README.md | ||
sonar-project.properties | ||
THANKS | ||
TODO |
FluidSynth
Build Status | |
---|---|
![]() |
|
![]() |
|
FluidSynth is a cross-platform, real-time software synthesizer based on the Soundfont 2 specification.
FluidSynth generates audio by reading and handling MIDI events from MIDI input devices by using a SoundFont. It is the software analogue of a MIDI synthesizer. FluidSynth can also play MIDI files.
Documentation
The central place for documentation and further links is our wiki here at GitHub:
https://github.com/FluidSynth/fluidsynth/wiki
If you are missing parts of the documentation, let us know by writing to our mailing list. Of course, you are welcome to edit and improve the wiki yourself. All you need is an account at GitHub. Alternatively, you may send an EMail to our mailing list along with your suggested changes. Further information about the mailing list is available in the wiki as well.
Latest information about FluidSynth is also available on the web site at https://www.fluidsynth.org/.
License
The source code for FluidSynth is distributed under the terms of the GNU Lesser General Public License, see the LICENSE file. To better understand the conditions how FluidSynth can be used in e.g. commercial or closed-source projects, please refer to the LicensingFAQ in our wiki.
Building from source
For information on how to build FluidSynth from source, please refer to our wiki.
Links
-
FluidSynth's Home Page, https://www.fluidsynth.org
-
FluidSynth's wiki, https://github.com/FluidSynth/fluidsynth/wiki
-
FluidSynth's API documentation, https://www.fluidsynth.org/api/
Historical background
Why did we do it
The synthesizer grew out of a project, started by Samuel Bianchini and Peter Hanappe, and later joined by Johnathan Lee, that aimed at developing a networked multi-user game.
Sound (and music) was considered a very important part of the game. In addition, users had to be able to extend the game with their own sounds and images. Johnathan Lee proposed to use the Soundfont standard combined with intelligent use of midifiles. The arguments were:
-
Wavetable synthesis is low on CPU usage, it is intuitive and it can produce rich sounds
-
Hardware acceleration is possible if the user owns a Soundfont compatible soundcard (important for games!)
-
MIDI files are small and Soundfont2 files can be made small thru the intelligent use of loops and wavetables. Together, they are easier to downloaded than MP3 or audio files.
-
Graphical editors are available for both file format: various Soundfont editors are available on PC and on Linux (Smurf!), and MIDI sequencers are available on all platforms.
It seemed like a good combination to use for an (online) game.
In order to make Soundfonts available on all platforms (Linux, Mac, and Windows) and for all sound cards, we needed a software Soundfont synthesizer. That is why we developed FluidSynth.
Design decisions
The synthesizer was designed to be as self-contained as possible for several reasons:
-
It had to be multi-platform (Linux, macOS, Win32). It was therefore important that the code didn't rely on any platform-specific library.
-
It had to be easy to integrate the synthesizer modules in various environments, as a plugin or as a dynamically loadable object. I wanted to make the synthesizer available as a plugin (jMax, LADSPA, Xmms, WinAmp, Director, ...); develop language bindings (Python, Java, Perl, ...); and integrate it into (game) frameworks (Crystal Space, SDL, ...). For these reasons I've decided it would be easiest if the project stayed very focused on its goal (a Soundfont synthesizer), stayed small (ideally one file) and didn't dependent on external code.