By tbiba - 5/26/2020
Greetings,
I am new to Inquisit and I am still finding ways to come to terms with not having the ability to use variables in the sense I am used to, and I am trying to do what I can with the values attribute.
Goal: I am creating a memory encoding task whereby I would like either a green or red fixation cross to appear on the screen within a trial, when a subject makes the correct or incorrect response respectively. I am unsure how to implement this however what I have tried here is to create two values before the trial, which are then imputed with the latency / 20 rounded - to convert latency to a stimulus frames number - and then this value is used as input to the stimulusframes field to be used as the fixation cross text element onsets within the trial.
Problem: The code below attempts to implement this concept, yet it does not run as I am unsure if this means of imputing a value for stimulusframes is permissible. Is there a way to get this implementation to run? Or otherwise is there a better way to implement this feature of the task? When I try to run the code below I get the following error, yet I am not sure what this is indicating. Error: Missing ',' or '-' before 'varFrameCor'.
Please let me know if any further code or elaboration would be helpful. Many thanks! Thomas
<block enc1block> / trials = [1-4 = sequence(enc1)] / preinstructions = (encinstruc1) / errormessage = false / postinstructions = (encfeedbackpage1) </block>
<values> / varFrameCor = 0 / varFrameIncor = 0 </values>
<trial enc1> / validresponse = ("a","s","d","j","k","l") / beginresponsetime = 0 / numframes = 250 / responseinterrupt = frames / branch = [ if (computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue) values.varFrameCor = round(trial.enc1.latency / 20); else if (computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue) values.varFrameIncor = round(trial.enc1.latency / 20); else values.varFrameIncor = round(trial.enc1.latency / 20); ] / stimulusframes = [varFrameCor=fixationGreen; varFrameIncor=fixationRed; 1=encObjects1; 250=blank; 1=L1reminderenc; 1=L2reminderenc; 1=L3reminderenc; 1=R1reminderenc; 1=R2reminderenc; 1=R3reminderenc] </trial>
<text fixationRed> / items = ("+") / color = red / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text>
<text fixationGreen> / items = ("+") / color = green / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text>
|
By Dave - 5/26/2020
+xGreetings, I am new to Inquisit and I am still finding ways to come to terms with not having the ability to use variables in the sense I am used to, and I am trying to do what I can with the values attribute. Goal: I am creating a memory encoding task whereby I would like either a green or red fixation cross to appear on the screen within a trial, when a subject makes the correct or incorrect response respectively. I am unsure how to implement this however what I have tried here is to create two values before the trial, which are then imputed with the latency / 20 rounded - to convert latency to a stimulus frames number - and then this value is used as input to the stimulusframes field to be used as the fixation cross text element onsets within the trial. Problem: The code below attempts to implement this concept, yet it does not run as I am unsure if this means of imputing a value for stimulusframes is permissible. Is there a way to get this implementation to run? Or otherwise is there a better way to implement this feature of the task? When I try to run the code below I get the following error, yet I am not sure what this is indicating. Error: Missing ',' or '-' before 'varFrameCor'. Please let me know if any further code or elaboration would be helpful. Many thanks! Thomas <block enc1block> / trials = [1-4 = sequence(enc1)] / preinstructions = (encinstruc1) / errormessage = false / postinstructions = (encfeedbackpage1) </block> <values> / varFrameCor = 0 / varFrameIncor = 0 </values> <trial enc1> / validresponse = ("a","s","d","j","k","l") / beginresponsetime = 0 / numframes = 250 / responseinterrupt = frames / branch = [ if (computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue) values.varFrameCor = round(trial.enc1.latency / 20); else if (computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue) values.varFrameIncor = round(trial.enc1.latency / 20); else values.varFrameIncor = round(trial.enc1.latency / 20);] / stimulusframes = [ varFrameCor=fixationGreen; varFrameIncor=fixationRed; 1=encObjects1; 250=blank; 1=L1reminderenc; 1=L2reminderenc; 1=L3reminderenc; 1=R1reminderenc; 1=R2reminderenc; 1=R3reminderenc] </trial> <text fixationRed> / items = ("+") / color = red / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text> <text fixationGreen> / items = ("+") / color = green / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text> You cannot use values in /stimulusframes. (Also, why are you using /stimulusframes instead of /stimulustimes, which is more intuitive and doesn't require you to do any time to frames conversion?)
Either way, if you wish to insert a stimulus dynamically into a trial's stimulus presentation sequence, you ought to use the insertstimulustime() or insertstimulusframe() function respectively:
https://www.millisecond.com/support/docs/v5/html/language/functions/insertstimulustime.htm
You can find numerous examples illustrating its use in this forum.
|
By Dave - 5/26/2020
+x+xGreetings, I am new to Inquisit and I am still finding ways to come to terms with not having the ability to use variables in the sense I am used to, and I am trying to do what I can with the values attribute. Goal: I am creating a memory encoding task whereby I would like either a green or red fixation cross to appear on the screen within a trial, when a subject makes the correct or incorrect response respectively. I am unsure how to implement this however what I have tried here is to create two values before the trial, which are then imputed with the latency / 20 rounded - to convert latency to a stimulus frames number - and then this value is used as input to the stimulusframes field to be used as the fixation cross text element onsets within the trial. Problem: The code below attempts to implement this concept, yet it does not run as I am unsure if this means of imputing a value for stimulusframes is permissible. Is there a way to get this implementation to run? Or otherwise is there a better way to implement this feature of the task? When I try to run the code below I get the following error, yet I am not sure what this is indicating. Error: Missing ',' or '-' before 'varFrameCor'. Please let me know if any further code or elaboration would be helpful. Many thanks! Thomas <block enc1block> / trials = [1-4 = sequence(enc1)] / preinstructions = (encinstruc1) / errormessage = false / postinstructions = (encfeedbackpage1) </block> <values> / varFrameCor = 0 / varFrameIncor = 0 </values> <trial enc1> / validresponse = ("a","s","d","j","k","l") / beginresponsetime = 0 / numframes = 250 / responseinterrupt = frames / branch = [ if (computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue) values.varFrameCor = round(trial.enc1.latency / 20); else if (computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue) values.varFrameIncor = round(trial.enc1.latency / 20); else values.varFrameIncor = round(trial.enc1.latency / 20);] / stimulusframes = [ varFrameCor=fixationGreen; varFrameIncor=fixationRed; 1=encObjects1; 250=blank; 1=L1reminderenc; 1=L2reminderenc; 1=L3reminderenc; 1=R1reminderenc; 1=R2reminderenc; 1=R3reminderenc] </trial> <text fixationRed> / items = ("+") / color = red / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text> <text fixationGreen> / items = ("+") / color = green / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text> You cannot use values in /stimulusframes. (Also, why are you using /stimulusframes instead of /stimulustimes, which is more intuitive and doesn't require you to do any time to frames conversion?) Either way, if you wish to insert a stimulus dynamically into a trial's stimulus presentation sequence, you ought to use the insertstimulustime() or insertstimulusframe() function respectively: https://www.millisecond.com/support/docs/v5/html/language/functions/insertstimulustime.htmYou can find numerous examples illustrating its use in this forum. I'm puzzled by other aspects of your code. First, your code as written does not specify any correct and incorrect responses in the <trial>. The use of /branch does not make sense either, since you're not branching anywhere. I cannot really make sense of what that code is actually supposed to do.
Going off your written description alone, you should simply make use of /iscorrectresponse (not /branch !) to have the trial score the response as either correct or incorrect and then display the green or red fixation stimulus via /correctmessage and /errormessage respecitvely.
|
By Dave - 5/26/2020
+x+x+xGreetings, I am new to Inquisit and I am still finding ways to come to terms with not having the ability to use variables in the sense I am used to, and I am trying to do what I can with the values attribute. Goal: I am creating a memory encoding task whereby I would like either a green or red fixation cross to appear on the screen within a trial, when a subject makes the correct or incorrect response respectively. I am unsure how to implement this however what I have tried here is to create two values before the trial, which are then imputed with the latency / 20 rounded - to convert latency to a stimulus frames number - and then this value is used as input to the stimulusframes field to be used as the fixation cross text element onsets within the trial. Problem: The code below attempts to implement this concept, yet it does not run as I am unsure if this means of imputing a value for stimulusframes is permissible. Is there a way to get this implementation to run? Or otherwise is there a better way to implement this feature of the task? When I try to run the code below I get the following error, yet I am not sure what this is indicating. Error: Missing ',' or '-' before 'varFrameCor'. Please let me know if any further code or elaboration would be helpful. Many thanks! Thomas <block enc1block> / trials = [1-4 = sequence(enc1)] / preinstructions = (encinstruc1) / errormessage = false / postinstructions = (encfeedbackpage1) </block> <values> / varFrameCor = 0 / varFrameIncor = 0 </values> <trial enc1> / validresponse = ("a","s","d","j","k","l") / beginresponsetime = 0 / numframes = 250 / responseinterrupt = frames / branch = [ if (computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue) values.varFrameCor = round(trial.enc1.latency / 20); else if (computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue) values.varFrameIncor = round(trial.enc1.latency / 20); else values.varFrameIncor = round(trial.enc1.latency / 20);] / stimulusframes = [ varFrameCor=fixationGreen; varFrameIncor=fixationRed; 1=encObjects1; 250=blank; 1=L1reminderenc; 1=L2reminderenc; 1=L3reminderenc; 1=R1reminderenc; 1=R2reminderenc; 1=R3reminderenc] </trial> <text fixationRed> / items = ("+") / color = red / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text> <text fixationGreen> / items = ("+") / color = green / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text> You cannot use values in /stimulusframes. (Also, why are you using /stimulusframes instead of /stimulustimes, which is more intuitive and doesn't require you to do any time to frames conversion?) Either way, if you wish to insert a stimulus dynamically into a trial's stimulus presentation sequence, you ought to use the insertstimulustime() or insertstimulusframe() function respectively: https://www.millisecond.com/support/docs/v5/html/language/functions/insertstimulustime.htmYou can find numerous examples illustrating its use in this forum. I'm puzzled by other aspects of your code. First, your code as written does not specify any correct and incorrect responses in the <trial>. The use of /branch does not make sense either, since you're not branching anywhere. I cannot really make sense of what that code is actually supposed to do. Going off your written description alone, you should simply make use of /iscorrectresponse (not /branch !) to have the trial score the response as either correct or incorrect and then display the green or red fixation stimulus via /correctmessage and /errormessage respecitvely. I'm guessing a lot here, but you might want something like this:
<block example> / trials = [1-3 = enc1] </block>
<trial enc1> / validresponse = ("a", "b", "c") / trialduration = 5000 / iscorrectresponse = [ if(trial.enc1.response > 0) { computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue; }; ] / stimulustimes = [0=clearscreen, stimulus, reminder] / errormessage = true(fixationRed, 0) / correctmessage = true(fixationGreen, 0) </trial>
<text stimulus> / items = ("Apple", "Banana", "Coconut") </text>
<list answersCorr1> / items = ("a", "b", "c") / selectionmode = text.stimulus.currentindex </list>
<text reminder> / items = ("Press the first letter of the word you see on screen.") / position = (50%, 10%) </text>
<text fixationRed> / items = ("+") / color = red / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) / erase = false </text>
<text fixationGreen> / items = ("+") / color = green / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) / erase = false </text>
|
By tbiba - 5/27/2020
Hi Dave,
Thank you for your thorough responses here!
Sorry for the confusion about the correct response input - I have included the two lists here that I didn’t include last time. There are two lists as there are always two possible correct responses on each trial. I attempted to implement your suggestions below, however I discovered that the time input to errormessage and correctmessage seem to require that you specify the duration, rather than the onset time which is what I am looking for. I assume this because I tried to use the function you suggested - insertstimulustime() - and while the script still ran, no feedback of any kind was presented. This version runs but it presents the fixation cross at the end of the trial for the duration specified rather than within the trial once the subject makes a response.
Below that I attempted to use the - insertstimulustime() - within branch and this did display the fixation cross within a trial (i.e. on top of the stimulus) at the onset equivalent to the latency. However, the remaining problem is that the fixation cross appears on the subsequent trial after the response has been made, rather that during the current trial when the response was made. I tried adding this same if statement sequence into the ontrialbegin field however this did not seem to work - as I am guessing that the input needs to exist before the trial begins, before that response has been made.
From this I surmise that trial information that is logged within a given trial is usually stored and therefore accessible on the next trial? Is there a way to index and pull information from the current trial to use as input to specify the stimulus onset of the fixation cross within the same trial?
Many thanks, Thomas
************************** approach based on your feedback*************************** <trial enc1> / validresponse = ("a","s","d","j","k","l") / trialduration = 5000 / iscorrectresponse = [ if(trial.enc1.response > 0) { computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue; computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue; }; ] / errormessage = true(fixationGreen, 1000) / correctmessage = true(fixationRed, 1000) / stimulustimes = [0=encObjects1; 5000=blank; 0=L1reminderenc; 0=L2reminderenc; 0=L3reminderenc; 0=R1reminderenc; 0=R2reminderenc; 0=R3reminderenc] </trial>
************************** Alternate approach using branch ***************************
<trial enc1> / validresponse = ("a","s","d","j","k","l") / beginresponsetime = 0 / trialduration = 5000 / responseinterrupt = trial / branch = [ if (computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue) trial.enc1.insertstimulustime(text.fixationGreen, trial.enc1.latency); else if (computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue) trial.enc1.insertstimulustime(text.fixationGreen, trial.enc1.latency); else trial.enc1.insertstimulustime(text.fixationRed, trial.enc1.latency); ] / stimulustimes = [0=encObjects1; 5000=blank; 0=L1reminderenc; 0=L2reminderenc; 0=L3reminderenc; 0=R1reminderenc; 0=R2reminderenc; 0=R3reminderenc] </trial>
********************************** Other relevant code **********************************
list answersCorr1> / items = ("a", "s", "a", "s") / selectionmode = sequence </list>
list answersCorrTS1> / items = ("l", "k", "l", "k") / selectionmode = sequence </list>
<block enc1block> / trials = [1-4 = sequence(enc1)] / preinstructions = (encinstruc1) / errormessage = false / postinstructions = (encfeedbackpage1) </block>
<text fixationRed> / items = ("+") / color = red / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text>
<text fixationGreen> / items = ("+") / color = green / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text>
<expt> / postinstructions = (end) / blocks = [1=enc1block] </expt>
<shape blank> / color = (190, 190, 190) / shape = rectangle / size = (2000, 1000) </shape>
** reminders for encoding
<text L1reminderenc> / items = ("Big~n 'a'") / vposition = (85%) / hposition = (15%) / txbgcolor = (transparent) / erase = false </text>
<text L2reminderenc> / items = ("Light~n 's'") / vposition = (85%) / hposition = (25%) / txbgcolor = (transparent) / erase = false </text>
<text L3reminderenc> / items = ("Man-made~n 'd'") / vposition = (85%) / hposition = (35%) / txbgcolor = (transparent) / erase = false </text>
<text R1reminderenc> / items = ("Natural~n 'j'") / vposition = (85%) / hposition = (65%) / txbgcolor = (transparent) / erase = false </text>
<text R2reminderenc> / items = ("Dark~n 'k'") / vposition = (85%) / hposition = (75%) / txbgcolor = (transparent) / erase = false </text>
<text R3reminderenc> / items = ("Small~n 'l'") / vposition = (85%) / hposition = (85%) / txbgcolor = (transparent) / erase = false </text>
|
By Dave - 5/27/2020
+xHi Dave, Thank you for your thorough responses here! Sorry for the confusion about the correct response input - I have included the two lists here that I didn’t include last time. There are two lists as there are always two possible correct responses on each trial. I attempted to implement your suggestions below, however I discovered that the time input to errormessage and correctmessage seem to require that you specify the duration, rather than the onset time which is what I am looking for. I assume this because I tried to use the function you suggested - insertstimulustime() - and while the script still ran, no feedback of any kind was presented. This version runs but it presents the fixation cross at the end of the trial for the duration specified rather than within the trial once the subject makes a response. Below that I attempted to use the - insertstimulustime() - within branch and this did display the fixation cross within a trial (i.e. on top of the stimulus) at the onset equivalent to the latency. However, the remaining problem is that the fixation cross appears on the subsequent trial after the response has been made, rather that during the current trial when the response was made. I tried adding this same if statement sequence into the ontrialbegin field however this did not seem to work - as I am guessing that the input needs to exist before the trial begins, before that response has been made. From this I surmise that trial information that is logged within a given trial is usually stored and therefore accessible on the next trial? Is there a way to index and pull information from the current trial to use as input to specify the stimulus onset of the fixation cross within the same trial? Many thanks, Thomas ************************** approach based on your feedback*************************** <trial enc1> / validresponse = ("a","s","d","j","k","l") / trialduration = 5000 / iscorrectresponse = [ if(trial.enc1.response > 0) { computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue; computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue; }; ] / errormessage = true(fixationGreen, 1000) / correctmessage = true(fixationRed, 1000) / stimulustimes = [0=encObjects1; 5000=blank; 0=L1reminderenc; 0=L2reminderenc; 0=L3reminderenc; 0=R1reminderenc; 0=R2reminderenc; 0=R3reminderenc] </trial> ************************** Alternate approach using branch *************************** <trial enc1> / validresponse = ("a","s","d","j","k","l") / beginresponsetime = 0 / trialduration = 5000 / responseinterrupt = trial / branch = [ if (computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue) trial.enc1.insertstimulustime(text.fixationGreen, trial.enc1.latency); else if (computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue) trial.enc1.insertstimulustime(text.fixationGreen, trial.enc1.latency); else trial.enc1.insertstimulustime(text.fixationRed, trial.enc1.latency); ] / stimulustimes = [0=encObjects1; 5000=blank; 0=L1reminderenc; 0=L2reminderenc; 0=L3reminderenc; 0=R1reminderenc; 0=R2reminderenc; 0=R3reminderenc] </trial> ********************************** Other relevant code ********************************** list answersCorr1> / items = ("a", "s", "a", "s") / selectionmode = sequence </list> list answersCorrTS1> / items = ("l", "k", "l", "k") / selectionmode = sequence </list> <block enc1block> / trials = [1-4 = sequence(enc1)] / preinstructions = (encinstruc1) / errormessage = false / postinstructions = (encfeedbackpage1) </block> <text fixationRed> / items = ("+") / color = red / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text> <text fixationGreen> / items = ("+") / color = green / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text> <expt> / postinstructions = (end) / blocks = [1=enc1block] </expt> <shape blank> / color = (190, 190, 190) / shape = rectangle / size = (2000, 1000) </shape> ** reminders for encoding <text L1reminderenc> / items = ("Big~n 'a'") / vposition = (85%) / hposition = (15%) / txbgcolor = (transparent) / erase = false </text> <text L2reminderenc> / items = ("Light~n 's'") / vposition = (85%) / hposition = (25%) / txbgcolor = (transparent) / erase = false </text> <text L3reminderenc> / items = ("Man-made~n 'd'") / vposition = (85%) / hposition = (35%) / txbgcolor = (transparent) / erase = false </text> <text R1reminderenc> / items = ("Natural~n 'j'") / vposition = (85%) / hposition = (65%) / txbgcolor = (transparent) / erase = false </text> <text R2reminderenc> / items = ("Dark~n 'k'") / vposition = (85%) / hposition = (75%) / txbgcolor = (transparent) / erase = false </text> <text R3reminderenc> / items = ("Small~n 'l'") / vposition = (85%) / hposition = (85%) / txbgcolor = (transparent) / erase = false </text> You cannot manipulate a trial's stimulus presentation sequence with insertstimulustime() etc. while that presentation sequence is already in progress. Any manipulations you apply can only affect the next instance of the trial.
> I discovered that the time input to errormessage and correctmessage seem to require that you specify the duration, rather than the onset time which is what I am looking for.
This does not matter. The onset of the stimulus is right upon response. Run the example code I gave you in my previous reply. You will see that (1) the fixation cross appears diretly upon response in the given trial, and (2) that it will remain on-screen for the remainder of the given trial.
Here's that applied to your code:
<trial enc1> / validresponse = ("a","s","d","j","k","l") / trialduration = 5000 / iscorrectresponse = [ if (trial.enc1.response > 0) { (computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue || computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue); }; ] / correctmessage = true(fixationGreen, 0) / errormessage = true(fixationRed, 0) / stimulustimes = [0=clearscreen, encObjects1; 0=L1reminderenc; 0=L2reminderenc; 0=L3reminderenc; 0=R1reminderenc; 0=R2reminderenc; 0=R3reminderenc] </trial>
********************************** Other relevant code **********************************
<text encObjects1> / items = ("AL", "SK", "AL", "SK") / select = sequence </text>
<list answersCorr1> / items = ("a", "s", "a", "s") / selectionmode = text.encObjects1.currentindex </list>
<list answersCorrTS1> / items = ("l", "k", "l", "k") / selectionmode = text.encObjects1.currentindex </list>
<block enc1block> / trials = [1-4 = sequence(enc1)] </block>
<text fixationRed> / items = ("+") / color = red / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) / erase = false </text>
<text fixationGreen> / items = ("+") / color = green / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) / erase = false </text>
<expt> / blocks = [1=enc1block] </expt>
** reminders for encoding
<text L1reminderenc> / items = ("Big~n 'a'") / vposition = (85%) / hposition = (15%) / txbgcolor = (transparent) / erase = false </text>
<text L2reminderenc> / items = ("Light~n 's'") / vposition = (85%) / hposition = (25%) / txbgcolor = (transparent) / erase = false </text>
<text L3reminderenc> / items = ("Man-made~n 'd'") / vposition = (85%) / hposition = (35%) / txbgcolor = (transparent) / erase = false </text>
<text R1reminderenc> / items = ("Natural~n 'j'") / vposition = (85%) / hposition = (65%) / txbgcolor = (transparent) / erase = false </text>
<text R2reminderenc> / items = ("Dark~n 'k'") / vposition = (85%) / hposition = (75%) / txbgcolor = (transparent) / erase = false </text>
<text R3reminderenc> / items = ("Small~n 'l'") / vposition = (85%) / hposition = (85%) / txbgcolor = (transparent) / erase = false </text>
<data> / separatefiles = true </data>
|
By tbiba - 5/27/2020
Wow that worked this time - even though it is almost identical to what you sent the first time. For some reason I couldn't get that original code you sent over to run - could have been a superficial mistake on my part.
Thanks so much for your help and sorry for the inconvenience!
|
By tbiba - 5/28/2020
I see why it didn't work when I tried it the first time. I didn't add 0=clearscreen into the stimulus times field - which you specified in the code you sent yet I missed seeing it.
I didn't see any mention of the use of clearscreen in milisecond's documentation online here: https://www.millisecond.com/support/docs/v5/html/language/attributes/stimulustimes.htm
Is there an additional resource that goes into a big more depth and breadth about all the possible arguments that can be fed into these trial fields? I am finding it hard to educate myself about how this language works to prevent asking simple questions and making simple mistakes.
I have one final question about this encoding task. Is there a way to also add feedback at the end of each trail, in addition to during the trail? So in addition to the fixation cross appearing when the subject makes a response, also have the words correct or incorrect display for a second after each trial (having the image and the button press reminders leaving the screen)? The following code below achieves this however I am struggling to get this to work along side the additional code you sent along. I tried adding 0=clearscreen to the stimulus times field instead of using 5000=blank, but I don't know why this doesn't run if I change this.
I wish I had a better intuition for figuring this stuff out on my own, but I am struggling to wrap my head around the operating principles of this language. Therefore if there is more documentation out there that explains how it works mechanistically I would welcome any insights there. Otherwise, thanks for your patience and assistance!
<trial enc1> / stimulustimes = [0=encObjects1; 5000=blank; 0=L1reminderenc; 0=L2reminderenc; 0=L3reminderenc; 0=R1reminderenc; 0=R2reminderenc; 0=R3reminderenc] / validresponse = ("a","s","d","j","k","l") / beginresponsetime = 0 / trialduration = 5000 / responseinterrupt = trial / branch = [ if (computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue) trial.corr; else if (computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue) trial.corr; else trial.incorr; ] </trial>
<trial corr> / stimulustimes = [0=corrTextGreen] / trialduration = 1000 </trial>
<trial incorr> / stimulustimes = [0=corrTextRed] / trialduration = 1000 </trial>
<text corrTextRed> / items = ("Incorrect") / color = red / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text>
<text corrTextGreen> / items = ("Correct") / color = green / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text>
<shape blank> / color = (190, 190, 190) / shape = rectangle / size = (2000, 1000) </shape>
|
By Dave - 5/28/2020
+xI see why it didn't work when I tried it the first time. I didn't add 0=clearscreen into the stimulus times field - which you specified in the code you sent yet I missed seeing it. I didn't see any mention of the use of clearscreen in milisecond's documentation online here: https://www.millisecond.com/support/docs/v5/html/language/attributes/stimulustimes.htmIs there an additional resource that goes into a big more depth and breadth about all the possible arguments that can be fed into these trial fields? I am finding it hard to educate myself about how this language works to prevent asking simple questions and making simple mistakes. I have one final question about this encoding task. Is there a way to also add feedback at the end of each trail, in addition to during the trail? So in addition to the fixation cross appearing when the subject makes a response, also have the words correct or incorrect display for a second after each trial (having the image and the button press reminders leaving the screen)? The following code below achieves this however I am struggling to get this to work along side the additional code you sent along. I tried adding 0=clearscreen to the stimulus times field instead of using 5000=blank, but I don't know why this doesn't run if I change this. I wish I had a better intuition for figuring this stuff out on my own, but I am struggling to wrap my head around the operating principles of this language. Therefore if there is more documentation out there that explains how it works mechanistically I would welcome any insights there. Otherwise, thanks for your patience and assistance! <trial enc1> / stimulustimes = [0=encObjects1; 5000=blank; 0=L1reminderenc; 0=L2reminderenc; 0=L3reminderenc; 0=R1reminderenc; 0=R2reminderenc; 0=R3reminderenc] / validresponse = ("a","s","d","j","k","l") / beginresponsetime = 0 / trialduration = 5000 / responseinterrupt = trial / branch = [ if (computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue) trial.corr; else if (computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue) trial.corr; else trial.incorr; ] </trial> <trial corr> / stimulustimes = [0=corrTextGreen] / trialduration = 1000 </trial> <trial incorr> / stimulustimes = [0=corrTextRed] / trialduration = 1000 </trial> <text corrTextRed> / items = ("Incorrect") / color = red / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text> <text corrTextGreen> / items = ("Correct") / color = green / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) </text> <shape blank> / color = (190, 190, 190) / shape = rectangle / size = (2000, 1000) </shape> The hear of the documentation is the language reference: https://www.millisecond.com/support/docs/v5/html/language/languagereference.htm The documentation for the built-in clearscreen element is here: https://www.millisecond.com/support/docs/v5/html/language/elements/clearscreen.htm
As for your timing question, it's really very straightforward:
<trial enc1> / validresponse = ("a","s","d","j","k","l") / trialduration = 5000 / iscorrectresponse = [ if (trial.enc1.response > 0) { (computer.scancodetochar(trial.enc1.response) == list.answersCorr1.nextvalue || computer.scancodetochar(trial.enc1.response) == list.answersCorrTS1.nextvalue); }; ] / correctmessage = true(fixationGreen, 0) / errormessage = true(fixationRed, 0) / stimulustimes = [0=clearscreen, encObjects1; 0=L1reminderenc; 0=L2reminderenc; 0=L3reminderenc; 0=R1reminderenc; 0=R2reminderenc; 0=R3reminderenc] / branch = [ if (trial.enc1.correct) { trial.corr; } else if (trial.enc1.error) { trial.incorr; } ] </trial>
<trial corr> / stimulustimes = [0=clearscreen, corrTextGreen] / trialduration = 1000 </trial>
<trial incorr> / stimulustimes = [0=clearscreen, corrTextRed] / trialduration = 1000 </trial>
<text corrTextRed> / items = ("Incorrect") / color = red / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) / erase = false </text>
<text corrTextGreen> / items = ("Correct") / color = green / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) / erase = false </text>
********************************** Other relevant code **********************************
<text encObjects1> / items = ("AL", "SK", "AL", "SK") / select = sequence </text>
<list answersCorr1> / items = ("a", "s", "a", "s") / selectionmode = text.encObjects1.currentindex </list>
<list answersCorrTS1> / items = ("l", "k", "l", "k") / selectionmode = text.encObjects1.currentindex </list>
<block enc1block> / trials = [1-4 = sequence(enc1)] </block>
<text fixationRed> / items = ("+") / color = red / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) / erase = false </text>
<text fixationGreen> / items = ("+") / color = green / txbgcolor = (transparent) / fontstyle = ("Arial", 20pt) / erase = false </text>
<expt> / blocks = [1=enc1block] </expt>
** reminders for encoding
<text L1reminderenc> / items = ("Big~n 'a'") / vposition = (85%) / hposition = (15%) / txbgcolor = (transparent) / erase = false </text>
<text L2reminderenc> / items = ("Light~n 's'") / vposition = (85%) / hposition = (25%) / txbgcolor = (transparent) / erase = false </text>
<text L3reminderenc> / items = ("Man-made~n 'd'") / vposition = (85%) / hposition = (35%) / txbgcolor = (transparent) / erase = false </text>
<text R1reminderenc> / items = ("Natural~n 'j'") / vposition = (85%) / hposition = (65%) / txbgcolor = (transparent) / erase = false </text>
<text R2reminderenc> / items = ("Dark~n 'k'") / vposition = (85%) / hposition = (75%) / txbgcolor = (transparent) / erase = false </text>
<text R3reminderenc> / items = ("Small~n 'l'") / vposition = (85%) / hposition = (85%) / txbgcolor = (transparent) / erase = false </text>
<data> / separatefiles = true </data>
|
By tbiba - 5/28/2020
Great thanks this is all very helpful! Yes this seems very straightforward now!
|
|