comparison data/fileio/MIDIFileReader.cpp @ 1643:7a23dfe65d66 single-point

Update NoteModel to use EventSeries. This is incomplete and won't provide enough to update svgui for it yet; must also refactor to avoid duplication of nasty APIs when updating the rest of the models
author Chris Cannam
date Wed, 13 Mar 2019 14:50:10 +0000
parents 70e172e6cc59
children 513192aa9b03
comparison
equal deleted inserted replaced
1642:d591836e47ef 1643:7a23dfe65d66
1025 QString noteLabel = tr("%1 - vel %2") 1025 QString noteLabel = tr("%1 - vel %2")
1026 .arg(pitchLabel).arg(int((*i)->getVelocity())); 1026 .arg(pitchLabel).arg(int((*i)->getVelocity()));
1027 1027
1028 float level = float((*i)->getVelocity()) / 128.f; 1028 float level = float((*i)->getVelocity()) / 128.f;
1029 1029
1030 Note note(startFrame, (*i)->getPitch(), 1030 Event note(startFrame, (*i)->getPitch(),
1031 endFrame - startFrame, level, noteLabel); 1031 endFrame - startFrame, level, noteLabel);
1032 1032
1033 // SVDEBUG << "Adding note " << startFrame << "," << (endFrame-startFrame) << " : " << int((*i)->getPitch()) << endl; 1033 // SVDEBUG << "Adding note " << startFrame << "," << (endFrame-startFrame) << " : " << int((*i)->getPitch()) << endl;
1034 1034
1035 model->addPoint(note); 1035 model->addPoint(note);
1036 break; 1036 break;