Mercurial > hg > svapp
comparison framework/SVFileReader.cpp @ 61:215b8b1b0308
* Add Erase tool and mode
* Add icons for Normalize buttons in property boxes, and for Show Peaks
* Add support for velocity in notes -- not yet reflected in display or
editable in the note edit dialog, but they are imported from MIDI,
played, and exported
* Begin work on making pastes align pasted times (subtler than I thought)
author | Chris Cannam |
---|---|
date | Fri, 23 Nov 2007 16:48:23 +0000 |
parents | de2b3c6479c8 |
children | 4aa40182321f 22bf057ea151 |
comparison
equal
deleted
inserted
replaced
60:7b71da2d0631 | 61:215b8b1b0308 |
---|---|
849 float value = 0.0; | 849 float value = 0.0; |
850 value = attributes.value("value").trimmed().toFloat(&ok); | 850 value = attributes.value("value").trimmed().toFloat(&ok); |
851 size_t duration = 0; | 851 size_t duration = 0; |
852 duration = attributes.value("duration").trimmed().toUInt(&ok); | 852 duration = attributes.value("duration").trimmed().toUInt(&ok); |
853 QString label = attributes.value("label"); | 853 QString label = attributes.value("label"); |
854 nm->addPoint(NoteModel::Point(frame, value, duration, label)); | 854 float level = attributes.value("level").trimmed().toFloat(&ok); |
855 if (!ok) { // level is optional | |
856 level = 1.f; | |
857 ok = true; | |
858 } | |
859 nm->addPoint(NoteModel::Point(frame, value, duration, level, label)); | |
855 return ok; | 860 return ok; |
856 } | 861 } |
857 | 862 |
858 TextModel *tm = dynamic_cast<TextModel *>(m_currentDataset); | 863 TextModel *tm = dynamic_cast<TextModel *>(m_currentDataset); |
859 | 864 |