Experiment( SubjectCode, SubjectGroup){
Context(){
AssignmentGroup(){
ExperimentName = "Lexical Decision with Priming";
new Related = 1;
new Word = 1;
SubjectCode = "pxlab";
SkipBoundingBlockDisplays = 0;
}
Session(){
Instruction(){
Text = ["Lexical Decision", " ", "Your task in this experiment is to decide whether a sequence of letters constitutes a valid word or not.", "Immediately before the sequence of letters will be shown, you will see a word followed by a series of crosses. You may ignore these and only attend to the letter sequence shown after the crosses.", " ", "If the sequence which is shown is a word, then press the left mouse button.", "If the sequence is not a word, then press the right mouse button.", " ", "Please press any mouse button to start the experiment."];
}
}
Block( BlockCounter, TrialCounter, StoreData);
Trial( Message:Prime.Text, Message:Target.Text, Related, Word, ResponseCode, ResponseTime){
Message:Fixation(){
Text = "+";
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 1000;
Color = White;
}
Message:Prime(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 60;
Color = White;
}
Message:Mask(){
Text = "xxxxxxxxxx";
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 100;
Color = White;
}
ClearScreen(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 500-Trial.Message:Mask.Duration-Trial.Message:Prime.Duration;
}
Message:Target(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER|de.pxlab.pxl.TimerCodes.START_RESPONSE_TIMER;
Duration = 300;
Color = White;
}
Message:Wait(){
Text = "?";
Timer = de.pxlab.pxl.TimerCodes.LIMITED_RESPONSE_TIMER|de.pxlab.pxl.TimerCodes.STOP_RESPONSE_TIMER;
Duration = 1000;
Color = White;
// Left button (code=1) translates to index 1 and corresponds to FactorLevel 'word' // Right button (code=3) translates to index 2 and corresponds to FactorLevel 'non-word'
ResponseSet = [0, 1, 3];
}
Feedback(){
ResponseParameter = "Trial.Message:Wait.ResponseCode";
CorrectCode = Word;
CorrectText = "Correct!\n %ResponseTime@i% ms";
FalseText = (Trial.Message:Wait.ResponseCode==de.pxlab.pxl.ResponseCodes.TIME_OUT)? "Time out": "Error!\n %ResponseTime@i% ms";
Evaluation = de.pxlab.pxl.EvaluationCodes.COMPARE_CODE;
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 1000;
Visible = 1;
}
}
// Command line assignments
AssignmentGroup();
}
Factors(){
CovariateFactor( SubjectGroup, SessionGroup){
FactorLevel( "A", 1);
FactorLevel( "B", 2);
}
IndependentFactor( Related){
FactorLevel( 1);
FactorLevel( 2);
}
IndependentFactor( Word){
FactorLevel( 1);
FactorLevel( 2);
}
DependentFactor( ResponseTime);
DependentFactor( Trial.Feedback.Response);
}
Procedure(){
// Session for SessionGroup A
Session(){
Block( ?, 0, 0){
Trial( "garden", "house", 1, 1, ?, ?);
Trial( "arige", "house", 2, 1, ?, ?);
Trial( "garden", "betle", 1, 2, ?, ?);
Trial( "arige", "betle", 2, 2, ?, ?);
}
Block( ?, 0, 0){
Trial( "table", "chair", 1, 1, ?, ?);
Trial( "huse", "chair", 2, 1, ?, ?);
Trial( "table", "gerben", 1, 2, ?, ?);
Trial( "huse", "gerben", 2, 2, ?, ?);
}
}
// Session for SessionGroup B
Session(){
Block( ?, 0, 0){
Trial( "house", "garden", 1, 1, ?, ?);
Trial( "betle", "garden", 2, 1, ?, ?);
Trial( "house", "arige", 1, 2, ?, ?);
Trial( "betle", "arige", 2, 2, ?, ?);
}
Block( ?, 0, 0){
Trial( "chair", "table", 1, 1, ?, ?);
Trial( "gerben", "table", 2, 1, ?, ?);
Trial( "garden", "huse", 1, 2, ?, ?);
Trial( "gerben", "huse", 2, 2, ?, ?);
}
}
}
}