Mercurial > hg > mep
changeset 7:e2242b4b0b3d
Allow instructions file to be passed as a command line argument.
Ignore-this: 60e440775e698898e485f8f0dfbd3db
author | Marcus Pearce <m.pearce@gold.ac.uk> |
---|---|
date | Fri, 15 Jul 2011 16:36:53 +0100 |
parents | ac0d14c9c9ab |
children | 235484b93707 |
files | Data/instructions.html Experiment.java README runExperiment.bat |
diffstat | 4 files changed, 36 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/Data/instructions.html Thu Nov 25 11:12:24 2010 +0000 +++ b/Data/instructions.html Fri Jul 15 16:36:53 2011 +0100 @@ -3,41 +3,37 @@ <font size="+1" face="sans"> -<p>This experiment will consist of 28 short melodies presented in two -blocks. The first block contains 2 practice trials for you to -familiarise yourself with the programme. After the practice block, you -will be able to adjust the volume to a comfortable level and ask any -questions you may have. The main part of the experiment will follow on -from the pracice block.</p> +<p>This experiment will consist of 32 short melodies presented in two +blocks. The first block contains 2 practice trials to familiarise you +with the programme. After the practice block, you will be able to +adjust the volume to a comfortable level and ask any questions you may +have. The main part of the experiment will follow on from the practice +block.</p> <p>When each melody starts playing, a cross will appear in the centre of the screen. You should focus on this cross while listening to the -melody.</p> +melody.</p> <p>Whilst listening to each melody, you will be prompted to judge how -expected or unexpected you find a given note. Shortly before such +expected or unexpected you find a given note. Shortly before these notes, the cross will be replaced by a clock with a minute hand at 12 -O'Clock. The hand will count down in time with the music. The note -whose onset coincides with the hand returning to 12 O'Clock is the one -you should respond to. </p> - -<p>You should judge how expected or unexpected you find a given note -in the preceding context of the melody using a scale of 1 (highly -unexpected) to 7 (highly expected). Please try to use the full range -of the scale.</p> +O'Clock. The hand will count down in time with the music. Pay +attention to the note that coincides with the hand returning to +12. You should judge how expected or unexpected this note is, given +what has gone before. Please use a scale of 1 (highly unexpected) to 7 +(highly expected), making sure to use the full range. Respond using +number keys 1 to 7 on the keyboard.</p> <p>The music will continue to play, so try to respond as quickly as possible, however accuracy is more vital than speed. There is only one -chance to make your decision, once selected it cannot be -changed. Before making your judgement, try to keep the mouse pointer -in the midrange of the scale (i.e., 4).</p> +chance to make your decision, once selected it cannot be changed.</p> <p>After listening to each melody, you will be required to answer some short questions relating to the music before listening to the next piece.</p> <p>If you have any questions please ask now. Otherwise, press -'Continue' to move directly to the practice block</p> +'Continue' to move directly to the practice block.</p> </body> </html>
--- a/Experiment.java Thu Nov 25 11:12:24 2010 +0000 +++ b/Experiment.java Fri Jul 15 16:36:53 2011 +0100 @@ -2,7 +2,7 @@ * File: Experiment.java * Author: Marcus Pearce <m.pearce@gold.ac.uk> * Created: <2007-02-14 11:28:27 marcusp> - * Time-stamp: <2010-11-25 10:48:00 marcusp> + * Time-stamp: <2011-07-15 12:34:18 marcusp> *============================================================================= */ @@ -25,7 +25,7 @@ private final String DATA_DIRECTORY = BASE_DIRECTORY + "Data" + File.separator; - public final String INSTRUCTIONS_FILE = + public String INSTRUCTIONS_FILE = DATA_DIRECTORY + "instructions.html"; public String MIDI_DIRECTORY = @@ -87,7 +87,7 @@ } /* Constructor */ - public Experiment (int sc, int cu, int nu, int sl, int md, String la, String ha, String mfd) { + public Experiment (int sc, int cu, int nu, int sl, int md, String la, String ha, String mfd, String inf) { // Setup variables results = new SubjectResults(this); @@ -104,6 +104,7 @@ MIDI_DIRECTORY = mfd + File.separator; MIDIFILELIST_FILE = MIDI_DIRECTORY + "filelist.txt"; PRACTICE_MIDIFILELIST_FILE = MIDI_DIRECTORY + "pfilelist.txt"; + INSTRUCTIONS_FILE = inf; // Initialise the experiment Block practice = new Block(this, gui, PRACTICE_MIDIFILELIST_FILE, @@ -152,7 +153,7 @@ "<show clock?> <clock units> <number of units> " + "<midi device> " + "<scale length> <low anchor> <high anchor>" + - "<midi file directory>"); + "<midi file directory> <instructions file>"); System.exit(1); } @@ -166,9 +167,10 @@ String la = args[n++]; String ha = args[n++]; String mfd = args[n++]; + String inf = args[n++]; // Create experiment - Experiment exp = new Experiment(sc, cu, nu, sl, md, la, ha, mfd); + Experiment exp = new Experiment(sc, cu, nu, sl, md, la, ha, mfd, inf); // Show the GUI int width=(int)Toolkit.getDefaultToolkit().getScreenSize().getWidth();
--- a/README Thu Nov 25 11:12:24 2010 +0000 +++ b/README Fri Jul 15 16:36:53 2011 +0100 @@ -5,7 +5,7 @@ USAGE - java Experiment <show clock?> <multiple> <n> <midi device> <scale length> <low anchor> <high anchor> <midi file directory> + java Experiment <show clock?> <multiple> <n> <midi device> <scale length> <low anchor> <high anchor> <midi file directory> <instructions file> where <show clock?> specifies whether to show the clock (0 = no; 1 = yes) and <multiple> and <n> are integers: the clock runs for <n> time @@ -21,6 +21,10 @@ <midi file directory> is the directory where the midi files are stored +<instructions file> is an html file containing the instructions for +the participant which will be displayed at the beginning of the +experiment. + See runExperiment.bat for an example. To use in a study: @@ -28,12 +32,14 @@ 1. put the relevant midi files in the directory specified by <midi file directory> (e.g., Data/Midi/) -2. edit pfilelist.txt and filelist.txt (also in <midi file directory>) to -contain the midi files played in the practice and main blocks +2. edit pfilelist.txt and filelist.txt (also in <midi file directory>) +to contain the midi files played in the practice and main blocks respectively: put one file on each line followed by a list of note -numbers to probe with the visual clock. +numbers to probe with the visual clock. NB: that the last line of +these files must terminate with a newline. -3. edit Data/instructions.html if necessary. +3. edit Data/instructions.html if necessary or create a new set of +instructions. The results are written to files in the Results/ directory. @@ -44,7 +50,7 @@ FILES AND DIRECTORIES: Data/: - - instructions.html: the instructions file + - instructions.html: the default instructions file - pfilelist.txt: the list of midi filenames in the practice block - filelist.txt: the list of midi filenames in the main block - Midi/: the location of the midi files specified above
--- a/runExperiment.bat Thu Nov 25 11:12:24 2010 +0000 +++ b/runExperiment.bat Fri Jul 15 16:36:53 2011 +0100 @@ -1,1 +1,1 @@ -java Experiment 1 1 4 0 7 "Highly unexpected" "Highly expected" "/home/marcusp/research/projects/idyom2/MelodicExpectationParadigm/Data/Midi/hymns/" +java Experiment 1 1 4 0 7 "Highly unexpected" "Highly expected" "Data/Midi/hymns/" "Data/instructions.html"