comparison 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
comparison
equal deleted inserted replaced
337:a6fab10ff9e6 384:6f6ab834449d
1019 !sharpKey); 1019 !sharpKey);
1020 1020
1021 QString noteLabel = tr("%1 - vel %2") 1021 QString noteLabel = tr("%1 - vel %2")
1022 .arg(pitchLabel).arg(int((*i)->getVelocity())); 1022 .arg(pitchLabel).arg(int((*i)->getVelocity()));
1023 1023
1024 float level = float((*i)->getVelocity()) / 128.f;
1025
1024 Note note(startFrame, (*i)->getPitch(), 1026 Note note(startFrame, (*i)->getPitch(),
1025 endFrame - startFrame, noteLabel); 1027 endFrame - startFrame, level, noteLabel);
1026 1028
1027 // std::cerr << "Adding note " << startFrame << "," << (endFrame-startFrame) << " : " << int((*i)->getPitch()) << std::endl; 1029 // std::cerr << "Adding note " << startFrame << "," << (endFrame-startFrame) << " : " << int((*i)->getPitch()) << std::endl;
1028 1030
1029 model->addPoint(note); 1031 model->addPoint(note);
1030 break; 1032 break;