aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/midi
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/midi')
-rw-r--r--Alc/midi/base.c4
-rw-r--r--Alc/midi/fluidsynth.c3
-rw-r--r--Alc/midi/sf2load.c6
3 files changed, 10 insertions, 3 deletions
diff --git a/Alc/midi/base.c b/Alc/midi/base.c
index 11c43d25..00114f59 100644
--- a/Alc/midi/base.c
+++ b/Alc/midi/base.c
@@ -295,6 +295,10 @@ void ALfontsound_Construct(ALfontsound *self)
self->MinVelocity = 0;
self->MaxVelocity = 127;
+ self->ModLfoToPitch = 0;
+ self->VibratoLfoToPitch = 0;
+ self->ModEnvToPitch = 0;
+
self->VolEnv.DelayTime = -12000;
self->VolEnv.AttackTime = -12000;
self->VolEnv.HoldTime = -12000;
diff --git a/Alc/midi/fluidsynth.c b/Alc/midi/fluidsynth.c
index d5174887..7855132a 100644
--- a/Alc/midi/fluidsynth.c
+++ b/Alc/midi/fluidsynth.c
@@ -163,6 +163,9 @@ static int FPreset_noteOn(fluid_preset_t *preset, fluid_synth_t *synth, int chan
if(voice == NULL)
return FLUID_FAILED;
+ fluid_voice_gen_set(voice, 5, sound->ModLfoToPitch);
+ fluid_voice_gen_set(voice, 6, sound->VibratoLfoToPitch);
+ fluid_voice_gen_set(voice, 7, sound->ModEnvToPitch);
fluid_voice_gen_set(voice, 33, sound->VolEnv.DelayTime);
fluid_voice_gen_set(voice, 34, sound->VolEnv.AttackTime);
fluid_voice_gen_set(voice, 35, sound->VolEnv.HoldTime);
diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c
index e5fcee43..be2cb1df 100644
--- a/Alc/midi/sf2load.c
+++ b/Alc/midi/sf2load.c
@@ -799,9 +799,9 @@ static void fillZone(ALuint id, const GenModList *zone)
0, /* 2 - startloopAddrOffset */
0, /* 3 - endloopAddrOffset */
0, /* 4 - startAddrCoarseOffset */
- 0, /* 5 - modLfoToPitch */
- 0, /* 6 - vibLfoToPitch */
- 0, /* 7 - modEnvToPitch */
+ AL_MOD_LFO_TO_PITCH_SOFT, /* 5 - modLfoToPitch */
+ AL_VIBRATO_LFO_TO_PITCH_SOFT, /* 6 - vibLfoToPitch */
+ AL_MOD_ENV_TO_PITCH_SOFT, /* 7 - modEnvToPitch */
0, /* 8 - initialFilterFc */
0, /* 9 - initialFilterQ */
0, /* 10 - modLfoToFilterFc */