OS Win10 PsychoPy version 3.1.0
**Standard Standalone? y
**What are you trying to achieve?: **
Dear all,
We have a routine with a sound stimulus, which is read from our files through a variable. The starting and ending time of the sound are also variables. However, the sound is not playing in this case. There’s no error message coming out, just no sound.
However, when we hard code the sound stimulus (instead of a variable), it works. It seems the problem lies in using variables to read the sound file. Could someone let us know if there’s a solution to this?
I have a similar problem. I use both sound files directly and sound files via variables. When I piloting the experiment on a Windows computer, everything works fine. The direct soundfile works on a Mac, but there is an error message that the variable cannot be found.
Dachs_laut = new sound.Sound({
win: psychoJS.window,
value: ‘Tone/Grundschulblog_Der_Dachs.wav’,
secs: (- 1),
});
Dachs_laut.setVolume(0.8);
key_resp_instr = new core.Keyboard({psychoJS: psychoJS, clock: new util.Clock(), waitForStart: true});
the sounds via variables:
Sound_PreClock = new util.Clock();
File_pre = new sound.Sound({
win: psychoJS.window,
value: ‘A’,
secs: (- 1),
});
File_pre.setVolume(1);
var loop_pre;
var currentLoop;
function loop_preLoopBegin(thisScheduler) {
// set up handler to look after randomisation of conditions etc
loop_pre = new TrialHandler({
psychoJS: psychoJS,
nReps: 1, method: TrialHandler.Method.RANDOM,
extraInfo: expInfo, originPath: undefined,
trialList: ‘conditions_tone.xlsx’,
seed: undefined, name: ‘loop_pre’
});
psychoJS.experiment.addLoop(loop_pre); // add the loop to the experiment
currentLoop = loop_pre; // we’re now the current loop
Hope thats clear? Because i did eyerything with the builder.