sound_1.finished = True
to:
trials.finished = True
e.g. to get a single random row between 0 and 19, simply enter this in the selectedRows field:
randint(20) # random integer between 0 and 19
However, when I run the experiment, I get the below error message.
I'm sorry about the bad resolution but the last row says "TypeError: 'None Type' objects is not iterable".
Just to make sure, I have also tried running "randint(20)" to see whether 25 was exceeding the number of rows in the condition file or "randint(1,20)" to see whether assigning lower and higher limits (to exclude the first row which is just a name of a variable) will solve the issue but they returned the same error messages.
$[randint(25)]
Just to see what happens, I have also inserted ISI before the presentation (please see below) of the stimuli (sound_1) and used the "set during ISI" function but it only gave me error message.
Getting back to the main topic, below is the properties of my loop.
"Letters.xlsx" is the name of my condition file.
Is there any function to ask PsychoPy to pick different stimuli each time the loop is repeated?
I would deeply appreciate it if you could teach me whether there is such a function or not.
Thank you so much for your patience and continuous support!
Sincerely,
Takashi
As stated earlier, the $[randint()] function worked perfectly for choosing specific single row (i.e. stimuli) from condition file with multiple conditions.However, when I ask the loop to repeat the randomly picked stimuli for "multiple" times (e.g. nReps = 3 in my case shown below), it keeps playing the same stimuli for multiple times until the loop finishes.
(By the way, I initially thought that "set every repeat" function would "renew" the stimuli every time the loop is repeated but I was wondering why it is not the case this time.)
On 15/01/2015, at 20:38, T.O. <takash...@gmail.com> wrote:Hi Michael,I really appreciate your time spent on my recurring questions.I have devoted on programming my rapid auditory presentation (RAP) experiment incorporating your suggestions.The program is running and everything looks great!However, unfortunately, there is one big issue with the presentation of the auditory stimuli.Each stimulus is presented quite fast (0.09ms with ISI of 0.01ms).One trial consists of 30 items and each items (i.e. recorded letters read aloud by a person) are drawn randomly from the list of txt files (e.g. folderName\A.wav).When I play the stream, it has periodic "breaks" (i.e. silent lapses about 0.1 ms) and it sounds like the stream is stopping every 5 or 6 items.I doubted whether this could be caused by overloading the PC since I have so many constraints added to the randomization (i.e. I wrote a code to create csv condition file specifying the order of items in the RAP trial as well as the order of RAP trials themselves within the whole experiment).However, this seems not to be the case since when I created a very simple RAP stream for testing, it still had this periodic lapses.I have also tried running the RAP using longer stimulus presentation time (e.g. 0.3 ms) but the stream still does not seem to be smooth.(Relating to this note, I also found that when the actual wav file has shorter presentation time compared to the assigned presentation time (e.g. wav file length 0.2 ms vs. stimulus presentation time 0.3 ms), the routine keeps repeating the sound like B,B,B,B, instead of just playing plain B. This phenomenon is inconsistent with the PsychoPy manual's description since it says that the sound should stop when the wav file happens to be shorter than the assigned presentation time. I am not sure whether this is a bug of the latest PsychoPy version and is somewhat indirectly causing the above mentioned issue).I would very much appreciate it if you could share with me your assessment whether this problem could be caused by the some bug or some inevitable issue when programming RAP experiments (e.g. PsychoPy jams when too many wav files are loaded at once).Thank you so much for your time!Sincerely,Takashi
On 16/01/2015, at 01:31, T.O. <takash...@gmail.com> wrote:
Hi Michael,