Hey Bartosz,

you could probably write your own detection routine. FluidSynth keeps a
counter of active voices that you can read
using fluid_synth_get_active_voice_count. One very easy way would be to
patch that into your fluid_synth_write_* function and generate min, max and
avg statistics from it.

Cheers,

    Marcus

2017-12-04 17:32 GMT+01:00 Bartosz Nowotny <bartosznowo...@gmail.com>:

> Hello,
>
> I am using FluidSynth on Android. For performance reasons, I am trying to
> keep the synth.polyphony setting as low as possible while retaining good
> sounding audio. I have a number songs and soundfonts. I have set up
> FluidSynth to use 64 simultaneous voices via synth.polyphony and that works
> for most song and soundfont combinations. Nevertheless, some songs clearly
> run out of available voices and do not sound right. Is there any way to
> programmatically detect how many voices a given MIDI song, using a given
> soundfont, needs? I am trying to strike a balance between performance and
> good sounding audio. If I pick too little simultaneous voices then I risk
> some songs not sounding right (or I will have to get rid of them at all),
> if I pick too many simultaneous voices then I risk sound glitching and
> playback problems on lower end devices. Knowing how much voices my songs
> and soundfonts need is the key to getting that balance just right.
>
> Cheers,
> Bartosz
>
> _______________________________________________
> fluid-dev mailing list
> fluid-dev@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/fluid-dev
>
>
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to