Loudness Equalization Across Stimuli-Within Stimuli

58 ビュー (過去 30 日間)
Buse
Buse 2024 年 12 月 27 日 17:50
コメント済み: Buse 2025 年 1 月 7 日 10:18
Hello Everyone,
I am a PhD student and I am designing auditory stimuli, which are sequences of 50-ms tone-pips (gated on and off with 5-ms raised cosine ramps) with frequencies drawn from a pool of 26 values, equally spaced on a logarithmic scale between 198 and 3563 Hz (12% steps). Each stimulus includes 60 tone-pips, selected from this defined pool and presented in a mixed order, without gap. ( a possible frequencies in a sound sequence could be like :250-445-500-100...etc). (In my case I chose 5 random adjacent frequency for example. and presented them in a mixed order)
When working with different frequencies, you need to adjust their loudness. This is because, even when presented at the same level, some frequencies tend to be perceived as louder than others. To address this, I am using a function shared here: https://github.com/IoSR-Surrey/MatlabToolbox, which follows the ISO226 standards.
My problem is even if I used a loudness correction factor when I play them in my computer some of them sound louder than others. If a sound sequence mostly include higher frequencies, it sounds louder to me.
Is it because I have a mistake in one of my steps (loudness normalization or correction)
I was thinking it could be because of the normalization I was doing. I was using stim=stim/abs(max(stim)) to prevent audio-clipping. Since in here, each stimuli was divided by a different value, I modified this as :stim=stim/abs(3.15). Here 3.15 is chosen because it is the highest value in my stimuli sequences--corresponds to 198 Hz.
However, still I have the same problem and couldn't understand why.
If anyone have any idea or solution- I greatly appreciate it!
%%%% Here are my scripts :
I am creating my tone sequences using a code below (just that part)
stimuli = [315 890 707 561 707 561 315 561 397 707 397 890 561 890 561 397 315 707 561 707 397 890 561 397 707 890 315 707 890 397 315 561 890 397 707 890 315 397 315 397 315 0 707 890 315 890 315 707 397 561 397 890 707 890 315 561 315 707 397 561]
freqpattern=stimuli; %includes my tone sequences as a vector 1x60
for i=1:numel(freqpattern)
tone = fgenTone(freqpattern(i), toneDur, 44100); %toneDur=50 ms 44100= sampling freq
stim = [stim tone];
end
stim=stim/abs(3.15); % I previously used as stim=stim/abs(max(stim));
stim = stim *0.5; %normalization
ID=[stimFolder 'Block' int2str(bi) '\' design.conds{c} '_' num2str(i) '_.wav'];
audiowrite(ID,stim,44100);
Here is fgenTone function which creates tones :
% a function for making a simple tone
% input Freq, len (length in ms) and SampFreq
function sig=fgenTone(freq,len,SampFreq);
sd = 1/SampFreq;
n=[1:SampFreq*(len)/1000];
N=length(n);
t=n*sd;
sig=sin(2*pi*freq*t);
%% add scaling factor (for equal loudness)
sfact=fgetLoudnessCorrectionFactor(freq)
sig=sfact*sig;
sig=fRamp(5,sig); % each tone 5 ms- gated on-off
end
I have a function fgetLoudnessCorrectionFactor (which is called in fgenTone) below which uses iso226 that mentioned :
function fct=fgetLoudnessCorrectionFactor(freq)
% Pure tones (PT) %%%%
dB=iso226(60,freq); %using the 60 phon baseline
dbDiff=dB-60;
fct=10^(dbDiff/20); %power_db = 20 * log10(amp / amp_ref);
end
Many Thanks!
Best Regards,
  3 件のコメント
Buse
Buse 2024 年 12 月 27 日 18:51
Thank you for your answer. For now, I am listening to these sound sequences via my PC's speaker. I know this is not the ideal. I will use headphones(Sennheiser; I am not sure about the model now) and a soundcard for the experiment, but I don't have access to them at the moment. I will double-check, many thanks!
Star Strider
Star Strider 2024 年 12 月 27 日 20:05
My pleasure!

サインインしてコメントする。

採用された回答

William Rose
William Rose 2024 年 12 月 28 日 22:25
編集済み: William Rose 2024 年 12 月 30 日 0:39
[Edit: correct spelling errors. Remove bullet point about ISO226 loudness levels, since I now see that function iso226() does include specification of loudness level.]
The speaker on your notebook computer does not have a flat response. Here are some examples others have posted for their machines:
The examples above demonstrate very non-flat speaker frequency responses. Your system will probably be different and will also be non-flat.
Since you want well-controlled auditory stimuli, you should measure the frequency response of your system. If you use headphones, consult the manufacturer. If you use your computer speakers or other speakers, you can test with this calibrated mic, $37. on Amazon. You download a calibration file for your exact mic by entering the mic serial number on the manufacturer's web site. The frequency response of speakers can vary significantly by direction, so put the test mic (whose response is not direction-dependent, according to the manufacturer) where the listener's head will be, when you calibrate. Also, use signal amplitudes comparable to what you expect to use in your human testing, because the speaker system's response may be somewhat dependent on the amplitude of the input signal.
After you have determined the frequency response of your speakers with the calibrated mic, make a modified input signal, using the correction factors you determined from the speaker frequency repsonse. Repeat the frequency response testing of the speakers, using the modified input signal. One hopes that the measured audio intensities will now be a flat function of frequency. But they might not be, due to the nonlinearities of the system (in particular, due to amplitude-depenedent frequency response, mentoned above). So you may need to do another round of adjusting the input signal amplitudes. Repeat until you are satisfied.
@Buse, I assume your PhD advisor is on top of all this, but just in case:
  • The equal-loudness curves in ISO226 are for continuous pure (i.e. sinusoidal) tones. Your tones are 50 ms long. If I were on your dissertation committee, I would ask about this. Does 50 ms qualify as continuous; what data is there about perceived loudness of short (25-100 ms) tones; what was the tone duration used in the studies whose data was used to write ISO226, etc.
  • ISO532-1 describes perceived loudness of time-varying sounds. Is it applicable to your 50 ms sound pips?
  • The equal loudness curves in ISO226 are for adults ages 18-25.
  • The equal loudness curves in ISO-226-2023 are slightly different from ISO226-2003. The toolbox does ISO226-2003 curves, I think.
Good luck with your research.
  3 件のコメント
Buse
Buse 2024 年 12 月 30 日 14:39
Thank you so much for your detailed and insightful response. It is really helpful and prompts me to consider various aspects of designing auditory experiments.
The equipment I am using consists of high-tech headphones, which should provide a better frequency response compared to standard computer audio. I will also consider testing it. For now, I am working with young adults, so I believe using ISO226 can be appropriate in terms of age. However, I will carefully review and reflect on the other points you mentioned.
Many thanks!
William Rose
William Rose 2024 年 12 月 30 日 16:11
@Buse, You're welcome.

サインインしてコメントする。

その他の回答 (1 件)

Jimmy Lapierre
Jimmy Lapierre 2025 年 1 月 2 日 18:55
If you want to analyze your sequences to see if loudness is perceived as the same for different frequencies, I'd recommend looking at acousticLoudness in the Audio Toolbox. This will account for the stimuli duration.
In particular, the TimeVarying option will show the loudness over time, so that you can compare each 50ms burst in your sequence. Also consider the TimeResolution option in case that helps.
  1 件のコメント
Buse
Buse 2025 年 1 月 7 日 10:18
Thank you very much for your response. This sounds realy useful. I will work on this and update here!
Many Thanks!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMeasurements and Spatial Audio についてさらに検索

タグ

製品


リリース

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by