Auditory masking advice.

Hi All,

[Please note that I already sent this a while back, but before I
actually joined the Yahoo group; my previous message has not appeared,
but may be stuck in limbo somewhere, apologies if this therefore ends
up being a duplicate at some point.]

I am attempting to set up a simple (!) auditory masking paradigm using
PsychPortAudio generating white noise to mask complex sinusoidal tones
(i.e., f0 plus a couple of harmonics).

I have code to generate white noise, and to bandpass filter the noise,
and also to generate the tones.

However, does anybody have any advice and pointers of how to implement
the more technical psychoacoustical aspects of an auditory masking
paradigm?

Firstly, obviously I need to calibrate my matlab program with my
output equipment (headphones), which I am guessing will involve
finding a "loudness meter" and taking measures of the noise/tone
output as the particpant would hear it, to get a measure of our output
levels (in dB SPL?).

Secondly, and more related to the PTB PsychPortAudio implementation:

a) Am I right in thinking that when I pass a waveform matrix to
PsychPortAudio, the maximum value range is ±1. That is, any value
outside of ±1 is effectively clipped?
b) How does one go about mapping the relationship between the
amplitude of signal I pass to Matlab, e.g., amplitude of sinusoid
between 0 and ±1, to the nonlinear fucntion of the loudness curves?
In other words, how does one work out the auditory equivalent of a
CLUT which maps linear RGB values to non-linear monitor intensities?

Many thanks for any help, pointers or references that people can send
my way

Best wishes

Jim
The range -1 to +1 is mapped to the minimal/maximal
possible output signal voltage of the soundcard, given
the current volume settings -- the windows volume slider etc.
will modulate the signal with a gain. What you get at
the end depends on the speakers/headphones used,
their frequency output characteristics, the selected
master volume in the sound mixer control panel etc.,
so in the end you'll need some calibrated measurement
equipment to find the mapping between abstract
-1 to +1 values and the output.

Of course the relative noise/signal ratio is set
by simply adding the waveforms of your sines
and your noisesignal together, with some
weighting applied, and everything again
normalized to make sure it stays in the
-1 to +1 range. But as your soundcard/amplifier/
headphones may not be perfectly linear over
the whole frequency range you'll need to calibrate
somehow with measurement equipment if this
is important for your study. I'm not a sound engineer,
so that's all i can tell you.

Oh and for serious audio work on MS-Windows
you'll need an ASIO soundcard and our portaudio
plugin for ASIO, otherwise things like the
built-in audio mixing of Windows may do some
harmful things to the low level properties of
your sound signal.

-mario

--- In psychtoolbox@yahoogroups.com, "jm_parkinson" <jm_parkinson@...> wrote:
>
> Hi all, I've done some searches through the site's archives and can
> find nothing on this.
>
> Can anyone give me some advice or pointers to sources of advice for
> implementing a simple (I think!) auditory masking paradigm using
> PsychPortAudio. (Or even some recommendations of any non-PTB methods
> that might be preferable).
>
>
> My basic need is to use white noise to mask a series of complex sine
> tones. I already have procedures implemented to:
>
> a) generate white noise
> b) bandpass filter the noise
> c) generate complex tones with appropriate amplitude modulation of the
> added harmonics.
>
> My main issue at the moment is with the technical psychoacoustics of
> using PcyhPortAudio. That is, a) how does one determine the relative
> intensities of noise and signal (sine tones), and b) how does one
> determine the mapping between signal strength as determined by
> psychportaudio (which I assume could be taken to be the amplitude of
> the sinusoid rendered in the matrix that is passed to the
> psychportaudio buffer) and the logarithmic dB scale?
>
> I have a feeling a) will need to be determined using external
> audiotory measurement equipment. And to my mind, question b) could be
> alternatively put as "How does one determine the auditory equivalent
> of the CLUT that maps monitor intensity to RGB values passed to PTB".
>
> Many thanks in advance for any help or pointers anyone can give me here
>
> Best wishes
>
> Jim
>
> p.s. am I right in thinking that the maximum range of values that can
> be passed in the matrix that defines a waveform to PsychPortAudio is
> ±1, so anyhting above ±1 is essentially clipped?
>