OS (e.g. Win10 Home):
PsychoPy version 2020.2.10:
Standard Standalone? (n) II think I installed Python and then Psychopy as an additional package?:
What are you trying to achieve?:
Hi
I would like to construct an experiment in which a person hears two sounds. Afterwards they can chose if they either want to listen to the sounds again or continue to the next page (where they evaluate how similar the chords are). It is very similar to what this person was doing: Getting Started — PsychoPy v2021.1
What did you try to make it work?:
I got to the point that the two sounds repeat each time ‘y’ is pressed by using a loop. I entered a code component into the routine that contains sound 1 (“C_major__triad_close_root_sinus”). In the tab “End routine” I wrote:
if ‘y’ in trial_a_repetition.keys:
repeat_trial_a.finished = True
I also tried:
if ‘y’ in repetition_trial_a.keys:
continueRoutine = False
What specifically went wrong when you tried that?:
The experiment runs until the first sound is played and then breaks.
The message is:
Generating PsychoPy script…
Running: C: …
16185.1717 INFO Loaded monitor calibration from [‘2021_01_17 18:18’]
pygame 1.9.6
Hello from the pygame community. Contribute - pygame wiki
1.4355 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
6.0833 WARNING User requested fullscreen with size [1280 720], but screen is actually [1920, 1080]. Using actual size
Traceback (most recent call last):
File “C:\ …”, line 468, in
if ‘y’ in repetition_trial_a.keys:
NameError: name ‘repetition_trial_a’ is not defined
Experiment ended.
Do I really have to define repetition_trial_a and if so, how can I do that?
I would be very happy about any advice!