[Openal] Effects/filter chain lacking
Daniel PEACOCK
dpeacock at creativelabs.com
Wed Apr 30 16:06:26 PDT 2008
Hi Tim,
Your X-Fi drivers are pretty old - there are newer ones available from
http://us.creative.com/support/downloads (released March 14th 2008).
It sounds like you want a filtered direct path *and* a filtered send to the
reverb effect (something which the EFXFilter example doesn't actually
demonstrate). To do this you need to add a filter to the direct path in
addition to the filter applied to the effect send used in step (4).
To do this in the EFXFilter example, add this line of code ...
alSourcei(uiSource, AL_DIRECT_FILTER, uiFilter);
immediately before the Play call in the PlayAuxiliaryFilter() function.
Dan
Creative Labs, Inc.
Notice
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying or distribution of the message, or
any action taken by you in reliance on it, is prohibited and may be
unlawful. If you have received this message in error, please delete it
and contact the sender immediately. Thank you.
"Tim Sorrells"
<tsorrells at breaka
wayltd.com> To
"Daniel PEACOCK"
04/30/2008 03:40 <dpeacock at creativelabs.com>
PM cc
<openal at opensource.creative.com>
Subject
RE: [Openal] Effects/filter chain
lacking
WinXP SP 2
Creative SB X-Fi [C8E0]
Driver: 5.12.6.1187 Date: 8/17/2006
OpenAL: 1.1 Summer 2007
My application is doing roughly what EFXFilter is doing, and I can
replicate the problem with EFXFilter, so just use that as an example of the
EFX calls I’m making. The only modifications I’ve made to that sample is
to change the sound played to one of mine, and setting the GAINHF to 0.1 to
more effectively filter out higher pitched sounds. When I run that sample
what I hear for 3 (reverb only) and 4 (filter and reverb) is similar. What
I expect 4 to sound like is closer to 2 (filter only). My desire is to
filter the sound first, then apply reverb to the result of the filter,
which means I shouldn’t hear any of the high pitched, tinkly sounds in my
sample, but I do.
From: Daniel PEACOCK [mailto:dpeacock at creativelabs.com]
Sent: Wednesday, April 30, 2008 4:51 PM
To: Tim Sorrells
Cc: openal at opensource.creative.com
Subject: Re: [Openal] Effects/filter chain lacking
Hi Tim,
> I’m looking through the Effects Extension documentation and there’s
> a lot of discussion which seems to ultimately boil down to one
> parameter which is AL_AUXILIARY_SEND_FILTER which allows you to
> specify the effect and filter applied to a source. Perhaps I’m
> missing something but this only allows the sound designer to specify
> at most one effect and one filter.
The AL_AUXILIARY_SEND_FILTER is used to set-up the sends from a Source to
one of the global effects. Depending upon your hardware you may be able to
configure a Source to send to multiple global effects. For example, an
X-Fi soundcard allows you to create up to 4 global effects, and configure a
Source to have a filtered effect send to each of the global effects.
The AL_DIRECT_FILTER is used to apply a filter to the direct (dry) path of
a Source.
> But what happens when you want
> to apply 2 effects and a filter to a source?
A Source can have a one filter on the dry path (that will have no impact on
the effect sends), and (on X-Fi) up to 4 filtered sends to 4 different
effect slots (none of which will affect the dry path).
> I really want to be able to construct a chain so that I can specify
> something like this: Source->Filter->Effect1->Effect2->Output.
The current specification does not allow chaining of the auxiliary (global)
effects. But you can do this ...
Source->Filter---------->Output (dry path)
|--->Filter->Effect1->Output (send path to Aux Effect 1)
|--->Filter->Effect2->Output (send path to Aux Effect 2)
> I’d
> also like to attach an effect to the master so that every source is
> affected by that without me manually telling it so.
There are no master effects I'm afraid - just global effects.
> Even using the AL_AUXILIARY_SEND_FILTER with a reverb and a low pass
> filter it’s obvious the reverb effect is bypassing the low-pass
> filter.
That doesn't sound right. What soundcard are you using? Do you have up to
date drivers and OpenAL components? Which OpenAL device are you using?
What EFX calls are you making exactly?
> This differs from the graph on page 16 in the
> Effects Extension documentation which puts the filter first, and
> then the effect. Assuming this problem isn’t specific to my
> platform, you can hear this yourself by using the EFXFilter sample.
The EFXFilter sample sounds as expected on my X-Fi card.
You should hear the following ...
1)Original sound (no filters and no sends)
2)low-pass filtered sound with no effects
3)original sound feeding a reverb effect
4)original sound with a filtered send to the reverb effect (just the reverb
should sound muffled)
Dan
ForwardSourceID:NT0005FCFE
More information about the Openal
mailing list