comparison transform/FeatureExtractionModelTransformer.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
1071 if (velocity < 0) velocity = 127; 1071 if (velocity < 0) velocity = 127;
1072 if (velocity > 127) velocity = 127; 1072 if (velocity > 127) velocity = 127;
1073 1073
1074 NoteModel *model = getConformingOutput<NoteModel>(n); 1074 NoteModel *model = getConformingOutput<NoteModel>(n);
1075 if (!model) return; 1075 if (!model) return;
1076 model->addPoint(NoteModel::Point(frame, value, // value is pitch 1076 model->addPoint(Event(frame, value, // value is pitch
1077 duration, 1077 duration,
1078 velocity / 127.f, 1078 velocity / 127.f,
1079 feature.label.c_str())); 1079 feature.label.c_str()));
1080 } else { 1080 } else {
1081 1081
1082 RegionModel *model = getConformingOutput<RegionModel>(n); 1082 RegionModel *model = getConformingOutput<RegionModel>(n);
1083 if (!model) return; 1083 if (!model) return;
1084 1084