changeset 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 ff28af9e1d58
children 59abb58b1855
files runner/MIDIFeatureWriter.cpp runner/MIDIFeatureWriter.h
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
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);
     }
--- a/runner/MIDIFeatureWriter.h	Wed Oct 15 16:54:35 2014 +0100
+++ b/runner/MIDIFeatureWriter.h	Wed Oct 15 16:58:00 2014 +0100
@@ -63,13 +63,13 @@
     typedef map<QString, NoteList> NoteMap; // output filename -> notes
     NoteMap m_notes;
     
-    typedef map<QString, set<TransformId> > FileTransformMap;
+    typedef map<QString, set<Transform> > FileTransformMap;
     FileTransformMap m_fileTransforms;
 
     typedef map<QString, float> SampleRateMap; // NoteData uses sample timing
     SampleRateMap m_rates;
 
-    typedef map<TransformId, int> ChannelMap;
+    typedef map<Transform, int> ChannelMap;
     ChannelMap m_channels;
     
     typedef map<QString, int> NextChannelMap;