iiwusynth-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iiwusynth-devel] Patch: Modulators (general and GM-default)


From: M. Nentwig
Subject: [iiwusynth-devel] Patch: Modulators (general and GM-default)
Date: Sun, 14 Apr 2002 16:29:32 +0300

Hello,

one more patch:
http://prdownloads.sourceforge.net/millisampler/iiwusynth8b_tar.bz2
This is the whole iiwusynth directory. There is no diff file this time,
it was not clear, which original directory is most useful. I could
provide that later, if needed.

I did some work on modulators:
- velocity to initial attenuation (that was already implemented, but not
as a standard modulator)
- velocity to filter cutoff
- Aftertouch to Vib LFO depth (untested)
- Mod wheel to Vib LFO depth
- Volume pedal to initial attenuation (was implemented, but did not
work)
- Pan control to pan (was already implemented)
- Expression pedal to initial attenuation
- Reverb control
- Chorus control
- Pitch bend (still works, I have tried :-)

I added only very little code of my own, but I rearranged a lot of stuff
in iiwu_voice.c.

A 'conceptual' change is in the setup up a voice. Previously it was
necessary to 'fake' a controller event, like for example 'pitch bend',
to get the initial value right. This idea does not work too well, when
dealing with arbitrary modulators (we are not using sound-font defined
modulators at the moment, but that will come sooner or later). If  my
sound font includes several modulators, which affect the same
destination (for example: All four sliders on a master keyboard are
adding to 'initial attenuation'), then the synth would have to first
figure out, which control events to send, and then send those control
changes, one at a time. Nothing impossible, but ineffective and
complicated.

That's where I have rearranged things.
Now the velocity-to-attenuation, velocity-to-filter stuff is implemented
using only modulators, as explained in the sound font standard.
Iiwu_voice_optimize applies each modulator once during voice setup, so
all generators hold the correct modulation value afterwards.
Then the voice parameters are calculated from the generators.
The nice thing about it is that I don't have to worry about initial
values anymore (remember the infamous 'pitch bend' problem). Or to quote
Peter (from iiwu_mod.c), 'it's as simple as that'. Really :-)
The changes so far are mostly limited to iiwu_voice.c and iiwu_synth.c.
(I have some more comments about modulators, but I think it's a big
enough topic to start a new tread with).

Then, the nonlinear modulator curves (concave, convex) are now using the
equation from the standard. I tried the old one first, but it did not
work too well with the new velocity-to-attenuation modulator. I just
remember, there is still a printf-line showing the curves at startup
time. You might want to kick that out...

Finally, minor changes in iiwu_mod: The range is now 127, not 128 (there
are 128 numbers, spanning a range of 127).

The GM-compatible controllers seem to work fine now. I tried some
(huge!) acoustic piano sound fonts from hammersound, the dynamics feel
OK to me now. This was actually the reason why I started cleaning up the
controllers in the first place: Piano dynamics did not really work in
most soundfonts.

The modulation wheel works (although with the ridiculously high LFO
default speed of 8.1 Hz I sometimes wish it wouldn't :-)
Aftertouch is not implemented on the synth end, but I'm quite confident
about it, it's the same like the modulation wheel.
Volume pedal (CC 7) and expression pedal (CC 11), pan (CC 10) and Reverb
send (CC 91) work.

Cheers

Markus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]