Mercurial > hg > svcore
diff data/fileio/MIDIFileReader.cpp @ 384:6f6ab834449d spectrogram-cache-rejig
* Merge from trunk
author | Chris Cannam |
---|---|
date | Wed, 27 Feb 2008 11:59:42 +0000 |
parents | 14e0f60435b8 |
children | 183ee2a55fc7 |
line wrap: on
line diff
--- a/data/fileio/MIDIFileReader.cpp Thu Nov 15 14:03:56 2007 +0000 +++ b/data/fileio/MIDIFileReader.cpp Wed Feb 27 11:59:42 2008 +0000 @@ -1021,8 +1021,10 @@ QString noteLabel = tr("%1 - vel %2") .arg(pitchLabel).arg(int((*i)->getVelocity())); + float level = float((*i)->getVelocity()) / 128.f; + Note note(startFrame, (*i)->getPitch(), - endFrame - startFrame, noteLabel); + endFrame - startFrame, level, noteLabel); // std::cerr << "Adding note " << startFrame << "," << (endFrame-startFrame) << " : " << int((*i)->getPitch()) << std::endl;