fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] callbacks


From: Element Green
Subject: Re: [fluid-dev] callbacks
Date: Mon, 8 Nov 2010 10:32:14 -0800

On Mon, Nov 8, 2010 at 12:37 AM, David Henningsson <address@hidden> wrote:
> 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
>

This is also some API that I am interested in, for Swami.  I'll work
on it at some point, if no one gets to it before me.  I think there
may be a callback or something (IIRC) which allows one to know when a
sample is no longer used by FluidSynth, which would help with garbage
sample collection and some limited status.  I'm not certain as to the
thread safety aspect of it currently though.

My current FluidSynth API wishlist:
- 24 bit and/or floating point sample data support
- Voice playback pointer querying
- Current voice count
- Ensure sample garbage collection can occur in a thread safe fashion

Best regards,

Element



reply via email to

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