From 137317878e88cf5d934f0010f4dd1cf68d8ae8e7 Mon Sep 17 00:00:00 2001 From: jade <101148768+jadeddelta@users.noreply.github.com> Date: Thu, 21 Nov 2024 02:47:43 -0500 Subject: [PATCH 1/2] add missing data field to audio-button-response --- .changeset/red-news-pull.md | 5 +++++ packages/plugin-audio-button-response/src/index.ts | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 .changeset/red-news-pull.md diff --git a/.changeset/red-news-pull.md b/.changeset/red-news-pull.md new file mode 100644 index 0000000000..328a90185e --- /dev/null +++ b/.changeset/red-news-pull.md @@ -0,0 +1,5 @@ +--- +"@jspsych/plugin-audio-button-response": patch +--- + +annotate missing stimulus data field diff --git a/packages/plugin-audio-button-response/src/index.ts b/packages/plugin-audio-button-response/src/index.ts index 96ad72ecf7..c510f91587 100644 --- a/packages/plugin-audio-button-response/src/index.ts +++ b/packages/plugin-audio-button-response/src/index.ts @@ -100,6 +100,10 @@ const info = { }, }, data: { + /** The path of the audio file that was played. */ + stimulus: { + type: ParameterType.STRING, + }, /** The response time in milliseconds for the participant to make a response. The time is measured from * when the stimulus first began playing until the participant's response.*/ rt: { From 58f0b748b0744a8a1dfd85570b3e763ec517e2b5 Mon Sep 17 00:00:00 2001 From: jade <101148768+jadeddelta@users.noreply.github.com> Date: Thu, 21 Nov 2024 02:51:41 -0500 Subject: [PATCH 2/2] forgot to add to the docs --- docs/plugins/audio-button-response.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/plugins/audio-button-response.md b/docs/plugins/audio-button-response.md index 2f59f1a91f..6131a901f9 100644 --- a/docs/plugins/audio-button-response.md +++ b/docs/plugins/audio-button-response.md @@ -37,6 +37,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | -------------- | ------- | ---------------------------------------- | | rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first began playing until the participant's response. | | response | numeric | Indicates which button the participant pressed. The first button in the `choices` array is 0, the second is 1, and so on. | +| stimulus | string | Path to the audio file that played during the trial. | ## Simulation Mode