URL of experiment: Pavlovia
Description of the problem: Cannot set start time of a sound file to a variable from the conditions file
I am using the builder, with use of code parts.
I am trying to generate a four-interval auditory discrimination task, with stimuli that differ in duration.
Because I want constant ISIs, I need to set the sound onsets dynamically, i.e., they are specified in the condition file:
Here is two-line example of the data source:
|item|wav1|wav2|wav3|expectedKey|ot1|ot2|ot3|ot4|ot5|ot6|ot7|ot8|
|ked|kedn.mp3|kedn.mp3|gubm.mp3|p|0.2|0.607|0.807|1.214|1.614|2.021|2.221|2.019|
When I set the onset of a sound file to, e.g., ot7 in the builder, this gives rise to an error message
that javascript error unknown reference “asarray”. If I look into the js file, I find that the start is determined by this:
if (t >= asarray($ot7) && b2_sound.status === PsychoJS.Status.NOT_STARTED) {
// keep track of start time/frame for later
Apparently, the asarray is added in the script generation.
When I remove them online (on github) to the followoing, the experiment actually works.
if (t >= ot7 && b2_sound.status === PsychoJS.Status.NOT_STARTED) {
// keep track of start time/frame for later
So apparently, in the script generation process, this “asarray” is added.
Not sure whether this is a bug, or I am making a mistake.
Any way to get around this, so that the complining-script process does not add the
assarray around the provided variable from the conditions file?
Kind regards,
Holger Mitterer