Don't copy DetuningHelper in Note copy constructor (#7888)

Reworks how note detuning copying works so as not to perform a clip duplication and allocation by default in the constructors

---------

Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
This commit is contained in:
regulus79
2025-05-28 19:28:13 -04:00
committed by GitHub
parent cb84fce599
commit 7e02795f47
7 changed files with 26 additions and 119 deletions

View File

@@ -163,8 +163,7 @@ private slots:
Note* note = midiClip.addNote(Note(TimePos(4, 0)), false);
note->createDetuning();
DetuningHelper* dh = note->detuning();
auto clip = dh->automationClip();
auto clip = note->detuning()->automationClip();
clip->setProgressionType( AutomationClip::ProgressionType::Linear );
clip->putValue(TimePos(0, 0), 0.0);
clip->putValue(TimePos(4, 0), 1.0);