Page 1 of 1
Edit StimulusCodes and associations
Posted: 21 Oct 2013, 18:05
by carlosquijano
Hi,
I would like to change the StimulusCodes of the P3 speller so instead of entire rows and columns flashing, I can select a combination of characters flashing?
Regards,
Carlos Q
Re: Edit StimulusCodes and associations
Posted: 22 Oct 2013, 09:30
by mellinger
Hi,
you will need to modify the way how individual stimuli (matrix elements) are grouped into associations. You can have as many associations as you like (only restricted by the bit width of the StimulusCode state), and these may consist of any subset of stimuli.
Stimulus codes will always correspond to ordinal numbers of associations, and their interpretation will require information about associations, so it is not important to control which actual StimulusCode value will correspond to which association.
In case your question refers to controlling the sequence of StimulusCodes used for presentation, this can be done by modifying the OnNextStimulusCode event handler, which is responsible for producing StimulusCode values in sequence.
HTH,
Juergen
Re: Edit StimulusCodes and associations
Posted: 22 Oct 2013, 22:59
by carlosquijano
Thank you for your prompt response.
Which function/class is responsible for assigning groups of stimuli to specific StimulusCodes?
Regards,
Carlos Q
Re: Edit StimulusCodes and associations
Posted: 24 Oct 2013, 14:30
by mellinger
Hi,
in the P3SpellerTask, the function LoadMenu is doing that.
For background information, please see the documentation of the StimulusTask class in the wiki. The StimulusTask class is the base class for all application modules which present stimuli and classify responses.
Regards,
Juergen
Re: Edit StimulusCodes and associations
Posted: 29 Oct 2013, 17:02
by carlosquijano
Thank you for your response. I have read the StimulusTask class documentation and the P3 Speller does not seem to use the "Associations()[23].add(p.stimulus)" method in its implementation for the visual stimuli. I did notice that audio stimuli uses this method but not for the visual component.
So I am still unsure on how to edit the code to assign groups to stimuli to stimulus codes. What I intend to do is to implement the checkerboard paradigm.
I appreciate your assistance on this matter.
Regards,
Carlos Q
Re: Edit StimulusCodes and associations
Posted: 30 Oct 2013, 15:00
by mellinger
Hi,
for visual stimuli, calling the Associations() function, and obtaining a reference to the current association object, is done first. Then, later in the code, that reference is used to call the Add() function.
It may not be obvious at first sight, but if you look a bit more closely, you will be able to see what it looks like in actual C++ syntax.
Regards,
Juergen