From 61809eed52f7ecd8ac7249b2987158bed65ff92e Mon Sep 17 00:00:00 2001 From: Alberto Salvia Novella Date: Tue, 28 Nov 2023 09:04:58 +0100 Subject: [PATCH 1/3] Make chorus and reverb more pleasing, natural and subtler --- AUTHORS | 7 +++++-- doc/fluidsettings.xml | 14 +++++++------- src/synth/fluid_synth.h | 24 ++++++++++++------------ 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/AUTHORS b/AUTHORS index 8854b4bde..a130be0b3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -40,8 +40,11 @@ summary of contributions. changes and bug fixes and got the synthesizer to actually work. Most importantly, he used it on stage to make music. -* S. Christian Collins did much testing of FluidSynth in regards to - EMU10K1 compatibility and provided many synthesis fixes in that regard. +* S. Christian Collins provided many tests and fixes on EMU10K1 + compatibility. He also supplied reference chorus and reverb settings for + developing the default ones. + +* Alberto Salvia Novella developed the default chorus and reverb settings. * Stephane Letz from Grame wrote most of the MidiShare driver, all of the PortAudio driver, ported iiwusynth to MacOS X, and sent in many diff --git a/doc/fluidsettings.xml b/doc/fluidsettings.xml index 69ddaf0c3..ae30412e5 100644 --- a/doc/fluidsettings.xml +++ b/doc/fluidsettings.xml @@ -47,7 +47,7 @@ Developers: chorus.depth num - 8.0 + 4.25 0.0 256.0 @@ -57,7 +57,7 @@ Developers: chorus.level num - 2.0 + 0.6 0.0 10.0 @@ -77,7 +77,7 @@ Developers: chorus.speed num - 0.3 + 0.2 0.1 5.0 @@ -312,7 +312,7 @@ Developers: reverb.damp num - 0.0 + 0.3 0.0 1.0 @@ -322,7 +322,7 @@ Developers: reverb.level num - 0.9 + 0.7 0.0 1.0 @@ -332,7 +332,7 @@ Developers: reverb.room-size num - 0.2 + 0.5 0.0 1.0 @@ -342,7 +342,7 @@ Developers: reverb.width num - 0.5 + 0.8 0.0 100.0 diff --git a/src/synth/fluid_synth.h b/src/synth/fluid_synth.h index cb838e924..7dbcdc556 100644 --- a/src/synth/fluid_synth.h +++ b/src/synth/fluid_synth.h @@ -41,21 +41,21 @@ * * DEFINES */ -#define FLUID_NUM_PROGRAMS 128 -#define DRUM_INST_BANK 128 +#define FLUID_NUM_PROGRAMS 128 +#define DRUM_INST_BANK 128 -#define FLUID_UNSET_PROGRAM 128 /* Program number used to unset a preset */ +#define FLUID_UNSET_PROGRAM 128 /* Program number used to unset a preset */ -#define FLUID_REVERB_DEFAULT_ROOMSIZE 0.2f /**< Default reverb room size */ -#define FLUID_REVERB_DEFAULT_DAMP 0.0f /**< Default reverb damping */ -#define FLUID_REVERB_DEFAULT_WIDTH 0.5f /**< Default reverb width */ -#define FLUID_REVERB_DEFAULT_LEVEL 0.9f /**< Default reverb level */ +#define FLUID_REVERB_DEFAULT_DAMP 0.3f /**< Default reverb damping */ +#define FLUID_REVERB_DEFAULT_LEVEL 0.7f /**< Default reverb level */ +#define FLUID_REVERB_DEFAULT_ROOMSIZE 0.5f /**< Default reverb room size */ +#define FLUID_REVERB_DEFAULT_WIDTH 0.8f /**< Default reverb width */ -#define FLUID_CHORUS_DEFAULT_N 3 /**< Default chorus voice count */ -#define FLUID_CHORUS_DEFAULT_LEVEL 2.0f /**< Default chorus level */ -#define FLUID_CHORUS_DEFAULT_SPEED 0.3f /**< Default chorus speed */ -#define FLUID_CHORUS_DEFAULT_DEPTH 8.0f /**< Default chorus depth */ -#define FLUID_CHORUS_DEFAULT_TYPE FLUID_CHORUS_MOD_SINE /**< Default chorus waveform type */ +#define FLUID_CHORUS_DEFAULT_DEPTH 4.25f /**< Default chorus depth */ +#define FLUID_CHORUS_DEFAULT_LEVEL 0.6f /**< Default chorus level */ +#define FLUID_CHORUS_DEFAULT_N 3 /**< Default chorus voice count */ +#define FLUID_CHORUS_DEFAULT_SPEED 0.2f /**< Default chorus speed */ +#define FLUID_CHORUS_DEFAULT_TYPE FLUID_CHORUS_MOD_SINE /**< Default chorus waveform type */ /*************************************************************** * From f0d62cc5354ad89f312aab9ad3770aba80092e09 Mon Sep 17 00:00:00 2001 From: Alberto Salvia Novella Date: Sat, 2 Dec 2023 10:43:53 +0100 Subject: [PATCH 2/3] Set the gain to the highest that music still sounds as background --- doc/fluidsettings.xml | 2 +- src/synth/fluid_synth.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/fluidsettings.xml b/doc/fluidsettings.xml index ae30412e5..7e1df26ba 100644 --- a/doc/fluidsettings.xml +++ b/doc/fluidsettings.xml @@ -140,7 +140,7 @@ Developers: gain num - 0.2 + 0.6 0.0 10.0 diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c index 07cca126e..9ff06ddd5 100644 --- a/src/synth/fluid_synth.c +++ b/src/synth/fluid_synth.c @@ -223,7 +223,7 @@ void fluid_synth_settings(fluid_settings_t *settings) fluid_settings_register_int(settings, "synth.polyphony", 256, 1, 65535, 0); fluid_settings_register_int(settings, "synth.midi-channels", 16, 16, 256, 0); - fluid_settings_register_num(settings, "synth.gain", 0.2f, 0.0f, 10.0f, 0); + fluid_settings_register_num(settings, "synth.gain", 0.6f, 0.0f, 10.0f, 0); fluid_settings_register_int(settings, "synth.audio-channels", 1, 1, 128, 0); fluid_settings_register_int(settings, "synth.audio-groups", 1, 1, 128, 0); fluid_settings_register_int(settings, "synth.effects-channels", 2, 2, 2, 0); From fd8daae30ff0c3f90861132a03416327e403e527 Mon Sep 17 00:00:00 2001 From: derselbst Date: Tue, 2 Jan 2024 12:59:55 +0100 Subject: [PATCH 3/3] also document old default settings --- doc/fluidsettings.xml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/fluidsettings.xml b/doc/fluidsettings.xml index 7e1df26ba..c805077e4 100644 --- a/doc/fluidsettings.xml +++ b/doc/fluidsettings.xml @@ -47,7 +47,7 @@ Developers: chorus.depth num - 4.25 + 4.25 (since version 2.4.0),
8.0 (2.3.x and older)
0.0 256.0 @@ -57,7 +57,8 @@ Developers: chorus.level num - 0.6 + 0.6 (since version 2.4.0),
2.0 (2.3.x and older)
+ 0.0 10.0 @@ -77,7 +78,7 @@ Developers: chorus.speed num - 0.2 + 0.2 (since version 2.4.0),
0.3 (2.3.x and older)
0.1 5.0 @@ -140,7 +141,7 @@ Developers: gain num - 0.6 + 0.6 (since version 2.4.0),
0.2 (2.3.x and older)
0.0 10.0 @@ -312,7 +313,7 @@ Developers: reverb.damp num - 0.3 + 0.3 (since version 2.4.0),
0.0 (2.3.x and older)
0.0 1.0 @@ -322,7 +323,7 @@ Developers: reverb.level num - 0.7 + 0.7 (since version 2.4.0),
0.9 (2.3.x and older)
0.0 1.0 @@ -332,7 +333,7 @@ Developers: reverb.room-size num - 0.5 + 0.5 (since version 2.4.0),
0.2 (2.3.x and older)
0.0 1.0 @@ -342,7 +343,7 @@ Developers: reverb.width num - 0.8 + 0.8 (since version 2.4.0),
0.5 (2.3.x and older)
0.0 100.0