comparison ExperimentController.java @ 4:5080b65e6963

Close MIDI sequencer and synthesizer properly and allow user to pass MIDI file directory as a command line argument Ignore-this: dbf86cc9008fba00379b67dd541adb38
author Marcus Pearce <m.pearce@gold.ac.uk>
date Thu, 18 Nov 2010 11:47:32 +0000
parents 1fe7ac28a3ca
children 135338ba37ef
comparison
equal deleted inserted replaced
3:6108a8aa9d82 4:5080b65e6963
1 /*============================================================================= 1 /*=============================================================================
2 * File: ExperimentController.java 2 * File: ExperimentController.java
3 * Author: Marcus Pearce <m.pearce@gold.ac.uk> 3 * Author: Marcus Pearce <m.pearce@gold.ac.uk>
4 * Created: <2007-12-14 12:06:10 marcusp> 4 * Created: <2007-12-14 12:06:10 marcusp>
5 * Time-stamp: <2010-06-14 13:20:03 marcusp> 5 * Time-stamp: <2010-11-18 11:04:51 marcusp>
6 *============================================================================= 6 *=============================================================================
7 */ 7 */
8 8
9 import java.awt.*; 9 import java.awt.*;
10 import java.awt.event.*; 10 import java.awt.event.*;
113 String answer2 = (String)(sp.getQ2Box().getSelectedItem()); 113 String answer2 = (String)(sp.getQ2Box().getSelectedItem());
114 block.addMelodyQA("known", answer1); 114 block.addMelodyQA("known", answer1);
115 block.addMelodyQA("liked", answer2); 115 block.addMelodyQA("liked", answer2);
116 block.storeMelodyResult(); 116 block.storeMelodyResult();
117 results.writeResults(); 117 results.writeResults();
118 // close the midi player
119 block.getMidiPlayer().stop();
118 // proceed to ... 120 // proceed to ...
119 String nextFile = block.nextFile(); 121 String nextFile = block.nextFile();
120 if (nextFile == null) { 122 if (nextFile == null) {
121 boolean nb = exp.nextBlock(); 123 boolean nb = exp.nextBlock();
122 if (nb) { 124 if (nb) {