On 2010-11-07 21:20, Jari Suominen wrote:
Hi there!
I'm developing simple sampler program on top of fluidsynth and am
wondering that is there any way to receive callbacks when voices
finish/loop etc.
Depending on what you're planning to do, you might want to help out with
SWAMI or QSynth instead of building yet another FluidSynth frontend.
Like if I have one sample that is x seconds long
assigned to some key on my soundfont and after that sample has played
through.
Reason for doing this is that I would like to build a custom controller
that would have visual feedback of what is happening inside fluidsynth
engine.
Any ideas how to achieve this. Or did I just miss something in the API?
There is no way (in the API) to get such callbacks. It is possible you
might be able to poll for whether a voice has disappeared or not using
fluid_synth_get_voicelist. Note that usage of this function from a
thread-safe perspective might need some additional thought to make sure
the voices don't disappear in parallel with you trying to read them...
// David
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/fluid-dev