-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Effects Refactoring #1705
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a decent start. Untangling the mess from the old architecture won't happen all at once, so I don't expect you to take care of everything I am pointing out now in the next commit.
In general, wherever the old EffectChainSlot class called a function of m_pEffectChain, remove the old function of the EffectChain class and move its contents to the function of the old EffectChainSlot class where it was called.
Please make your next commit simply removing commented out and outdated code. Then it will be easier to review the code you actually change in following commits. |
I am repeating the plan we came up with in our private Zulip chat:
|
I think we will need the EffectRack layer. |
Why? It does nothing but overcomplicate the code. Everything done at the effect rack layer can and should be moved down to the effect chain layer. The superfluous rack layer requires breaking the abstraction of the chain layer. |
b11322c
to
ad9c680
Compare
@kshitij98 did you change the email you configured to be associated with your Git commits? The new commits are showing as being from a different GitHub user. |
My laptop was not working fine yesterday so I had to use a friend's pc for the same. I forgot to change the config setting of git. Should I reset the author of the previous commits? |
When you're done consolidating EffectChain/EffectChainSlot, rebase and squash your work down to one commit to remove the temporary intermediate code from the Git history. At that time you can remove the other email associated with the new commits. For now let's just keep going. |
1da9dc2
to
5372b09
Compare
fa08ebc
to
b6cdbfa
Compare
The regular effects are not being applied if they are enabled for an input channel on startup. After toggling the routing switch they work. I am trying to debug this... |
I have sent you a pull request to fix the initialization process. |
EffectChainSlot is down to about 600 lines of code :D |
I am thinking we should rename EffectChainSlot to EffectChain now. What do you think? |
I have edited the previous commit messages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this PR is still blocked by the open discussion about the future CO namespace. We are talking here about 8000 alias COs.
I understand the reasons for the renaming, but we should pretty sure that this reason outweighs all the related work and that the new namespace helps us for future changes. Later renaming because of new features will be harder due to the created naming legacy.
I think both is doubtful, and the old name space is well considered and not that bad. I also do not like the idea of cycling the names, this will create even more confusion. Unit and Rack means here totally different things. A perfect recipe for confusion.
If it turns out I am the only one with this opinion we can do the change, otherwise lets postpone the renaming and revert this PR to the existing nomenclature.
for (int deck = 1; deck <= iNumDecks; ++deck) { | ||
QMenu* deckMenu = addSubmenu(QString("Deck %1").arg(deck), eqMenu); | ||
for (int effect = kMaxEqs - 1; effect >= 0; --effect) { | ||
const QString group = EqualizerEffectChainSlot::formatEffectSlotGroup( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is EqualizerEffectChainSlot? This is not Part of the wiki description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have not done the renaming yet. EqualizerEffectChainSlot is what the wiki describes as EqualizerEffectRack.
So the current state here is that the Rack classes where removed, but the CO namespace is still unchanged? If we stick with this for a first step, it will work for me. |
Yes, that is the current state of the code. |
#include "engine/effects/engineeffectchain.h" | ||
#include "util/assert.h" | ||
|
||
namespace { | ||
const QString kStandardEffectRackGroup = "[EffectRack1]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused?
#include "engine/effects/engineeffectchain.h" | ||
#include "util/assert.h" | ||
|
||
namespace { | ||
const QString kStandardEffectRackGroup = "[EffectRack1]"; | ||
const QString kOutputEffectRackGroup = "[OutputEffectRack]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused?
#include "engine/effects/engineeffectchain.h" | ||
#include "util/assert.h" | ||
|
||
namespace { | ||
const QString kStandardEffectRackGroup = "[EffectRack1]"; | ||
const QString kOutputEffectRackGroup = "[OutputEffectRack]"; | ||
const QString kQuickEffectRackGroup = "[QuickEffectRack1]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused?
const QString kStandardEffectRackGroup = "[EffectRack1]"; | ||
const QString kOutputEffectRackGroup = "[OutputEffectRack]"; | ||
const QString kQuickEffectRackGroup = "[QuickEffectRack1]"; | ||
const QString kEqualizerEffectRackGroup = "[EqualizerRack1]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
const QString kStandardEffectRackGroup = "[EffectRack1]"; | ||
const QString kOutputEffectRackGroup = "[OutputEffectRack]"; | ||
const QString kQuickEffectRackGroup = "[QuickEffectRack1]"; | ||
const QString kEqualizerEffectRackGroup = "[EqualizerRack1]"; | ||
const QString kEffectGroupSeparator = "_"; | ||
const QString kGroupClose = "]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kGroupOpen is missing. We use [ and ] everywhere as characters in the code. Imho this one clutters the code more than it helps, can we just remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be in favor of removing it.
Added comments
function pointers for signal-slot connections in effects system
- Removed EffectSlot::getParameterForSlot - Removed EffectParameter::valueChanged signal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is off to a good start!
- Added EffectChainPreset class - Added EffectPreset class - Added EffectsManager::loadEffectChainPresets
6b908bf
to
2fab19a
Compare
file.close(); | ||
|
||
QDomElement root = doc.documentElement(); | ||
QDomElement rackElement = XmlParse::selectElement(root, EffectXml::Rack); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment explaining that this element is superfluous but it is kept for backwards compatibility.
continued here: #2618 |
The pull request is at a very initial stage and a lot of work still needs to be done on it.
The current scope of this PR is:
EffectChain
andEffectChainSlot
classThere is some confusion with the current naming of classes. The newly proposed class names are:
NOTE: XML loading and saving has been commented out and will be re-implemented with the new
Preset
classes