fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] DSP testing


From: Tim Goetze
Subject: Re: [fluid-dev] DSP testing
Date: Tue, 30 Mar 2004 18:54:41 +0200 (CEST)

[Peter Hanappe]

>Josh Green wrote:
>
>> I have a feeling there are probably some issues with stereo output in
>> regards to the phase offset between right/left speakers. Is there
>> currently a way to guarantee multiple voices to all start at the same
>> time? Playing the same note can often sound different for each note on.
>
>No, there currently is any way to guarantee they start together. It
>could happen that the audio thread intervenes between the initialization
>of the first voice and the initialization of the second voice, in which
>case the two voices are shifted by 64 samples. I should test whether
>this really happens and think of a way to fix it if it does. Good point.

i think that the safe way to handle this is to decouple the synth
interface (*_noteon() and friends) from the engine. a possible
solution is to queue commands in a lock-free FIFO that the engine
thread reads from at the start of an audio cycle, and that
fluid_synth_noteon() and friends write to. thus, complete execution
of noteons and the like is guaranteed.

this would also imply that there is no interference problem with
acquiring the synth engine lock when issuing an engine command. in the
current fluid incarnation this is a potential cause of sound dropouts:
command thread acquires synth lock, audio interrupt, audio engine
wants lock, audio thread goes to sleep, lock is released in command
thread, audio wakes up -- this can cause a significant delay.

current incarnation means fluidsynth 1.0.3, i'm getting connection
timeouts from subversions.gnu.org making a CVS update impossible.

also, my apologies for talking theory only, i simply do not have the
spare time to do any substantial work on the synth.

>What suprises me is that it makes that big a difference that you hear
>it. Is there any way you could record it?

if it happens, i think you will notice. it means at least a 64-sample
offset (more possible, depending on the audio cycle length) between
the channels, giving you audible phase cancellation if the left &
right samples are correlated (which usually is the case).

-

btw, i'm for dropping SSE support from the sources if you are going to
work the DSP parts over anyway. the SSE part is almost unreadable, and
the compile-time special casing for SSE in the C parts isn't so nice
either. iirc, Markus reported that there is almost no speed gained
through the use of SSE, which matches my experiences with an SSE-based
10-band equalizer, something which can be parallelized much more
efficiently than fluid.

cheers,

tim




reply via email to

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