Audios as Stimuli in IAT
Hey Guys, I'm very new to OS and try to implement an IAT that (atm) uses only audio files as stimuli. As my skills in OS still are very rudimentary, I'm currently struggling a lot with the implementation of audio files as stimuli. For the basic IAT structure, I use this template: OSF | An IAT Template for OpenSesame Wiki. As far as I know, audios are to include via a sampler item. And from this discussion post (Using audio stimuli for IAT on Open Sesame — Forum (cogsci.nl)) I take that the reference to my audios via the sampler could work by manipulating the filepath to be smth. like "__pool__/[sound].wav". Yet, I still am pretty lost on how to really implement this.
In the experiment structure, adapted from the template, I have a sketchpad ("first_chance_stim") via which the (usually visual) stimuli are presented to participants. I'd like my adaption to work a same way, meaning that participants can see the typical sketchpad interface, showing the categories and related key-symbols, but playing the audio stimuli (provided by the sampler- I guess).
Also, what would be important is that the count of reaction time per stimuli starts only after the audio has been played. Though that might be a bit much to ask here, without providing the inline code used to start and calculate the reaction time.
Thanks in advance for your help!
Comments
Hi,
Could you share your experiment, I am not sure I am entirely following.
You are right, sound is being played with the
sampler
. To specify the file that you want to be played, you just put the file name in the fieldsoundfile
(without the __pool__), or [sound].wav if you have a variable defined that is sound (note, whatever is stored in sound will be concatenated with.wav
and that is then used as file name. So if in your loop table you have a columnsound
and one of the entries iscow
, then your sampler would read[sound].wav
which evaluated tocow.wav
Now you need to make sure that you have that file in the file pool and you are set.Also, what would be important is that the count of reaction time per stimuli starts only after the audio has been played
If you set the field
duration
tosound
the experiment will halt on that sound until after it has played. If you then add a keyboard response to the sequence, response collection will only start after the sound is over.Hope this helps,
Eduard
Hey, thanks for your response.
I'll append my experiment to this comment. Yet how i try to access the stimuli is by creating a list of variables via inline python (mainly in the prepare_stimuli item) and then try to access the stimuli names in the sampler (audio_shuffle)...It is totally possible that thats completely wrong tbh. :D. As described above yet I only try to adapt the IAT template from OSF to work on audios (and shrunked).
Hi,
The script is a bit too messy to really understand what is going on without more detail. What is definitely wrong is the input field to the sampler. As I said in my first post, you don't just put the variable name in their, but
[sound_name].wav
to make the sampler look for this file in the file pool.Also there is a syntax error in the
run_if
field in one of the loops. Probably there is more wrong, but going through the experiment line by line is quite a time investment that I can't do at the moment. For these kinds of help requests, it makes our life much easier, if you simplify the experiment as much as possible, such that all the unnecessary bits (unrelated to the problem) are not in the way. Usually this also helps you in better understanding the problem.Re-using an experiment that you find online is always tempting and can be quite useful, however, I wouldn't recommend jus using, as you have a harder time understanding what is going on and have to trust the creator blindly that the implementation works. I would rather use is as a source of inspiration when setting up the experiment by myself. Just my 2cents.
Eduard
Hi,
Would you be able to do this via a .csv file? I am doing the same kind of experiment, but I have created a .csv file and I am getting the error message that my sound is not recognized. I am first opening an Excel file and saving it as a .csv file with the first column having "foldername/audiofilename.ogg". Then, I put the .csv as a file into the Loop and Sampler within the loop. However, it says that it does not recognize the string "foldername/audiofilename.ogg". I even tried pasting the entire file path. The experiment is saved in the same place as the folder with all the audio stimuli. Here's a video of my process. Please help!!
Hi,
better share your experiment, and not the video. Then, I can also try it out and maybe find out what is the problem. In any case, please just make a minimal example, maybe with only a single audio file, and with as few items as possible while still preserving the behavior you need help with.
Eduard