On Wed, May 24, 2017 at 1:22 AM, Marcus Weseloh <mar...@weseloh.cc> wrote:
> Hi all, > > I've added a test MIDI file and soundfont to the ticket: > https://sourceforge.net/p/fluidsynth/tickets/50/#b976 > > And Kjetil: if you really want to use the key pressure as volume control > by default in a non-standard way, you could always hack the modulator into > your fluidsynth copy. A patch is attached. It gives you Poly Pressure to > Initial Modulation, in a positive concave unipolar mapping. That means that > positive key pressure values reduce the initial volume of the sound (based > on the velocity of the note on). So it's basically an inversed Expression > controller, just on a single note. But I think something like that should > really only be a hack and not part of FluidSynth... not even as a > configuration option. > > Great! The patch + hack works perfectly as far as I can see (except [1]). Applied like this: patch -p1 < polyphonic_pressure.v1.patch patch -p1 < poly_to_att_hack.patch patch -p1 < lower_boundary_check.patch The poly_to_att_hack patch is so small that I don't see any reason why this can't be #ifdefed into the official repository. It's extremely nice for those of us who uses libfluidsynth in another program as a synthesizer. [1] When calling 'fluid_synth_key_pressure' I had to use 0 as full volume, and 127 as silent. Another thing (not related to poly aftertourch), is there any particular reason this line: "FLUIDSYNTH_API void fluid_event_clear(fluid_event_t* evt);" isn't included in one of files in include/ ? (sorry if this has been asked before)
_______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev