PennController for IBEX › Forums › Support › Choosing subet of items to present › Reply To: Choosing subet of items to present
Thank you so much, the stimuli are showing now! But for some reason, it seems like parts of the code in my test trials is not running now, even though it was working outside the const format. Here is an example of my test trials:
const alt_test_trial = variable => [ newTimer(500) .start() .wait() , newImage("pl_picture", variable.PlPictureFile) .size(300,200) .print() , newTimer(200) .start() .wait() , newAudio("pl_voicing", variable.PlVoicingFile) .play() , newTimer(2000) .start() .wait() , getImage("pl_picture") .remove() , newImage("sg_picture", variable.SgPictureFile) .size(200,200) .print() , newTimer(200) .start() .wait() , newAudio("sg_voicing", variable.SgVoicingFile) .play() , newTimer(1500) .start() .wait() , newAudio("sg_devoicing", variable.SgDevoicingFile) .play() , newSelector("target") .add( getAudio("sg_voicing") , getAudio("sg_devoicing") ) .shuffle() .keys( "1" , "2" ) .log() .wait() , newTimer(500) .start() .wait() .log( "sg_picture", variable.SgPictureFile ) .log("Item", variable.Item) ]
The problem appears to be with getImage(“pl_picture”).remove() and with the shuffle command in the Selector. When I run the experiment, I first want my plural audio and image to be shown before the image will be removed and the singular audio and image will be shown. As it is now, the plural image is not removed and the singular image is just added below the plural image. In addition, it seems like my sg_voicing and sg_devoicing audio files are not being shuffled in the Selector, as the sg_voicing file always ends up being heard first. Also, when I run my experiment and make sure to consistently choose the sg_voicing file, my results file nevertheless says that I have chosen sg_devoicing a lot of the time. I therefore think there must be something wrong with the key assignment and/or the shuffle command in the Selector element.
I also realised that I have one more design feature in my experiment that I’m not quite sure how to implement. In my testing phase, I would like to have 75% of the trials with a plural trigger and a singular target and 25% of the trials with a singular trigger and a plural target. The example above is of the former type, and I figure that I can make corresponding trials of the latter type by just switching the variables. Then I can define the plural trigger trials as const alt_test_trial_pl and the singular trigger trials as const alt_test_trial_sg for example. But from there on I am stuck, is there any way to implement these two test trial types into the Templates you have suggested?
Sorry for bombarding you with lots of questions, I really appreciate all your help!