Edit StimulusCodes and associations

Forum for software developers to discuss BCI2000 software development
Locked
carlosquijano
Posts: 4
Joined: 07 Oct 2013, 12:53

Edit StimulusCodes and associations

Post by carlosquijano » 21 Oct 2013, 18:05

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

mellinger
Posts: 1052
Joined: 12 Feb 2003, 11:06

Re: Edit StimulusCodes and associations

Post by mellinger » 22 Oct 2013, 09:30

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

carlosquijano
Posts: 4
Joined: 07 Oct 2013, 12:53

Re: Edit StimulusCodes and associations

Post by carlosquijano » 22 Oct 2013, 22:59

Thank you for your prompt response.

Which function/class is responsible for assigning groups of stimuli to specific StimulusCodes?

Regards,

Carlos Q

mellinger
Posts: 1052
Joined: 12 Feb 2003, 11:06

Re: Edit StimulusCodes and associations

Post by mellinger » 24 Oct 2013, 14:30

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

carlosquijano
Posts: 4
Joined: 07 Oct 2013, 12:53

Re: Edit StimulusCodes and associations

Post by carlosquijano » 29 Oct 2013, 17:02

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

mellinger
Posts: 1052
Joined: 12 Feb 2003, 11:06

Re: Edit StimulusCodes and associations

Post by mellinger » 30 Oct 2013, 15:00

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

Locked

Who is online

Users browsing this forum: No registered users and 2 guests