[Top][All Lists]

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

Re: [fluid-dev] fluid_synth_one_block()'s use of only fx_left_buf and no

From: David Henningsson
Subject: Re: [fluid-dev] fluid_synth_one_block()'s use of only fx_left_buf and not fx_right_buf
Date: Wed, 22 Jul 2009 04:11:44 +0200
User-agent: Thunderbird (X11/20090608)

Stephen Hazel skrev:
> Hi,
> I'm not sure if I should be asking this here, so forgive me if I'm
> being impolite, etc.

Having peer review of the source code is a good thing, so feel free to
keep asking.

> Now, I have NO background in synth engines, but I'm curious why
> fx_left_buf[0] and
> fx_left_buf[1] are used for reverb_buf and chorus_buf, respectively.
> But fx_right_buf doesn't seem to be used ??

>From what I can tell, first all voices are writing their samples to a
mono buffert, fx_left_buf[0] and fx_left_buf[1]. I would say that this
is bad, since if you have a sample hard panned to the left or right, its
reverb/chorus will still be centered?!

Anyway this mono buffert is then "stereoalized" from fx_left_buf into
fx_left_buf and fx_right_buf, if do_not_mix_fx_to_out is nonzero (or
into the normal buffers otherwise). But the only function calling
fluid_synth_one_block with do_not_mix_fx_to_out to nonzero is
fluid_synth_nwrite_float - and to me it seems like a bug that this
function does not use the result of these buffers?!

It is also used if LADSPA is enabled (which it normally isn't, since it
is buggy).

While looking at the source code I also found that "2" and
"synth->effects_channels" are used confusingly. It would probably be
better coding style to replace "2" and "synth->effects_channels" with a
#define SYNTH_EFFECTS_CHANNELS 2, do you others agree?

> Thanks for giving the world this source!

Thanks for reviewing it :-)

> Where did this originally come from?  Was Creative involved at all?
> Or did some brainiac actually come up with this?

You can find all the brainiacs in the AUTHORS file ;-) I don't think
Creative was involved, except for writing the soundfont specification.

> Soundfonts may not have the most elaborate audio path, but they're
> relatively elegant in their simplicity.
> (Well, simplicity relative to other synthesis sources I've come
> across, at least:)

Out of curiosity, which others have you reviewed?

// David

reply via email to

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