Description of the problem: Using the builder, I am currently trying to build an online experiment in which each stimulus has a specific duration. However, when I set in the Stop parameter the name of my column of the .csv file containing the timing with the $ (e.g., $myDuration), in Pavlovia I get the following message right before the stimulus: * ReferenceError: asarray is not defined
How can I solve?
In the newest version I don’t think you need the $ sign in the duration
Thank you, but that actually does not solve the issue.
What type of stimuli? I don’t think durations for sound components work.
Verbal stimuli, I need each stimulus to stay on the screen for a fixed time (different across various stimuli conditions).
By verbal I’m assuming audio.
Create a sound component in an earlier routine and set the start time to after you want the routine to end. You may therefore need to end the routine using continueRoutine=False
You can then start and stop the sound in code using .play() and .stop()
Sorry, to me verbal is a string of letter
Please could you show a screenshot of your text component?
I would like to show the text stimuli in the left column for a given time (right column)
@Glen is right that you don’t need the
duration as it’s already marked as literal.
Hello all. Any further developments on this issue? I ran into the same problem, I am trying to set variable stimuli durations but I receive the same error message when testing in pavlovia. @Daniele_G have you found a workaround?
Sorry, we changed our task, so no developments.
In an earlier version this year, I used the following code in the Begin Routine JS part of a custom code component to implement a jitter and save it to the log:
jitter = (0.6 + Math.random() * 0.4);
I used to put in “$jitter” in the duration part of the respective text component that needed to be jittered.
Now, the following changed:
in addition to defining jitter the way described above I now write the following in the start experiment JS part (as suggested by wakecarter somewhere else):
also, I now need to put “jitter” without the dollar sign in the duration part of the respective text component that needs to be jittered
What version of PsychoPy are you using? I’m hoping that this isn’t needed for 2021.1.3 onwards.
OK that’s great news! I am using 2021.1.2 but hesitant to upgrade so I don’t break anything else!
Unless you’re mid data collection then I’d recommend that you upgrade.