[Top][All Lists]

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

Re: [fluid-dev] sfz on top of fluidsynth

From: Tom M.
Subject: Re: [fluid-dev] sfz on top of fluidsynth
Date: Mon, 21 Oct 2019 20:20:50 +0200

> but there is no corresponding public API to
> release a voice, which is needed for implementing note_off

There is fluid_synth_stop() which forces the voice into release stage, unless 
it is sustained or sostenutoed. Instead of passing in the fluid_voice_t*, you 
have to use fluid_voice_get_id(voice) . This may be important, because the 
pointer points to a pool of voices. Voices may change during rendering calls 
(released, killed, stealed, etc.) so the pointer may not uniquely identify the 
voice. The ID on the other hand identifies a group of voices that are spawned 
by the same noteon event. If you want to control the voice ID yourself (e.g. 
one unique ID for a single voice), I suggest to use fluid_synth_start() .

Note that fluid_synth_noteon() and fluid_synth_noteoff() take care of proper 
legato playing. You won't have that when manually spawning voices, just in case 
that matters for you.

Also note that fluid_synth_noteon() kills overlapping notes.


reply via email to

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