comparison 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
comparison
equal deleted inserted replaced
174:ff28af9e1d58 175:977b7007071f
77 77
78 if (m_rates.find(filename) == m_rates.end()) { 78 if (m_rates.find(filename) == m_rates.end()) {
79 m_rates[filename] = sampleRate; 79 m_rates[filename] = sampleRate;
80 } 80 }
81 81
82 if (m_fileTransforms[filename].find(transformId) == 82 if (m_fileTransforms[filename].find(transform) ==
83 m_fileTransforms[filename].end()) { 83 m_fileTransforms[filename].end()) {
84 84
85 // This transform is new to the file, give it a channel number 85 // This transform is new to the file, give it a channel number
86 86
87 int channel = m_nextChannels[filename]; 87 int channel = m_nextChannels[filename];
88 m_nextChannels[filename] = channel + 1; 88 m_nextChannels[filename] = channel + 1;
89 89
90 m_fileTransforms[filename].insert(transformId); 90 m_fileTransforms[filename].insert(transform);
91 m_channels[transformId] = channel; 91 m_channels[transform] = channel;
92 } 92 }
93 93
94 NoteList notes = m_notes[filename]; 94 NoteList notes = m_notes[filename];
95 95
96 bool freq = (output.unit == "Hz" || 96 bool freq = (output.unit == "Hz" ||
127 } 127 }
128 } 128 }
129 129
130 NoteData note(frame, duration, pitch, velocity); 130 NoteData note(frame, duration, pitch, velocity);
131 131
132 note.channel = m_channels[transformId]; 132 note.channel = m_channels[transform];
133 133
134 notes.push_back(note); 134 notes.push_back(note);
135 } 135 }
136 136
137 m_notes[filename] = notes; 137 m_notes[filename] = notes;