-
-
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] Remove beatmap and beatgrid #2861
Conversation
…//github.com/JaviVilarroig/mixxx into bars_phrases_and_variable_BPM_in_beats_class
…variable_BPM_in_beats_class
Added support in BeatGrid and some minor fixes in BeatMap.
- Added Beats.setBar The skin work is just a placeholder. I'm not so good in design.
- Extended BeatIterator for Bar and Phrase(partial) support. - Extended BeatMap for Bar and Phrase(partial) management. - Waveformrendererbeat extended to include the definition of the bar beat color in the XML skin files. - Tango Skin modified to include a button for marking bar beats.
…variable_BPM_in_beats_class
- Filename renamed to match class name - Property names improved - UItility constants renamed to fit variable coding rules
downbeat positions.
protobuff, improvement in some tooltips and name changes in some methods and properties.
- BeatMap functionality moved to Beats class - BeatGrid class removed - BeatsFactory only creates Beats - BeatGridTest removed - Beats class moved to mixxx namespace - Beats class uses frame number instead of sample number The original methods still exists. They transform sample into frames and call a method with the same name with "New" sufix. This is temporary until the rest of the code is adapted to use frames - BeatsTest adapted to new Beats class
The review comments in #2512 need not be repeated here. Those will be taken care of. |
CodeFactor code check fails due to JS files. |
@daschuer Unfortunately this branch still contains unrelated and unnecessary changes in TrackDAO that will cause merge conflicts with #2524. I am currently checking the whole diff to master. In this special case I would propose to squash all commits, remove all unrelated changes, and restart the branch with a clean rebase on master. To prevent more of this and more serious issues that could be caused by inappropriate merge commits. Update: This applies to all commits until and including 588b495. The following commits are safe. |
https://github.com/uklotzde/mixxx/tree/rebuild-remove-beatmap-beatgrid
This is what I consider clean restart, though I don't have the time to preserve all the original commits. The actual number of changes is rather moderate. Still many open issues, especially regarding the class design. The warnings about the copy constructor already indicate what is fundamentally wrong. Also the cyclic dependency on |
I propose "BeatVector" as a less ambiguous name for this new class. |
@@ -746,83 +781,85 @@ Bpm BeatsInternal::getBpmAroundPosition(FramePos curFrame, int n) const { | |||
stopBeat.set_frame_position(upper_bound.getValue()); | |||
return calculateBpm(startBeat, stopBeat); | |||
} | |||
TimeSignature BeatsInternal::getSignature(FramePos frame) const { | |||
|
|||
TimeSignature BeatsInternal::getSignature(int beatIndex) const { | |||
if (!isValid()) { |
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 the meaning of an invalid time signature? A time signature with 0 as one of the numbers?
https://github.com/mixxxdj/mixxx/wiki/Beat-and-Bar-Edit-Workflow If we don't want to be backward compatible we are free to switch over to a sparse representation. The current definition is in between without making use of one of both benefits, that's why is think we should adjust our current model. |
Yes. It is a hybrid between sparse representation and BeatMap. But the individual beats are stored like a beatmap. |
Why do we require int to be backwards compatible? We do have a migration path. So it doesn't matter what the new storage format is.
As I mentioned above, migration will take care of new data format. |
TimeSignature timeSignatureBefore; | ||
int timeSignatureBeforeMarkerIndex = 0; | ||
for (const auto& timeSignatureMarker : m_timeSignatureMarkers) { |
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.
Factor this out to a function to get the time signature for any position.
We have discussed to make the beats set by the new editor also a available for the 2.3 branch. I don't think that this is really necessary if we don't change the beat format of tracks where the beats are not touched. Is this the case in this branch? This will allow us to design a new pootop format from the scratch like a sparse presentation. |
Closing in favour of #2961. |
This is a continuation of #2512
Goals:
Address all review comments from 2512
Fix tests
Remove UI features (Since they are being developed in [WIP] Bars and downbeats for common time signature. #2844)
Add backward compatibility for functions that generate BeatGrid by generating an intermediate BeatMap before passing to Beats class.
Migrate user data from old BeatGrid & BeatMap protobufs
Break up Beats class into an inner functional class that doesn't inherit from QObject and an outer QObject wrapper.
Add protobuf definitions for TimeSignature, Phrase and Sections and write test cases to test their operations.