___________________________________________________________________________________________________________________ *STROOP TEST - voice recognition input* Note: test to ensure that voice recognition works. Script does not record voicerecords. ___________________________________________________________________________________________________________________ last updated: 06-26-2019 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC Script Copyright © 06-26-2019 Millisecond Software ___________________________________________________________________________________________________________________ BACKGROUND INFO ___________________________________________________________________________________________________________________ This script implements an example Stroop test with voice recognition. The classic Stroop paradigm demonstrates the interference of word meaning on the naming of the color in which the words are written as measured by reaction time/accuracy differences to color-meaning congruent and color-meaning incongruent combinations. This script runs a color naming task and a word naming task. The order is counterbalanced by groupnumber. Reference: Stroop, J, R. (1935). Studies of interference in serial verbal reactions. Journal of Experimental Psychology, 18, 643-662. ___________________________________________________________________________________________________________________ TASK DESCRIPTION ___________________________________________________________________________________________________________________ Participants are asked to do a Color Naming and a Word Naming Task. For both task, color words (e.g. red, blue) are presented in different colors. In some of the cases, the color word (e.g. red) and its color (e.g. red) are congruent; in other cases the color word (e.g. red) and its color (e.g. blue) are discongruent. For the Color Naming Task, participants have to say the color of the word as fast as possible. For the Word Naming Task, participants have to say the actual word as fast as possible disregarding their color. ___________________________________________________________________________________________________________________ DURATION ___________________________________________________________________________________________________________________ the default set-up of the script takes appr. XXX minutes to complete (if no task duration is provided, please contact Millisecond Software (katjab@millisecond.com) ___________________________________________________________________________________________________________________ DATA FILE INFORMATION ___________________________________________________________________________________________________________________ The default data stored in the data files are: (1) Raw data file: 'strooptask_withvoicerecognition_raw*.iqdat' (a separate file for each participant) Inquisit Version: The specific Inquisit version used (the 'build') that was run Computer platform: the platform the script was run on (win/mac/ios/android) Date, Time, date and time script was run Subject ID, Group ID, Session ID: with the current subject/groupnumber/session id Blockcode, Blocknum: the name and number of the current block (built-in Inquisit variable) Trialcode, Trialnum: the name and number of the currently recorded trial (built-in Inquisit variable) Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those that do not store data to the data file such as feedback trials Congruence: 1= congruent; 2 = incongruent Color: contains current color of the word Presented Stim: the presented stimuli in order of trial presentation Response: the participant's response (spoken word - as recognized by voice recognition software) ACC: accuracy of response: 1 = correct response; 0 = otherwise Latency: the response latency (in ms); measured from: (2) Summary data file: 'strooptask_withvoicerecognition_summary*.iqdat' (a separate file for each participant) Computer Platform: the platform the script was run on (win/mac/ios/android) Date: date script was run Time: time script was started Subject ID: assigned subject id number Group ID: assigned group id number Session ID: assigned session id number Script Duration: time it took to run script (in ms); measured from onset to offset of script Script Completion: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) mean corrRT congruentColor: mean latency (in ms) for correct congruent stimuli in the color block mean corrRT incongruentColor: mean latency (in ms) for correct incongruent stimuli in the color block ErrorRate congruentColor: errorate for congruent stimuli in the color block ErrorRate incongruentColor: errorate for congruent stimuli in the color block mean corrRT congruentWord: mean latency (in ms) for correct congruent stimuli the word naming block mean corrRT incongruentWord: mean latency (in ms) for correct incongruent stimuli the word naming block ErrorRate congruentWord: errorate for congruent stimuli in the word naming block ErrorRate incongruentWord: errorate for congruent stimuli in the word naming block ___________________________________________________________________________________________________________________ EXPERIMENTAL SET-UP ___________________________________________________________________________________________________________________ This script runs a color naming task and a word naming task. The order is counterbalanced by groupnumber. odd groupnumbers -> color naming task, word naming task even groupnumbers -> word naming task, color naming task Color Naming Task: 25 trials - 5 repetitions of the each of the 5 color words (red, green, blue, black, yellow) is presented in each of the 5 colors once (= 4 incongruent: 1 congruent trials) Participants have to name the color of the word as fast as possible (disregarding the word's meaning) Word Naming Task: 25 trials - 5 repetitions of the each of the 5 color words (red, green, blue, black, yellow) is presented in each of the 5 colors once. Participants have to say the word as fast as possible (disregarding its color) ___________________________________________________________________________________________________________________ STIMULI ___________________________________________________________________________________________________________________ The four color words: red, green, blue, yellow ___________________________________________________________________________________________________________________ INSTRUCTIONS ___________________________________________________________________________________________________________________ see section Editable Instructions ___________________________________________________________________________________________________________________ EDITABLE CODE ___________________________________________________________________________________________________________________ check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** / 1 = "rouge" / 2 = "vert" / 3 = "bleu" / 4 = "jaune" / items = ("screen.png") / position = (50%, 20%) ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) / lastlabel = ("Appuyez sur la barre espace pour continuer") / nextlabel = ("Appuyez sur la barre espace pour continuer") ^^^^^^Bienvenue dans l'entrainement de la tâche de Stroop. ^Dans cette tâche, des mots vous seront présentés en différentes couleurs. ^^Vous devrez dire à haute voix la COULEUR dans laquelle chaque mot est présenté à l'écran tout en ignorant ce que les mots disent réellement. ^^Exemple : si vous voyez le mot ROUGE présenté dans la couleur VERT, dites VERT quelle que soit la signification du mot. ^^^Essayez de répondre aussi rapidement et précisément que possible, car vous serez chronométré. Si vous faites une erreur ou que vous n'êtes pas assez rapide pour répondre, un BIP sonore sera émis. ^^^^^^Vous avez terminé l'entrainement. Pour rappel: ^Dans cette tâche, des mots vous seront présentés en différentes couleurs. ^^Vous devrez dire à haute voix la COULEUR dans laquelle chaque mot est présenté à l'écran tout en ignorant ce que les mots disent réellement. ^^Exemple : si vous voyez le mot ROUGE présenté dans la couleur VERT, dites VERT quelle que soit la signification du mot. ^^^Essayez de répondre aussi rapidement et précisément que possible, car vous serez chronométré. Si vous faites une erreurou que vous n'êtes pas assez rapide pour répondre, un BIP sonore sera émis. Vous avez terminé le tâche ^^Merci pour votre participation ! :) / items = ("Appuyez sur la barre espace quand vous êtes prêt") / color = (100,100,100) / txbgcolor = transparent / size = (400, 200) / fontstyle = ("Arial", 3%, true, false, false, false, 5, 1) ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 6.1.0.0 or higher / canvasaspectratio = (4,3) / minimumversion = "6.2.0.0" / fontstyle = ("Arial", 6.00%, true, false, false, false, 5, 1) / txcolor = black / inputdevice = speech / screencolor = white ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************** raw data *********************** / columns = (build, computer.platform, date, time, subject, group, script.sessionid, blockcode, blocknum, trialcode, trialnum, values.color, values.congruence, stimulusitem, response, correct, latency) / columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime, script.completed, values.meanrt_c_color, values.meanrt_ic_color, values.errorrate_c_color, values.errorrate_ic_color, values.meanrt_c_word, values.meanrt_ic_word, values.errorrate_c_word, values.errorrate_ic_word) ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically updated ************************************************************************************************************** ************************************************************************************************************** /congruence: 1= congruent; 2 = incongruent /color: contains current color of the word /count_congruent: counts all congruent trials in a block /count_incongruent: counts all incongruent trials in a block /countcorrect_congruent: counts all congruent trials in which participant responded correctly in a block /countcorrect_incongruent: counts all incongruent trials in which participant responded correctly in a block /sumRT_congruent: sums up the latencies of all congruent trials in which participant responded correctly in a block /sumRT_incongruent: sums up the latencies of all incongruent trials in which participant responded correctly in a block /meanrt_C_Color: mean latencies for correct congruent (c) and correct incongruent (ic) stimuli in the color block /meanrt_IC_Color /meanrt_C_word : mean latencies for correct congruent (c) and correct incongruent (ic) stimuli in the word naming block /meanrt_IC_word /errorrate_C_Color: mean errorate for correct congruent (c) and correct incongruent (ic) stimuli in the color block /errorrate_IC_Color /errorrate_C_word: mean errorate for correct congruent (c) and correct incongruent (ic) stimuli in the word naming block /errorrate_IC_word / congruence = 0 / color = 0 / count_congruent = 0 / count_incongruent = 0 / countcorrect_congruent = 0 / countcorrect_incongruent = 0 / sumRT_congruent = 0 / sumRT_incongruent = 0 / meanrt_C_Color = 0 / meanrt_IC_Color = 0 / meanrt_C_word = 0 / meanrt_IC_word = 0 / errorrate_C_Color = 0 / errorrate_IC_Color = 0 / errorrate_C_word = 0 / errorrate_IC_word = 0 ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /meanrt_congruent: mean latencies for correct congruent trials /meanrt_incongruent: mean latencies for correct incongruent trials /errorate_congruent: mean errorrate for congruent trials /errorate_incongruent: mean errorate for incongruent trials / meanrt_congruent = (values.sumrt_congruent/values.countcorrect_congruent) / meanrt_incongruent = (values.sumrt_incongruent/values.countcorrect_incongruent) / errorate_congruent = (values.count_congruent - values.countcorrect_congruent)/values.count_congruent / errorate_incongruent = (values.count_incongruent - values.countcorrect_incongruent)/values.count_incongruent ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** / items = colors / color = red / items = colors / color = blue / items = colors / color = yellow / items = colors / color = green / items = ("stop.wav") / playthrough = true ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** Note: lists of possible colors for each color word. Colors are sampled randomly without replacement. / items = (rouge, vert, bleu, jaune, rouge, rouge, rouge) / replace = false / items = (rouge, vert, bleu, jaune, vert, vert, vert) / replace = false / items = (rouge, vert, bleu, jaune, bleu, bleu, bleu) / replace = false / items = (rouge, vert, bleu, jaune, jaune, jaune, jaune) / replace = false ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** optional response element: by default it is not included in the trials but can be implemented by adding /responsemode = voice to all color and word naming trial elements. / mode = free / timeout = 2500 *********************************************** Color Naming trials *********************************************** / ontrialbegin = [values.color = "jaune"] / stimulustimes = [0=jaune; 1000=screen] / timeout = 1700 / posttrialpause = 1500 / validresponse = ("jaune" "vert" "bleu" "rouge") / correctresponse = ("jaune") / ontrialend = [ if (text.jaune.currentitemnumber == 5) { values.count_congruent += 1; values.congruence = 1; } else { values.count_incongruent += 1; values.congruence = 2; }; if (text.jaune.currentitemnumber == 5 && trial.yellow.correct) { values.countcorrect_congruent += 1; values.sumrt_congruent += trial.yellow.latency; } else if (text.jaune.currentitemnumber != 5 && trial.yellow.correct) { values.countcorrect_incongruent += 1; values.sumrt_incongruent += trial.yellow.latency; }; ] / ontrialbegin = [values.color = "rouge"] / stimulustimes = [0=rouge; 1000=screen] / timeout = 1700 / posttrialpause = 1500 / validresponse = ("jaune" "vert" "bleu" "rouge") / correctresponse = ("rouge") / ontrialend = [ if (text.rouge.currentitemnumber == 1) { values.count_congruent += 1; values.congruence = 1; } else { values.count_incongruent += 1; values.congruence = 2; }; if (text.rouge.currentitemnumber == 1 && trial.red.correct) { values.countcorrect_congruent += 1; values.sumrt_congruent += trial.red.latency; } else if (text.rouge.currentitemnumber != 1 && trial.red.correct) { values.countcorrect_incongruent += 1; values.sumrt_incongruent += trial.red.latency; }; ] / ontrialbegin = [values.color = "bleu"] / stimulustimes = [0=bleu; 1000=screen] / timeout = 1700 / posttrialpause = 1500 / validresponse = ("jaune" "vert" "bleu" "rouge") / correctresponse = ("bleu") / ontrialend = [ if (text.bleu.currentitemnumber == 3) { values.count_congruent += 1; values.congruence = 1 } else { values.count_incongruent += 1; values.congruence = 2 }; if (text.bleu.currentitemnumber == 3 && trial.blue.correct) { values.countcorrect_congruent += 1; values.sumrt_congruent += trial.blue.latency; } else if (text.bleu.currentitemnumber != 3 && trial.blue.correct) { values.countcorrect_incongruent += 1; values.sumrt_incongruent += trial.blue.latency; }; ] / ontrialbegin = [values.color = "vert"] / stimulustimes = [0=vert; 1000=screen] / timeout = 1700 / posttrialpause = 1500 / validresponse = ("jaune" "vert" "bleu" "rouge") / correctresponse = ("vert") / ontrialend = [ if (text.vert.currentitemnumber == 2) { values.count_congruent += 1; values.congruence = 1; } else { values.count_incongruent += 1; values.congruence = 2; }; if (text.vert.currentitemnumber == 2 && trial.green.correct) { values.countcorrect_congruent += 1; values.sumrt_congruent += trial.green.latency; } else if (text.vert.currentitemnumber != 2 && trial.green.correct) { values.countcorrect_incongruent += 1; values.sumrt_incongruent += trial.green.latency; }; ] *********************************************** Remaining trials *********************************************** / stimulustimes = [0=ready] / correctresponse = (" ") / inputdevice = keyboard / recorddata = false ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: Runs 10 color naming trials (classic Stroop test) / onblockbegin = [ values.count_congruent = 0; values.count_incongruent = 0; values.countcorrect_congruent = 0; values.countcorrect_incongruent = 0; values.sumrt_congruent = 0; values.sumrt_incongruent = 0; ] / preinstructions = (stroop_training) / trials = [ 1=ready; 2-11=random(yellow, green, blue, red); ] / errormessage = (errormessage, 0) / blockfeedback = (latency, correct) / onblockend = [ values.meanrt_c_color = expressions.meanrt_congruent; values.meanrt_ic_color = expressions.meanrt_incongruent; values.errorrate_c_color = expressions.errorate_congruent; values.errorrate_ic_color = expressions.errorate_incongruent; ] Note: Runs 25 color naming trials (classic Stroop test) / onblockbegin = [ values.count_congruent = 0; values.count_incongruent = 0; values.countcorrect_congruent = 0; values.countcorrect_incongruent = 0; values.sumrt_congruent = 0; values.sumrt_incongruent = 0; ] / preinstructions = (stroop) / trials = [ 1=ready; 2-721=random(yellow, green, blue, red); ] / errormessage = (errormessage, 0) / blockfeedback = (latency, correct) / onblockend = [ values.meanrt_c_color = expressions.meanrt_congruent; values.meanrt_ic_color = expressions.meanrt_incongruent; values.errorrate_c_color = expressions.errorate_congruent; values.errorrate_ic_color = expressions.errorate_incongruent; ] ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** block order is counterbalanced by groupnumber / blocks = [ 1=colornamingtraining; 2=colornaming; ] / postinstructions = (end) ************************************************************************************************************** End of File **************************************************************************************************************