/** This is an experiment for determining the psychometric function for pitch discrimination. It is described in Chapter 2 of Irtel, H. (1991). Experimentalpsychologisches Praktikum. Heidelberg: Springer-Verlag. Changes against the book version are: - The response keys for yes/no are switched: left key means that the first (standard) stimulus had the higher pitch - The size of the comparison stimulus frequency differences have been tripled in order to make the task somewhat easier. */
Experiment(){
Context(){
AssignmentGroup(){
ExperimentName = lang2("Psychometric Function for Pitch Discrimination", "Psychometrische Funtion für Tonhöhe");
HideCursor = 0;
SubjectCode = "pxlab";
TrialFactor = 15;
DataFileTrialFormat = "%SubjectCode% %TrialCounter% %Trial.SyntheticSound:A.WavePars% %Trial.SyntheticSound:B.WavePars% %Trial.Message:C.ResponseCode%";
}
Session(){
Instruction(){
Text = lang2("Discrimination of tones\n \nPlease use the headphone.\nYou may use the cursor-keys left/right to select the tone which sounds higher.\n \nPress any key to start.", ["Unterscheiden von Tönen", " ", "Bitte setzen Sie jetzt den Kopfhörer auf.", " ", "Wählen Sie bitte mit Hilfe der Tasten für Cursor links/rechts jeweils den Ton, der höher klingt.", " ", "Zum Starten des Experiments drücken Sie bitte eine beliebige Taste!"]);
}
}
SessionEnd(){
SessionEndMessage(){
}
}
Block:Training( TrialFactor, StoreData){
BlockStartMessage(){
}
}
BlockEnd:Training();
Block:Data( TrialFactor, StoreData);
BlockEnd:Data(){
BlockEndMessage(){
}
}
Trial( TrialCounter, SyntheticSound:A.WavePars, SyntheticSound:B.WavePars, Message:C.ResponseCode){
Message:A(){
Timer = de.pxlab.pxl.TimerCodes.NO_TIMER;
Text = "<==";
}
SyntheticSound:A(){
Timer = de.pxlab.pxl.TimerCodes.END_OF_MEDIA_TIMER;
Duration = 600;
Gain = 0.8;
Envelope = de.pxlab.pxl.SoundEnvelopeCodes.SINUSOIDAL;
Wave = de.pxlab.pxl.SoundWaveCodes.PURE_TONE;
}
Message:B(){
Timer = de.pxlab.pxl.TimerCodes.NO_TIMER;
Text = "==>";
}
SyntheticSound:B(){
Timer = de.pxlab.pxl.TimerCodes.END_OF_MEDIA_TIMER;
Duration = 600;
Gain = 0.8;
Envelope = de.pxlab.pxl.SoundEnvelopeCodes.SINUSOIDAL;
Wave = de.pxlab.pxl.SoundWaveCodes.PURE_TONE;
}
Message:C(){
Timer = de.pxlab.pxl.TimerCodes.RESPONSE_TIMER;
Text = "?";
ResponseSet = [0, de.pxlab.pxl.KeyCodes.LEFT_KEY, de.pxlab.pxl.KeyCodes.RIGHT_KEY];
}
ClearScreen(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 300;
}
}
// Command line assignments
AssignmentGroup();
}
Procedure(){
Session(){
Block:Training( 1, 0){
Trial( ?, 440, <435.5, 437, 438.5, 440, 441.5, 443, 444.5>, ?);
}
Block:Data( 15, 1){
Trial( ?, 440, <435.5, 437, 438.5, 440, 441.5, 443, 444.5>, ?);
}
Block:Training( 1, 0){
Trial( ?, 880, <871, 874, 877, 880, 883, 886, 889>, ?);
}
Block:Data( 15, 1){
Trial( ?, 880, <871, 874, 877, 880, 883, 886, 889>, ?);
}
Block:Training( 1, 0){
Trial( ?, 1760, <1742, 1748, 1754, 1760, 1766, 1772, 1778>, ?);
}
Block:Data( 15, 1){
Trial( ?, 1760, <1742, 1748, 1754, 1760, 1766, 1772, 1778>, ?);
}
Block:Training( 1, 0){
Trial( ?, 1760, <1742, 1748, 1754, 1760, 1766, 1772, 1778>, ?);
}
Block:Data( 15, 1){
Trial( ?, 1760, <1742, 1748, 1754, 1760, 1766, 1772, 1778>, ?);
}
Block:Training( 1, 0){
Trial( ?, 880, <871, 874, 877, 880, 883, 886, 889>, ?);
}
Block:Data( 15, 1){
Trial( ?, 880, <871, 874, 877, 880, 883, 886, 889>, ?);
}
Block:Training( 1, 0){
Trial( ?, 440, <435.5, 437, 438.5, 440, 441.5, 443, 444.5>, ?);
}
Block:Data( 15, 1){
Trial( ?, 440, <435.5, 437, 438.5, 440, 441.5, 443, 444.5>, ?);
}
}
}
}