Skip to content

Commit

Permalink
added participant ID entry boxes and adjusted the stimulus level to m…
Browse files Browse the repository at this point in the history
…atch the digits and PRESTO sentences we plan to use.
  • Loading branch information
AdamBosen committed Jul 22, 2021
1 parent 57efff5 commit 283cf2d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
18 changes: 14 additions & 4 deletions 3AFC-AMDT.html
Expand Up @@ -24,6 +24,16 @@

let experimentTimeline = [];


var enterSubjectID = {
type: 'survey-text',
questions:[{prompt: "Please enter your participant ID", name: 'SubjectID'}],
button_label: 'Log in'
}

experimentTimeline.push(enterSubjectID);


//Initialize the audio controller
let audioCtx = new (window.AudioContext || window.webkitAudioContext)();

Expand All @@ -38,7 +48,7 @@
const ONSET_SPECTRUM_SAMPLE = LOWER_CUTOFF / (SAMPLE_RATE / 2) * (STIMULUS_LENGTH / 2);
const OFFSET_SPECTRUM_SAMPLE = UPPER_CUTOFF / (SAMPLE_RATE /2) * (STIMULUS_LENGTH /2);

const TARGET_RMS = 0.035;//-29.12 dB, which is the RMS level of the PRESTO calibration file
const TARGET_RMS = 0.0416;//-27.61 dB, which is the RMS level of the PRESTO calibration file

const RAMP_SAMPLE_LENGTH = 410; //samples, chosen to be about 0.01 s with this sample rate
const MOD_FREQ = 100; //Hz
Expand Down Expand Up @@ -192,9 +202,9 @@

let instructions = {
type: 'instructions',
pages: ['<br>You will hear three sounds.<br>One will sound different.<br>Click on the one that sounds different.',
'<br><br>Click these examples to hear the difference.<br>During the experiment, pick the one that sounds different.' + DEMO_FILLER1_BUTTON + DEMO_TARGET_BUTTON + DEMO_FILLER2_BUTTON,
'<br>The difference will get harder to hear.<br>It is okay to guess.<br>Click Next to begin.'
pages: ['<br><br><br>You will hear three sounds.<br>One will sound different.<br>Click on the one that sounds different.',
'<br><br><br><br>Click these examples to hear the difference.<br>During the experiment, pick the one that sounds different.' + DEMO_FILLER1_BUTTON + DEMO_TARGET_BUTTON + DEMO_FILLER2_BUTTON,
'<br><br><br>The difference will get harder to hear.<br>It is okay to guess.<br>Click Next to begin.'
],
show_clickable_nav: true
}
Expand Down
20 changes: 14 additions & 6 deletions 3AFC-SMDT.html
Expand Up @@ -24,6 +24,16 @@

let experimentTimeline = [];


var enterSubjectID = {
type: 'survey-text',
questions:[{prompt: "Please enter your participant ID", name: 'SubjectID'}],
button_label: 'Log in'
}

experimentTimeline.push(enterSubjectID);


//Initialize the audio controller
let audioCtx = new (window.AudioContext || window.webkitAudioContext)();

Expand All @@ -38,7 +48,7 @@
const ONSET_SPECTRUM_SAMPLE = LOWER_CUTOFF / (SAMPLE_RATE / 2) * (STIMULUS_LENGTH / 2);
const OFFSET_SPECTRUM_SAMPLE = UPPER_CUTOFF / (SAMPLE_RATE /2) * (STIMULUS_LENGTH /2);

const TARGET_RMS = 0.035;//-29.12 dB, which is the RMS level of the PRESTO calibration file
const TARGET_RMS = 0.0416;//-27.61 dB, which is the RMS level of the PRESTO calibration file

const RAMP_SAMPLE_LENGTH = 410; //samples, chosen to be about 0.01 s with this sample rate
const MOD_FREQ = 0.5; //Ripples Per Octave
Expand Down Expand Up @@ -195,17 +205,15 @@

let instructions = {
type: 'instructions',
pages: ['<br>You will hear three sounds.<br>One will sound different.<br>Click on the one that sounds different.',
'<br><br>Click these examples to hear the difference.<br>During the experiment, pick the one that sounds different.' + DEMO_FILLER1_BUTTON + DEMO_TARGET_BUTTON + DEMO_FILLER2_BUTTON,
'<br>The difference will get harder to hear.<br>It is okay to guess.<br>Click Next to begin.'
pages: ['<br><br><br>You will hear three sounds.<br>One will sound different.<br>Click on the one that sounds different.',
'<br><br><br><br>Click these examples to hear the difference.<br>During the experiment, pick the one that sounds different.' + DEMO_FILLER1_BUTTON + DEMO_TARGET_BUTTON + DEMO_FILLER2_BUTTON,
'<br><br><br>The difference will get harder to hear.<br>It is okay to guess.<br>Click Next to begin.'
],
show_clickable_nav: true
}

experimentTimeline.push(instructions);



let prepStimuli = {
type: 'html-button-response',
stimulus: "",
Expand Down

0 comments on commit 283cf2d

Please sign in to comment.