scenario = "ERP_only_nl";

pcl_file = "ERP_only.pcl";
no_logfile = false;

write_codes = true;              
pulse_width= 10;
  
active_buttons = 3;   
button_codes = 1,2,3;
stimulus_properties = description, string, question_string, string, expected_answer, string;
event_code_delimiter = ",";

default_font_size=30;
default_font = "Arial";
default_text_color = 255,255,255;
	
begin;

# Instructions
picture {} default;
picture { text {caption = "+";font_size = 60;};  x=0;y=0;} fix1;
picture { text {caption = "- - -";font_size = 60;};  x=0;y=0;} knipper;
picture { text {caption = "Begin Oefensessie \n Druk op Spatie om met de oefensessie te beginnen.";font_size = 22;};x=0;y=0;} beginexp;  
picture { text {caption = "Einde Oefensessie \n Druk op Spatie om verder te gaan";};x=0;y=0;} eindoefen;
picture { text {caption = "BEGIN EXPERIMENT \n \n Druk op Spatie om met het experiment te beginnen";font_size = 22;};x=0;y=0;} begintest;
picture { text {caption = "LUISTER AANDACHTIG";font_size = 22;};x=0;y=0;} aandacht;
picture { text {caption = "EINDE EXPERIMENT \n Dank je wel voor het meedoen";};x=0;y=0;} eindexp;   


picture { text {caption = " WELKOM en hartelijk bedankt voor je deelname.
\n
Jouw taak in dit onderzoek is als volgt. Zometeen krijg je zinnen in het Engels te horen.
Je hoeft slechts te luisteren naar de zinnen.
Soms krijg je een Engels woord te zien en zul je moeten aangeven of dit woord gerelateerd is aan het voorgaande geluidsfragment.
Dit doe je door te drukken op de linker Shift knop (Ja) of op de rechter Shift knop (Nee) op het toetsenbord. 
Wanneer je '- - -' op het scherm ziet staan mag je met je ogen knipperen. 
Wanneer het aangegeven is kun je met Spatie naar het volgende fragment gaan.
\n 
We zullen eerst beginnen met een oefenronde.
Druk op Spatie om verder te gaan.";font_size = 24;};x=0;y=0;} uitlegval;

#picture text for the breaks
picture { text { caption = " PAUZE!
Druk op Spatie om verder te gaan wanneer je er klaar voor bent.";};x=0;y=0;} pauze1;


# Sound and name definition
sound { wavefile { filename = "";preload = false;} s;} snd;

#Question definition
text { caption = "temp";} questext;

trial {
	trial_duration = forever;
	trial_type = correct_response;
	stimulus_event{
		picture { text questext;x =0;y=0;} question;
		target_button = 2, 3;
	} questionevent;
} questiontrial;

trial {
	trial_duration = 1000;
	trial_type = fixed;
	picture fix1;
} nothingtrial;

# Instructions before start of experiment
trial {
   trial_type = correct_response;
	trial_duration = forever;
   picture uitlegval;
   target_button = 1;
   response_active = true;
}uitlegexp;

trial {
	trial_type = correct_response;
	trial_duration = forever;
	picture beginexp;
	target_button =1;
	response_active = true;
}startpractice;

# End of Practice
trial {
   start_delay = 1000;
	trial_type = correct_response;
	trial_duration = forever;
   picture eindoefen;
   target_button = 1;
   response_active = true;
}endpractice;

# Begin of Testitems
trial {
   trial_type = correct_response;
	trial_duration = forever;
   picture begintest;
   target_button = 1;
   response_active = true;
}starttest;

# End of Testitems
trial {
   start_delay = 1000;
	trial_type = correct_response;
	trial_duration = forever;
   picture eindexp;
   target_button = 1;
   response_active = true;
}endexp;

# Delay after each textbox
trial {
	trial_duration = 1000;
}payattention;

# Main trial definition. Play wav sound and sends markers at the beginning and ending of the critical words
trial {                  
	trial_duration = 1000;
	trial_type = fixed;
   picture fix1;
} fixatiekr;

trial {
   monitor_sounds = true;
   trial_type = fixed;
   trial_duration = stimuli_length;

	stimulus_event {
		picture fix1;
	} fixatiekruis;
	
	#play sound 100ms after start picture, sends out code 'onset' for the beginning of the sentence
	stimulus_event {
		sound snd;
		time = 100;
		code = "onsetwav";							 
	} wavevent;
	
	#critical marker1	only onset
	stimulus_event {
		nothing {};
		deltat = 0;
		code = "onsetcw1";
   } eventlab1;

	#critical marker2	 verb onset	
   stimulus_event {
		nothing {};
		deltat = 0;
		code = "onsetcw2";
	} eventlab2;

	#critical marker3	the onset
	stimulus_event {
		nothing {};
		deltat = 0;
		code = "onsetcw3";
   } eventlab3;

	#critical marker4	object onset	
   stimulus_event {
		nothing {};
		deltat = 0;
		code = "onsetcw4";
	} eventlab4;
} playsent;

# Moment to blink
trial {
	trial_duration = 2000;           
	trial_type = fixed;
	picture knipper;                   
	stimulus_event {
		picture knipper;
		target_button = 1;
		code = "knipper";
	} eventblok;
}blink;

trial {
	trial_duration = forever;           
	trial_type = correct_response;
	picture { text {caption = "Druk op Spatie om weer te beginnen.";font_size = 22;};x=0;y=0;} hervatexp;                    
	target_button = 1;
	response_active = true;
}startnapauze;

# Break
/* 
Total: 382 trials (240 exp, 142 fillers)
Every 5 minutes small self-pased break: 17 - 34 - 51 - 68 - 85 - 102 - 118 - 136 - 153 - 170 - 187 - 204 - 221 - 238 - 255 - 272 - 289 - 306 - 323 - 340 - 357 - 374 
Every 15 minutes 2 minutes forced break: 51 - 102 - 153 - 204 - 255 - 306 - 357 
*/

trial {
   trial_duration = forever;
	trial_type = first_response;
	picture pauze1;
	target_button = 1;
	response_active = true;
} smallbreak; 

trial {
   trial_duration = 120000; #2 minutes
	trial_type = fixed;
	picture { bitmap { filename = ""; preload = false; } breakpic; x=0; y =0; };
} forcedbreak; 
