# HG changeset patch # User Chris Cannam # Date 1593168339 -3600 # Node ID b504df98c3be446f7ff04f9b1a9748017b526e85 # Parent 5671836cdac79812092de25733d144126fc9526b Ensure completion on output model is started at zero, so if it's checked before the input model has become ready and the transform has begun, it is not accidentally reported as complete (affected re-aligning models in Sonic Lineup when replacing the session) diff -r 5671836cdac7 -r b504df98c3be transform/FeatureExtractionModelTransformer.cpp --- a/transform/FeatureExtractionModelTransformer.cpp Thu Jun 25 12:20:20 2020 +0100 +++ b/transform/FeatureExtractionModelTransformer.cpp Fri Jun 26 11:45:39 2020 +0100 @@ -249,6 +249,7 @@ for (int j = 0; in_range_for(m_transforms, j); ++j) { createOutputModels(j); + setCompletion(j, 0); } m_outputMutex.lock(); @@ -360,6 +361,9 @@ // Anything with no value and no duration is an instant + SVDEBUG << "FeatureExtractionModelTransformer::createOutputModels: " + << "creating a SparseOneDimensionalModel" << endl; + out = std::make_shared (modelRate, modelResolution, false); @@ -419,7 +423,8 @@ bool flexi = settings.value("use-flexi-note-model", false).toBool(); settings.endGroup(); - SVCERR << "flexi = " << flexi << endl; + SVDEBUG << "FeatureExtractionModelTransformer::createOutputModels: " + << "creating a NoteModel (flexi = " << flexi << ")" << endl; NoteModel *model; if (haveExtents) { @@ -436,6 +441,9 @@ } else { + SVDEBUG << "FeatureExtractionModelTransformer::createOutputModels: " + << "creating a RegionModel" << endl; + RegionModel *model; if (haveExtents) { model = new RegionModel @@ -481,6 +489,11 @@ m_needAdditionalModels[n] = true; } + SVDEBUG << "FeatureExtractionModelTransformer::createOutputModels: " + << "creating a SparseTimeValueModel " + << "(additional models to come? -> " + << m_needAdditionalModels[n] << ")" << endl; + SparseTimeValueModel *model; if (haveExtents) { model = new SparseTimeValueModel @@ -504,6 +517,10 @@ // has a fixed sample rate and more than one value per result // must be a dense 3D model. + SVDEBUG << "FeatureExtractionModelTransformer::createOutputModels: " + << "creating a BasicCompressedDenseThreeDimensionalModel" + << endl; + auto model = new BasicCompressedDenseThreeDimensionalModel (modelRate, modelResolution, binCount, false);