feat(sft): Add generic auditory stimulus for audiovisual redundancy#47
feat(sft): Add generic auditory stimulus for audiovisual redundancy#47
Conversation
- Adds `audio` config to SFT task to support `mode` ("visual" | "audiovisual"), `waveform`, `frequencyHz`, `durationMs`, and `volume`.
- Integrates `AudioService` from `@experiments/core` into the SFT task runner to play tones based on the auditory channel's salience (channel 2).
- Suppresses the second visual dot when `audio.mode` is "audiovisual".
- Updates `buildJsPsychRtTimelineNodes` in `@experiments/core` to expose an `onStimulusPhaseStart` hook for precisely timing auditory stimuli.
- Adds configurable `stimCode` to `StaircaseSpec` (defaulting to "Hx") so the staircase can estimate auditory thresholds ("xH") if desired.
- Ensures all resources are properly disposed of on task completion.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR adds a generic auditory stimulus to the SFT task, allowing it to function as an audiovisual redundant target task.
It introduces an
audioconfiguration toSftParsedConfigwith options formode,waveform,frequencyHz,durationMs, andvolume. Whenmodeis set to "audiovisual", the second visual dot is suppressed, and an auditory tone is played instead using the coreAudioService. The volume of the tone is dynamically scaled based on the target salience of the auditory channel (e.g., distinguishing "HH", "Hx", "xH").To trigger the auditory stimulus precisely, the core
jspsychRtTaskengine was updated to expose anonStimulusPhaseStarthook. The staircase module was also updated to support a configurablestimCode(defaulting to "Hx"), enabling the estimation of auditory thresholds (e.g., using "xH").All task resources, including the
AudioServiceinstance, are properly disposed of upon task completion.PR created automatically by Jules for task 10915233214473753573 started by @Howchie