comparison src/Analyser.cpp @ 398:6f7133733032

Make the dragged pitch take effect when releasing drag on a note
author Chris Cannam
date Tue, 11 Nov 2014 17:05:44 +0000
parents f76adae8fe5e
children a0eedd10dee3
comparison
equal deleted inserted replaced
397:facbe5e7fb4c 398:6f7133733032
420 if (params) params->setPlayPan(1); 420 if (params) params->setPlayPan(1);
421 connect(flexiNoteLayer, SIGNAL(modelCompletionChanged()), 421 connect(flexiNoteLayer, SIGNAL(modelCompletionChanged()),
422 this, SLOT(layerCompletionChanged())); 422 this, SLOT(layerCompletionChanged()));
423 connect(flexiNoteLayer, SIGNAL(reAnalyseRegion(int, int, float, float)), 423 connect(flexiNoteLayer, SIGNAL(reAnalyseRegion(int, int, float, float)),
424 this, SLOT(reAnalyseRegion(int, int, float, float))); 424 this, SLOT(reAnalyseRegion(int, int, float, float)));
425 connect(flexiNoteLayer, SIGNAL(materialiseReAnalysis()),
426 this, SLOT(materialiseReAnalysis()));
425 } 427 }
426 428
427 return ""; 429 return "";
428 } 430 }
429 431
433 cerr << "Analyser::reAnalyseRegion(" << frame0 << ", " << frame1 435 cerr << "Analyser::reAnalyseRegion(" << frame0 << ", " << frame1
434 << ", " << freq0 << ", " << freq1 << ")" << endl; 436 << ", " << freq0 << ", " << freq1 << ")" << endl;
435 showPitchCandidates(true); 437 showPitchCandidates(true);
436 (void)reAnalyseSelection(Selection(frame0, frame1), 438 (void)reAnalyseSelection(Selection(frame0, frame1),
437 FrequencyRange(freq0, freq1)); 439 FrequencyRange(freq0, freq1));
440 }
441
442 void
443 Analyser::materialiseReAnalysis()
444 {
445 if (m_reAnalysingSelection.isEmpty()) return;
446 switchPitchCandidate(m_reAnalysingSelection, true); // or false, doesn't matter
438 } 447 }
439 448
440 QString 449 QString
441 Analyser::reAnalyseSelection(Selection sel, FrequencyRange range) 450 Analyser::reAnalyseSelection(Selection sel, FrequencyRange range)
442 { 451 {