changeset 16:15f3b6d84c81

Comment out some debugging printlns.
author Marcus Pearce <marcus.pearce@eecs.qmul.ac.uk>
date Tue, 17 Jan 2012 12:53:53 +0000
parents dec8e537cbf8
children ee48b264dfdd
files Block.java MidiPlayer.java
diffstat 2 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Block.java	Tue Jan 17 12:25:15 2012 +0000
+++ b/Block.java	Tue Jan 17 12:53:53 2012 +0000
@@ -2,7 +2,7 @@
  * File:       Block.java
  * Author:     Marcus Pearce <m.pearce@gold.ac.uk>
  * Created:    <2008-01-07 10:38:45 marcusp>
- * Time-stamp: <2011-11-04 17:36:02 marcusp>
+ * Time-stamp: <2011-12-09 17:59:20 marcusp>
  *=============================================================================
  */
 
@@ -76,8 +76,10 @@
         // initialise the block 
         hasRun = false; 
         initialiseBlock();
+        // Initialise the Midiplayer 
+        mp = new MidiPlayer(exp.getMidiDirectory().concat(filename), exp.getMidiDeviceNumber());
         // Write out stimulus structure for all melodies in block
-        //writeStimuli(); 
+        //writeStimuli();
     }
 
     /* initialise the block */ 
@@ -135,11 +137,12 @@
         while(ppi.hasNext()) { 
             int probe = ((Integer)ppi.next()).intValue();
             if (exp.getDebug())
-                System.out.println("Probe at " + probe);
+                System.out.println("Probe at " + probe + " out of " + onsets.size());
             // probes.set(probe - numEvents, ProbeID.START_CLOCK); 
             probes.set(probe - 1, ProbeID.BEFORE_PROBE); 
             probes.set(probe, (ProbeID)pvi.next()); 
-            probes.set(probe + 1, ProbeID.AFTER_PROBE); 
+            if (probe < (onsets.size() - 1)) 
+                probes.set(probe + 1, ProbeID.AFTER_PROBE); 
         }
         
         // Set up the clock start times 
--- a/MidiPlayer.java	Tue Jan 17 12:25:15 2012 +0000
+++ b/MidiPlayer.java	Tue Jan 17 12:53:53 2012 +0000
@@ -2,7 +2,7 @@
  * File:       MidiPlayer.java
  * Author:     Marcus Pearce <m.pearce@gold.ac.uk>
  * Created:    <2007-02-14 12:13:56 marcusp>
- * Time-stamp: <2010-11-18 11:01:56 marcusp>
+ * Time-stamp: <2011-11-15 16:52:06 marcusp>
  *=============================================================================
  */
 
@@ -296,6 +296,7 @@
 
     /* play the midi file */ 
     public void play() { 
+        //System.out.println("MidiPlayer.play: run sequencer.start().");
         sequencer.start();
     }