diff runner/MIDIFeatureWriter.cpp @ 175:977b7007071f

TransformId is not sufficient -- it could be ambiguous (same transform id, different parameters etc). Use the whole transform
author Chris Cannam
date Wed, 15 Oct 2014 16:58:00 +0100
parents db83ea0e102d
children 082c3f21f49e
line wrap: on
line diff
--- a/runner/MIDIFeatureWriter.cpp	Wed Oct 15 16:54:35 2014 +0100
+++ b/runner/MIDIFeatureWriter.cpp	Wed Oct 15 16:58:00 2014 +0100
@@ -79,7 +79,7 @@
         m_rates[filename] = sampleRate;
     }
 
-    if (m_fileTransforms[filename].find(transformId) == 
+    if (m_fileTransforms[filename].find(transform) == 
         m_fileTransforms[filename].end()) {
 
         // This transform is new to the file, give it a channel number
@@ -87,8 +87,8 @@
         int channel = m_nextChannels[filename];
         m_nextChannels[filename] = channel + 1;
 
-        m_fileTransforms[filename].insert(transformId);
-        m_channels[transformId] = channel;
+        m_fileTransforms[filename].insert(transform);
+        m_channels[transform] = channel;
     }
 
     NoteList notes = m_notes[filename];
@@ -129,7 +129,7 @@
 
         NoteData note(frame, duration, pitch, velocity);
 
-        note.channel = m_channels[transformId];
+        note.channel = m_channels[transform];
 
         notes.push_back(note);
     }