Hi,
I am currently using the builder in StandalonePsychoPy-1.80.01-win32.exe (159.2 MB).
I am trying to set up an experiment where there is a standard tone (100ms) and variable isi (50, 250, 500, 750, 1000 ms) and a comparison tone (100ms +/- X according to an adaptive staircase). The standard and comparison tone are then judged on which is longest.
My initial issue has been setting the duration of my sound file on every repeat (even in a simple random loop scenario).
For simplicity sake, I set up a basic experiment to test this issue. The routine includes a sound file "TestTone.wav" with duration(s) set to read from an xlsx file "$sDur". One column in the xlsx file reads: sDur 0.25 0.5 0.75 1 1.25.
From reading past posts (albeit related to previous versions of psychopy) I understand that the builder doesn't necessarily handle setting the duration of a stimulus to every repeat but that this could be overcome with the following code...which I have implemented:
sound1 = sound.Sound('float(TestTone.wav)', secs=float(sDur))
mySound.play()
When I run my experiment the following error appears:
sound1 = sound.sound(u'TestTone.wav', secs=sDur)
NameError: name 'sDur' is not defined
I do not understand this error as I have defined sDur in the duration tab of my sound file as $sDur and within the first column of my xlsx file.
I guess I therefore have 2 questions:
1. Is it possible to set the duration of a sound file on every repeat
2. In addition is this possible in an interleaved staircase scenario, where the duration of the sound file changes according to the adaptive staircase method.
I have attached copies of the experiment and xlsx file for further clarification.
Any comments at all, however simple, would be greatly appreciated as I am fairly new to psychopy and am keen to gain more knowledge.
Many thanks!