Keyboard response during sampler presentation
Hi there,
I have tried to read up on this topic through some of the other discussions but am finding myself lost in the details / other designs seem more complex. Basically, I need to collect a keyboard response (either S or D, where either S or D may be correct depending on the given trial) but this response needs to be collectable during the presentation phase as well as after. The design is structured as follows:
Here, the HF_D_1 loop runs the HF_sequence_1 sequence which contains the variable titled HF_sound (this involves six sound items which are then called in the sampler). The fixation dot is set at a duration 0 to run for the duration of the sequence, and then the sketchpad Recog_mid_1 displays '***' until the next sequence begins (HF_D_1R) - in this instance the second sequence is different to the first (hence D). This runs in the same manner as the last until a "Same/different?" sketchpad prompt appears (SD) also set at duration 0, to which the participant must press either S or D (set by the keyboard response titled End_HF_D_1).
This works well, but my problem is that I need to be able to record responses from the onset of HF_D_1R right up through the presentation of SD, rather than at the end only once SD appears. My understanding from other discussions is that I may need an inline script to do this but again, given the differences in designs I'm having trouble figuring out how to go about this. Any help is appreciated. Thank you!
Comments
Hi,
Yes,
inline_scripts
might be to go-to solution. In the documentation you will see taht you can to all the things that you can do with[sketchpad
s](http://osdoc.cogsci.nl/3.1/manual/python/canvas/) andsampler
s also withinline_script
s and it is all that difficult. First, create canvasses , keyboard times, and load the sounds. Then, enter aloop
in which you start waiting for key presses, depending on the time that has passed inside the loop you present either the one display, or the other, together with the corresponding sound.See for example here
I haven't tested the script, but something along these lines should do the trick.
Good luck,
Eduard