Littles questions about Looping and Dynamics Parameters #2375
Unanswered
MatthieuFra
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to code an audio experiment using the best/worst scaling technique.
I understood the philosophy of jsPsych framework, and so for now I'm trying to do most of my experiment with the included plugins (before trying if needed to get into proper plugin development).
To do my experiment, I need to have a procedure like that (I'm trying to make it simple to understand before copy/pasting the code) :
BLOCK A :
(For every block of the experiment, I need the subject to be able to listen as many times as he wants to 4 different sounds, and then to respond with a MultiChoice survey to two questions "Wich sound was the best to represent the attribute" et "Wich sound was the worse".)
HtmlButtonResponse
4 choices :
(And a "continue" button, to move forward the loop)
AudioKeyboardResponse
Stimulus corresponding to the above choice(A1, A2, A3 or A4).
NO_KEYS response, trial end after audio.
---------- LOOP -------- ^
SurveyMultiChoice
Question 1
Question 2
Continue button.
BLOCK B :
(Exactly the same but with 4 others sounds from my stimuli sequence.
...
BLOCK n
So that's what I'm trying to get. I think that's it also possible to get all the block done with a nested timeline repeating the procedure and getting the sequence of stimuli from a .json but I'm not there yet.
My piece code so far is the following :
Dynamic parameters :
So from that I'm not sure of how can I get modify it to get the
audioKeyboardResponse
to play the sound corresponding to the previous button that has been chose ?I suppose that there's something with
jsPsych.data.get()
orjsPsych.data.getLastTrialData()
but I don't really see how to perform it.Loop :
To loop the sub-part of the block and allow to listen to the sounds as many times as we want, I thought that I can do something like that :
But It doesn't work ! So I may not think about it the right way, that's why I'm asking for some help to get more used to jsPsych!
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions