Best way to push timeline depending on condition / loop through global variable "condition" #1557
Unanswered
vchopurian
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi @vchopurian, When you say that it slows down the experiment, can you describe more what happens? This sounds like a pretty reasonable strategy to me, so I'm wondering if there's something in the details that is causing a problem. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! First of all, thank you all so much for the fantastic work, you've made building an online experiment so much easier! My question might have already been asked, my apologies if this is the case.
I have an experiment with auditory, visual and mixed trials, which show one auditory and one visual stimulus. Those trials should be counterbalanced based on a predefined arrays (getCondList). Further, I have two conditions, whether stimulus 1 or 2 has to be recalled. Depending on the modality of the selected stimulus, I wrote a separate plugin for each visual and auditory reconstruction (recall). This makes it 8 conditions in total (4 (trial type: auditory, visual, auditory-visual and visual-auditory) x 2 (recall stimulus: first or second)). Right now, I've build separate timelines for each of the conditions. Then, I wanted to build a loop for the total number of trials and put the timeline.push(conditionX) into the if statements. However, this seems to slow down the experiment a great deal.
Looks something like this:
Is there any way I could build this a bit smarter? Could anyone give me a hint? Would be eternally grateful!
Beta Was this translation helpful? Give feedback.
All reactions