changeset 12:284c23df4652

Convert the questionnaire to match the GOLD MSI subscale 3. Ignore-this: cf538ae513653fbdd0cc44abf806b65c
author Marcus Pearce <m.pearce@gold.ac.uk>
date Mon, 14 Nov 2011 15:49:11 +0000
parents 85b03f084d63
children 3c2da30cbb93
files Experiment.java ExperimentController.java SubjectDataPanel.java SubjectResults.java runExperiment.bat
diffstat 5 files changed, 163 insertions(+), 77 deletions(-) [+]
line wrap: on
line diff
--- a/Experiment.java	Fri Nov 04 18:21:49 2011 +0000
+++ b/Experiment.java	Mon Nov 14 15:49:11 2011 +0000
@@ -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: <2011-11-04 17:42:17 marcusp>
+ * Time-stamp: <2011-11-10 12:56:55 marcusp>
  *=============================================================================
  */
 
--- a/ExperimentController.java	Fri Nov 04 18:21:49 2011 +0000
+++ b/ExperimentController.java	Mon Nov 14 15:49:11 2011 +0000
@@ -2,7 +2,7 @@
  * File:       ExperimentController.java
  * Author:     Marcus Pearce <m.pearce@gold.ac.uk>
  * Created:    <2007-12-14 12:06:10 marcusp>
- * Time-stamp: <2011-11-04 17:31:28 marcusp>
+ * Time-stamp: <2011-11-10 19:08:45 marcusp>
  *=============================================================================
  */
 
@@ -139,7 +139,7 @@
                         gui.showCard("interblock"); 
                     } else {
                         // ... write results and subject questionnaire 
-                        results.writeResults(); 
+                        results.writeResults();
                         gui.showCard("subject"); 
                     }
                 } else { 
--- a/SubjectDataPanel.java	Fri Nov 04 18:21:49 2011 +0000
+++ b/SubjectDataPanel.java	Mon Nov 14 15:49:11 2011 +0000
@@ -2,7 +2,7 @@
  * File:       SubjectDataPanel.java
  * Author:     Marcus Pearce <m.pearce@gold.ac.uk>
  * Created:    <2007-02-14 11:28:27 marcusp>
- * Time-stamp: <2008-03-11 18:09:47 marcusp>
+ * Time-stamp: <2011-11-10 19:13:15 marcusp>
  *=============================================================================
  */
 
@@ -14,10 +14,10 @@
 public class SubjectDataPanel extends JPanel { 
 
     /* variables */ 
-    private JTextField ageField, trainingField, topfield, instrumentField, 
-        participationField, listeningField, nationalityField; 
-    private JComboBox sexBox, handBox, hearingBox, instrumentBox, trainingBox, 
-        ethnicityBox;
+    private JTextField ageField, listeningField, nationalityField; 
+    private JComboBox sexBox, handBox, hearingBox, ethnicityBox, 
+        goldMSI3_1, goldMSI3_2, goldMSI3_3, goldMSI3_4, goldMSI3_5, goldMSI3_6, goldMSI3_7, goldMSI3_8, goldMSI3_9;
+
     private JButton finishButton; 
 
     private SubjectResults results; 
@@ -31,78 +31,151 @@
 	results = sr; 
 
 	JPanel questionsPanel = new JPanel(); 
-	questionsPanel.setLayout(new GridLayout(12,1)); 
+	questionsPanel.setLayout(new GridBagLayout());
+        GridBagConstraints c = new GridBagConstraints();
+        //c.fill = GridBagConstraints.BOTH;
+        c.ipadx = 10;
+        c.ipady = 30;
+        //c.insets = new Insets(50,50,50,50);
+
 	questionsPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(""),BorderFactory.createEmptyBorder(5,5,5,5)), questionsPanel.getBorder()));
 	
 	String[] yesNoOptions = { "", "Yes", "No" };
+        String[] agreeOptions = { "", "1 Completely Disagree", "2 Strongly Disagree", "3 Disagree", "4 Neither agree nor disagree", "5 Agree", "6 Strongly Agree", "7 Completely agree" };
 
         // Age 
+        c.gridy = 0;
+        c.gridx = 0;
 	ageField = new JTextField(10);
+        c.anchor = GridBagConstraints.EAST;
 	questionsPanel.add(new JLabel("Age: ")); 
-	questionsPanel.add(ageField); 
+        c.gridx = 1;
+        c.anchor = GridBagConstraints.WEST;
+	questionsPanel.add(ageField, c); 
 
         // Gender 
+        c.gridx = GridBagConstraints.RELATIVE;
+        c.gridy = 1;
 	String[] sexBoxOptions = { "", "Male", "Female" }; 
 	sexBox = new JComboBox(sexBoxOptions); 
 	sexBox.setSelectedIndex(0); 
-	questionsPanel.add(new JLabel("Gender: ")); 
-	questionsPanel.add(sexBox); 
+        c.anchor = GridBagConstraints.EAST;
+	questionsPanel.add(new JLabel("Sex: "), c);
+        c.anchor = GridBagConstraints.WEST;
+	questionsPanel.add(sexBox, c); 
 
-        // Ethnicity 
+        // Ethnicity
+        c.gridy = 2;
 	String[] ethnicityBoxOptions = 
             { "", "Asian", "Black", "Chinese", "Mixed", "Other", "White", 
               "Undisclosed" }; 
 	ethnicityBox = new JComboBox(ethnicityBoxOptions); 
-	questionsPanel.add(new JLabel("Ethnicity: ")); 
-	questionsPanel.add(ethnicityBox); 
+        c.anchor = GridBagConstraints.EAST;
+	questionsPanel.add(new JLabel("Ethnicity: "), c); 
+        c.anchor = GridBagConstraints.WEST;
+	questionsPanel.add(ethnicityBox, c); 
         
-        // Nationality 
+        // Nationality
+        c.gridy = 3;
 	nationalityField = new JTextField(10);
-	questionsPanel.add(new JLabel("Nationality: ")); 
-	questionsPanel.add(nationalityField); 
+        c.anchor = GridBagConstraints.EAST;
+	questionsPanel.add(new JLabel("Nationality: "), c); 
+        c.anchor = GridBagConstraints.WEST;
+	questionsPanel.add(nationalityField, c); 
 
         // Handedness 
+        c.gridy = 4;
 	String[] handBoxOptions = { "", "Right-handed", "Left-handed" };
 	handBox = new JComboBox(handBoxOptions); 
 	handBox.setSelectedIndex(0); 
-	questionsPanel.add(new JLabel("Handedness: ")); 
-	questionsPanel.add(handBox); 
+        c.anchor = GridBagConstraints.EAST;
+	questionsPanel.add(new JLabel("Handedness: "), c); 
+        c.anchor = GridBagConstraints.WEST;
+	questionsPanel.add(handBox, c); 
 
         // Hearing 
+        c.gridy = 5;
         hearingBox = new JComboBox(yesNoOptions); 
-        questionsPanel.add(new JLabel("Do you have any hearing difficulties?")); 
-	questionsPanel.add(hearingBox); 
-
-        // Instrument / Sing
-        instrumentBox = new JComboBox(yesNoOptions); 
-	instrumentField = new JTextField(10); 
-	
-        questionsPanel.add(new JLabel("Do you play an instrument/sing?")); 
-	questionsPanel.add(instrumentBox); 
-
-	questionsPanel.add(new JLabel("If so, for how many years have you played/sung? ")); 
-	questionsPanel.add(instrumentField); 
-        
-        // Musical Training
-        trainingBox = new JComboBox(yesNoOptions); 
-	trainingField = new JTextField(10); 
-
-	questionsPanel.add(new JLabel("Have you had formal musical training?")); 
-        questionsPanel.add(trainingBox); 
-
-        questionsPanel.add(new JLabel("If so, for how many years?")); 
-	questionsPanel.add(trainingField); 
-        
-        // Musical Participation 
-	participationField = new JTextField(10); 
-
-	questionsPanel.add(new JLabel("How many hours a week do you spend practising/participating in music?")); 
-        questionsPanel.add(participationField); 
+        c.anchor = GridBagConstraints.EAST;
+        questionsPanel.add(new JLabel("Do you have any hearing difficulties?"), c); 
+        c.anchor = GridBagConstraints.WEST;
+	questionsPanel.add(hearingBox, c); 
 
         // Musical Listening 
+        c.gridy = 6;
         listeningField = new JTextField(10); 
-	questionsPanel.add(new JLabel("How many hours per day do you spend listening to music?")); 
-        questionsPanel.add(listeningField); 
+        c.anchor = GridBagConstraints.EAST;
+	questionsPanel.add(new JLabel("How many hours per day do you spend listening to music?"), c); 
+        c.anchor = GridBagConstraints.WEST;
+        questionsPanel.add(listeningField, c); 
+
+        // GOLDMSI
+        c.gridy = 7;
+        goldMSI3_1 = new JComboBox(agreeOptions);
+        c.anchor = GridBagConstraints.EAST;
+        questionsPanel.add(new JLabel("I have never been complimented on my talents as a musical performer."), c);
+        c.anchor = GridBagConstraints.WEST;
+        questionsPanel.add(goldMSI3_1, c);
+
+        c.gridy = 8;
+        goldMSI3_2 = new JComboBox(agreeOptions);
+        c.anchor = GridBagConstraints.EAST;
+        questionsPanel.add(new JLabel("I can't read a musical score."), c);
+        c.anchor = GridBagConstraints.WEST;
+        questionsPanel.add(goldMSI3_2, c);
+        
+        c.gridy = 9;        
+        goldMSI3_3 = new JComboBox(agreeOptions);
+        c.anchor = GridBagConstraints.EAST;
+        questionsPanel.add(new JLabel("I would not consider myself a musician."), c);
+        c.anchor = GridBagConstraints.WEST;
+        questionsPanel.add(goldMSI3_3, c);
+        
+        c.gridy = 10;
+        String[] goldMSI3_4o = {"", "0", "1", "2", "3", "4-5", "6-9", "10 or more"};
+        goldMSI3_4 = new JComboBox(goldMSI3_4o);
+        c.anchor = GridBagConstraints.EAST;
+        questionsPanel.add(new JLabel("I engaged in regular, daily practice of a musical instrument (including voice) for ------- years."), c);
+        c.anchor = GridBagConstraints.WEST;
+        questionsPanel.add(goldMSI3_4, c);
+
+        c.gridy = 11;
+        String[] goldMSI3_5o = {"", "0", "0.5", "1", "1.5", "2", "3-4", "5 or more"};
+        goldMSI3_5 = new JComboBox(goldMSI3_4o);
+        c.anchor = GridBagConstraints.EAST;
+        questionsPanel.add(new JLabel("At the peak of my interest, I practised ------- hours per day on my primary instrument."), c);
+        c.anchor = GridBagConstraints.WEST;
+        questionsPanel.add(goldMSI3_5, c);
+
+        c.gridy = 12;
+        goldMSI3_6 = new JComboBox(goldMSI3_4o);
+        c.anchor = GridBagConstraints.EAST;
+        questionsPanel.add(new JLabel("I have played or sung in a group, band, choir or orchestra for ------- years."), c);
+        c.anchor = GridBagConstraints.WEST;
+        questionsPanel.add(goldMSI3_6, c);
+        
+        c.gridy = 13;
+        String[] goldMSI3_7o = {"", "0", "0.5", "1", "2", "3", "4-6", "7 or more"};        
+        goldMSI3_7 = new JComboBox(goldMSI3_7o);
+        c.anchor = GridBagConstraints.EAST;
+        questionsPanel.add(new JLabel("I have had formal training in music theory for ------- years."), c);
+        c.anchor = GridBagConstraints.WEST;
+        questionsPanel.add(goldMSI3_7, c);
+
+        c.gridy = 14;
+        goldMSI3_8 = new JComboBox(goldMSI3_4o);
+        c.anchor = GridBagConstraints.EAST;
+        questionsPanel.add(new JLabel("I have had ------- years of formal training on a musical instrument (including voice) during my lifetime."), c);
+        c.anchor = GridBagConstraints.WEST;
+        questionsPanel.add(goldMSI3_8, c);
+
+        c.gridy = 15;
+        String[] goldMSI3_9o = {"", "0", "1", "2", "3", "4", "5", "6 or more"};        
+        goldMSI3_9 = new JComboBox(goldMSI3_9o);
+        c.anchor = GridBagConstraints.EAST;
+        questionsPanel.add(new JLabel("I can play ------- musical instruments."), c);
+        c.anchor = GridBagConstraints.WEST;
+        questionsPanel.add(goldMSI3_9, c);
         
         // Put it all together 
         JPanel finishPanel = new JPanel(); 
@@ -113,14 +186,14 @@
         topPanel.add(new JLabel("Please answer the following questions:"), 
                      BorderLayout.NORTH); 
         
-        JPanel questionsPanel2 = new JPanel(); 
-        questionsPanel2.setLayout(new BorderLayout()); 
-        questionsPanel2.add(questionsPanel, BorderLayout.NORTH); 
+        //JPanel questionsPanel2 = new JPanel(); 
+        //questionsPanel2.setLayout(new BorderLayout()); 
+        //questionsPanel2.add(questionsPanel, BorderLayout.CENTER); 
 
 	//getRootPane().setDefaultButton(finishButton);
         this.setLayout (new BorderLayout());
         add(topPanel, BorderLayout.NORTH); 
-	add(questionsPanel2,BorderLayout.CENTER); 
+	add(questionsPanel, BorderLayout.CENTER); 
 	add(finishPanel,BorderLayout.SOUTH); 
     } 
 
@@ -134,26 +207,34 @@
 	subjectData.add(sex);
 	String[] hand = {"Hand",(String)handBox.getSelectedItem()}; 
 	subjectData.add(hand);
-	String[] ethnicity = {"Ethnic",(String)ethnicityBox.getSelectedItem()}; 
+	String[] ethnicity = {"Ethnicity",(String)ethnicityBox.getSelectedItem()}; 
 	subjectData.add(ethnicity);
 	String[] nationality = {"Nationality",nationalityField.getText()}; 
 	subjectData.add(nationality); 
 	String[] hear = {"HearingDiff", (String)hearingBox.getSelectedItem()}; 
 	subjectData.add(hear); 
-	String[] instrument1 = 
-            {"Instrument", (String)instrumentBox.getSelectedItem()}; 
-	subjectData.add(instrument1); 
-	String[] instrument2 = {"InstrumentYears",instrumentField.getText()}; 
-	subjectData.add(instrument2); 
-	String[] training1 = {"Training", (String)trainingBox.getSelectedItem()};
-	subjectData.add(training1); 
-	String[] training2 = {"TrainingYears",trainingField.getText()}; 
-	subjectData.add(training2); 
-	String[] participation = {"Participation",participationField.getText()}; 
-	subjectData.add(participation); 
-	String[] listening = {"Listening",listeningField.getText()}; 
+	String[] listening = {"Listening", listeningField.getText()}; 
 	subjectData.add(listening); 
-	
+        
+        String[] goldMSI3_1a = {"GoldMSI3.1", (String)goldMSI3_1.getSelectedItem()};
+        subjectData.add(goldMSI3_1a);
+        String[] goldMSI3_2a = {"GoldMSI3.2", (String)goldMSI3_2.getSelectedItem()};
+        subjectData.add(goldMSI3_2a);
+        String[] goldMSI3_3a = {"GoldMSI3.3", (String)goldMSI3_3.getSelectedItem()};
+        subjectData.add(goldMSI3_3a);
+        String[] goldMSI3_4a = {"GoldMSI3.4", (String)goldMSI3_4.getSelectedItem()};
+        subjectData.add(goldMSI3_4a);
+        String[] goldMSI3_5a = {"GoldMSI3.5", (String)goldMSI3_5.getSelectedItem()};
+        subjectData.add(goldMSI3_5a);
+        String[] goldMSI3_6a = {"GoldMSI3.6", (String)goldMSI3_6.getSelectedItem()};
+        subjectData.add(goldMSI3_6a);
+        String[] goldMSI3_7a = {"GoldMSI3.7", (String)goldMSI3_7.getSelectedItem()};
+        subjectData.add(goldMSI3_7a);
+        String[] goldMSI3_8a = {"GoldMSI3.8", (String)goldMSI3_8.getSelectedItem()};
+        subjectData.add(goldMSI3_8a);
+        String[] goldMSI3_9a = {"GoldMSI3.9", (String)goldMSI3_9.getSelectedItem()};
+        subjectData.add(goldMSI3_9a);
+
         results.setSubjectData(subjectData); 
     } 
 
@@ -164,12 +245,17 @@
             ethnicityBox.getSelectedItem().equals("") || 
             nationalityField.getText().equals("") || 
             hearingBox.getSelectedItem().equals("") ||
-            instrumentBox.getSelectedItem().equals("") ||
-            instrumentField.getText().equals("") ||
-            trainingBox.getSelectedItem().equals("") ||
-            trainingField.getText().equals("") ||
-            participationField.getText().equals("") ||
-            listeningField.getText().equals(""))
+            listeningField.getText().equals("") ||
+            goldMSI3_1.getSelectedItem().equals("") ||
+            goldMSI3_2.getSelectedItem().equals("") ||
+            goldMSI3_3.getSelectedItem().equals("") ||
+            goldMSI3_4.getSelectedItem().equals("") ||
+            goldMSI3_5.getSelectedItem().equals("") ||
+            goldMSI3_6.getSelectedItem().equals("") ||
+            goldMSI3_7.getSelectedItem().equals("") ||
+            goldMSI3_8.getSelectedItem().equals("") ||
+            goldMSI3_9.getSelectedItem().equals("")
+            )
             return false; 
         else return true; 
     }
--- a/SubjectResults.java	Fri Nov 04 18:21:49 2011 +0000
+++ b/SubjectResults.java	Mon Nov 14 15:49:11 2011 +0000
@@ -2,7 +2,7 @@
  * File:       SubjectResults.java
  * Author:     Marcus Pearce <m.pearce@gold.ac.uk>
  * Created:    <2007-12-12 10:44:12 marcusp>
- * Time-stamp: <2010-11-16 15:28:10 marcusp>
+ * Time-stamp: <2011-11-10 19:13:32 marcusp>
  *=============================================================================
  */
 
@@ -67,7 +67,7 @@
             Iterator sji = subjectData.iterator(); 
             while(sji.hasNext()) { 
                 String[] data = (String[])sji.next(); 
-                writer.write(data[1] + " ");
+                writer.write(data[1] + ", ");
             }
             writer.write("\n"); 
             writer.close(); 
--- a/runExperiment.bat	Fri Nov 04 18:21:49 2011 +0000
+++ b/runExperiment.bat	Mon Nov 14 15:49:11 2011 +0000
@@ -1,1 +1,1 @@
-java Experiment 1 1 4 0 7 "Highly unexpected" "Highly expected" "Data/Midi/hymns/" "Data/instructions.html"
+java Experiment 1 1 4 0 7 "Highly unexpected" "Highly expected" "Data/Midi/hymns/" "Data/instructions.html" 1 1 1