Cognition labs involve experiments accessed on other websites. However, those experiments at times disappear or stop working because either the technologies change, the websites are taken down, or the developers do not maintain those experiments anymore.
One of such experiments that was crucial during one of the Cognition labs was hearing threshold graph. The experiment was quite simple. It went through a set of frequencies and determined at what level of loudness the participant just-notices the tone (also known as just noticeable difference). For each frequency, the experiment played a sine wave at a certain level of louodness, and then decreased it, or increased it, based on whether the participant could hear the tone. This is known as the ladder procedure. It involves a stimulus delivered at a base level. If the participant notices the stimulus then the level of the stimulus is decreased by a constant step in the dimension relevant to the researcher. In the case of loudness threshold, the stimulus is a tone of a certain frequency. The amplitude, or loudness, is the relevant dimension that is changed. At a certain amplitude of the sine tone, the participant might not hear the tone anymore, in which case the amplitude is increased by a constant step.
To implement this project I used the following resources:
- JavaScript
- HTML
- Chart.js
- Node.js
- Web Audio API
While developing the project one multiple issues arose such as wave clipping, conversion to decibels, and inadequate procedure.
I chose to generate the tones on-demand instead of playing pre-recorded audio tones. Since a tone is a simple sine wave, I used an oscillator that would generate a sinusoidal signal (more info, OscillatorNode).
The way that Web Audio API implements sound output is by using "nodes." These nodes represent units that have specific functionality. For instance, one such node is the one already described which generates a sinusoidal wave.
Another instance of a node would be a GainNode. The GainNode transforms the sinusoidal wave by changing its amplitude; specifically what I need to change the loudness of the generated tones.
The GainNode has a parameter which modifies the amplitude to a desired level. The values of the amplitude can vary from -1
to 1
. The value of one would mean the original generated sinusoidal wave. A value of 0.5
would modify the sinusoidal wave to only half of its amplitude.
Being able to modify the amplitude of the wave, I encountered the problem of the conversion to decibels. Decibels represent the loudness of a physical sound; in other words, decibels represent a measure of the energy of a sound wave apart from its frequency.
However, a measure of the decibels generated electronically did not make any sense because each participant uses different hardware and different volume on their computers.
To solve this issue, I assumed that the maximum amplitude, 1
, must represent base level. Thanks to a sound technician's web site I was able to find a formula to convert the amplitude almost to decibels.
In fact, I found out, that it is impossible to convert computer generated tones to decibels unless they are measured by an external device. The trick to solving this issue is to assume that 0 dB
represent the maximum amplitude of the generated tone, which in the case of the Web Audio API is 1
.
Therefore, any decrease in amplitude would lead to negative decibels. These negative values are referred to as decibel relative to full scale (dBSF).
The next issue I encountered were the noisy tones that were generated after the conversion to decibels. After some research, I found another sound technician's web site that referred to this issue as sound clipping.
Sound clipping happens whenever the amplitude of the sinusoid is greater than the maximum possible amplitude. To compute such a wave, the hardware clips the part of the wave that reaches out of the maxmimum amplitude.
This issue was fixed by defining the amplitude of the GainNode to the desired amplitude instead of its measure in decibels.
The last issue I encountered was related to the accuracy of the identified thresholds. Whenever I would test the experiment, I would find out that for some frequencies the threshold amplitudes were impossible to find because some frequencies can be heard even at very low amplitudes.
To fix this issue I created a new procedure. Instead of incrementing the amplitude by a constant amount each time the program received input from the user, it would find the middle between the amplitude at which the participant could hear the tone and could not.
In other words, at the beginning of the experiment, the initial amplitude in which we can assume the participant to hear the tone would be 1
. In contrast, the initial amplitude in which we can assume that the participant would not hear the tone is 0
.
The program then takes the average of these two values and generates a tone of 0.5
amplitude. If the participant hears the 0.5 amplitude the program updates the value of the audible amplitude to 0.5 and then recalculates the average, which would be 0.25
.
If, on the other hand the participant did not hear the tone with the amplitude of 0.5
then it updates the value of the inaudible amplitude to 0.5 and generates a tone that is the average of those amplitudes, 0.75
.
Then, it repeats this process until the threshold is refined; therefore, determining a more accurate threshold.
One of the strenghts of this experiment is that it can accurately determine the thresholds. On the other hand, one of the weaknesses of this experiment is that it does not, yet, take into account the volume level that was set by the participant.
Thus, a general rule of thumb would be to ask each participant to set their volume to 0.4
to ensure that the between-subjects variation is caused by differences in hardware and participants rather than incorrect setup of the experiment.
By doing this project I further learned that in order to solve the issues that occur those issues should first be researched. Whenever there is a lack of information on how to solve the issue, I am encouraged to find novel solutions to the problems I encounter. I am positive that this experiment, even though small, will ensure that whoever the instructor is they tool will be reliable for more years.
The experiment can be accessed by following this link: Loudness Threshold Experiment.
Other materials
If you are interested, you can find other materials I made during my practicum.
- Kahoot 1
- Kahoot on Microbiome and Nitrogen Cycle
- Phoneme Presentation
- Signal Detection Presentation
- Guinea Pig Care Handbook
This Kahoot was designed for the study session to aid the students learn the topics they went through their class. It does not test knowledge. Nevertheless, it asks the student a series of questions. Then, based on the results of those questions, they use the acquired knowledge to answer other questions.
I presented this PowerPoint in Cognition lab that was related to phoneme discrimination. The reasoning behind this presentation was to elucidate what phonemes are to international students in the simplest manner possible.
I modified a part of the bigger presentation on psychophysics to include a more in-depth explanation of how animals detect the signal in the environment which I presented during the lab.