mirror of
https://github.com/LMMS/lmms.git
synced 2026-05-17 11:18:30 -04:00
* fixes #6354: Sample and Hold for LFO Controller LFO controller's "white noise" wave shape didn't respect the frequency knob at all, so Sample-and-Hold was added to extend the functionality of the LFO Controller with this random waveshape. The original functionallity can still be accessed by setting the FREQ knob to minimum (0.01) --------- Co-authored-by: Kevin Zander <veratil@gmail.com> Co-authored-by: saker <sakertooth@gmail.com>
This commit is contained in:
@@ -79,6 +79,7 @@ const std::vector<DataFile::UpgradeMethod> DataFile::UPGRADE_METHODS = {
|
||||
&DataFile::upgrade_automationNodes , &DataFile::upgrade_extendedNoteRange,
|
||||
&DataFile::upgrade_defaultTripleOscillatorHQ,
|
||||
&DataFile::upgrade_mixerRename , &DataFile::upgrade_bbTcoRename,
|
||||
&DataFile::upgrade_sampleAndHold ,
|
||||
};
|
||||
|
||||
// Vector of all versions that have upgrade routines.
|
||||
@@ -1762,6 +1763,23 @@ void DataFile::upgrade_bbTcoRename()
|
||||
}
|
||||
|
||||
|
||||
// Set LFO speed to 0.01 on projects made before sample-and-hold PR
|
||||
void DataFile::upgrade_sampleAndHold()
|
||||
{
|
||||
QDomNodeList elements = elementsByTagName("lfocontroller");
|
||||
for (int i = 0; i < elements.length(); ++i)
|
||||
{
|
||||
if (elements.item(i).isNull()) { continue; }
|
||||
auto e = elements.item(i).toElement();
|
||||
// Correct old random wave LFO speeds
|
||||
if (e.attribute("wave").toInt() == 6)
|
||||
{
|
||||
e.setAttribute("speed",0.01f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DataFile::upgrade()
|
||||
{
|
||||
// Runs all necessary upgrade methods
|
||||
|
||||
Reference in New Issue
Block a user