comparison transform/FeatureExtractionModelTransformer.cpp @ 1644:513192aa9b03 single-point

Further API updates
author Chris Cannam
date Wed, 13 Mar 2019 16:00:13 +0000
parents 7a23dfe65d66
children 29a20719796e
comparison
equal deleted inserted replaced
1643:7a23dfe65d66 1644:513192aa9b03
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(Event(frame, value, // value is pitch 1076 model->add(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