Skip to content

feat(sft): Add generic auditory stimulus for audiovisual redundancy#47

Open
Howchie wants to merge 1 commit intomainfrom
feature-sft-auditory-stimulus-10915233214473753573
Open

feat(sft): Add generic auditory stimulus for audiovisual redundancy#47
Howchie wants to merge 1 commit intomainfrom
feature-sft-auditory-stimulus-10915233214473753573

Conversation

@Howchie
Copy link
Owner

@Howchie Howchie commented Mar 19, 2026

This PR adds a generic auditory stimulus to the SFT task, allowing it to function as an audiovisual redundant target task.

It introduces an audio configuration to SftParsedConfig with options for mode, waveform, frequencyHz, durationMs, and volume. When mode is set to "audiovisual", the second visual dot is suppressed, and an auditory tone is played instead using the core AudioService. 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 jspsychRtTask engine was updated to expose an onStimulusPhaseStart hook. The staircase module was also updated to support a configurable stimCode (defaulting to "Hx"), enabling the estimation of auditory thresholds (e.g., using "xH").

All task resources, including the AudioService instance, are properly disposed of upon task completion.


PR created automatically by Jules for task 10915233214473753573 started by @Howchie

- 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.
@google-labs-jules
Copy link
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant