I’m trying to figure out how to randomize the order of audio files. I’d like to have 2 audio files play back to back in a randomized order (starting automatically on each trial). I see in the documentation that it’s possible to do this with images, but can’t figure out how to do the same with audio files since the Selector environment doesn’t seem to work with them. I’m new to IBEX, but if someone has an example snippet that does something similar (e.g. part of a binary forced-choice experiment), I can probably implement it!
AddHost("https://upload.wikimedia.org/wikipedia/commons/") // This is where the files are
randomAudios = ["8/8f/Nl-winputje.ogg","2/2a/Nl-zonderegisters.ogg"],fisherYates(randomAudios)
If you log your audio elements using the command log("play"), your results file will report a line whenever the audio file is played, indicating its name and when it started playing, this way you can tell which was played first by comparing the timestamps. Another option is to store randomAudios and randomAudios in a couple of global Var elements that you log at the end of your newTrial, following the same method as described on this tutorial page.