-
-
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] Bars phrases and variable bpm in beats class #2512
[WIP] Bars phrases and variable bpm in beats class #2512
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
This comment has been minimized.
This comment has been minimized.
Don't worry, just ignore them. |
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.
Some more comments.
d="M 12.52,33.264 H 11.4809 L 9.0746,11.116 C 8.96522,10.14989 8.91053,9.4298 8.91054,8.9558 c -2.6e-6,-1.1484 0.30077,-2.069 0.90234,-2.7617 0.61978,-0.69267 1.3581,-1.039 2.2148,-1.0391 0.85676,3.8e-5 1.5768,0.34639 2.1602,1.0391 0.60155,0.69274 0.90233,1.7227 0.90234,3.0898 -5.2e-5,0.43753 -0.03646,1.0482 -0.10938,1.832 l -2.4609,22.148 m -0.54688,4.5391 c 0.83853,5e-6 1.5495,0.30079 2.1328,0.90234 0.60155,0.58334 0.90233,1.2852 0.90234,2.1055 -1.3e-5,0.83854 -0.30079,1.5586 -0.90234,2.1602 -0.58334,0.58333 -1.2943,0.875 -2.1328,0.875 -0.83855,-1e-6 -1.5586,-0.29167 -2.1602,-0.875 -0.58334,-0.60156 -0.87501,-1.3216 -0.875,-2.1602 -2e-6,-0.82031 0.29166,-1.5221 0.875,-2.1055 0.60156,-0.60156 1.3216,-0.90234 2.1602,-0.90234" | ||
style="fill:#ff3232;fill-opacity:1" | ||
inkscape:connector-curvature="0" /> | ||
</svg> |
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.
Did you consider a bar symbol cut from staff lines with the lines in background? Is there anything else what we can use? IMHO the explanation mark is ambiguous.
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.
Or maybe we can use a whole measure for a beat, and four measures for a phrase.
... Or one measure with a clef.
Ideas?
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.
Bufff. As I said, I consider myself a competent developer, just a little bit rusty.
But I'm a terrible designer. I will be very happy if someone with good designer skill can help on tat. I'm open to any kind of proposal.
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.
Did you consider a bar symbol cut from staff lines with the lines in background?
I like that idea. Maybe include a treble clef on the staff to clarify what it is. I am struggling to come up with an idea for a phrase icon though. @ronso0 do you have any ideas or want to contribute icons?
I thought we were planning to replace BeatMap and BeatGrid with a new class that handles all cases. I think it is a waste of time to work on both of them. BeatMap may be closer to what we need in the end. |
I agree on the point that BeatGrid is not really useful. It has a lot of limitations. Must I read that as a proposal for a full revamp of the Beat class? |
Yes. You could remove BeatGrid and make Beats into what BeatMap is now instead of keeping Beats as an abstract base class. |
/// Return a string that represent the preferences used to generate | ||
/// the beats object. | ||
virtual QString getSubVersion() const; | ||
virtual void setSubVersion(QString subVersion); |
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 don't understand the purpose of this subversion concept. The version specifies the protobuf version so we can upgrade old data from the database to new versions in the future. What does a subversion add to that? I think we can 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 am not sure how database migrations will work if we remove the subversion concept (along with versions as well).
Can this lead to problems?
/// Returns a string representing the version of the beat-processing code that | ||
/// produced this Beats instance. Used by BeatsFactory for associating a | ||
/// given serialization with the version that produced it. | ||
virtual QString getVersion() const; |
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.
QString? Shouldn't this be an int?
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.
static const QString BEAT_MAP_VERSION;
static const QString BEAT_GRID_1_VERSION;
static const QString BEAT_GRID_2_VERSION;
These will eventually be removed so I won't change anything about them.
We will rely on the preference settings just to check whether the user wants constant or dynamic BPM. BeatsFactory will read the preference instead of this version.
Do we agree on entirely removing the Beats versioning?
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.
No, we cannot upgrade old data without versioning. The tricky situation we face now is that the legacy formats used a string to encode 2 different pieces of information, the version and the type (BeatMap or BeatGrid). Future upgrades will be more straightforward if we simply use an int to specify the version.
double previous_beatpos = -1; | ||
track::io::Beat beat; | ||
|
||
foreach (double beatpos, beats) { |
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.
foreach
is a legacy Qt macro from before C++11. Use standard for (double beatpos : beats)
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.
58be257
Is a really problematic commit.
It touches a lot of unrelated lines.
It looks like as if you have applied accidentally clang-format to many files.
There is a big risk that this has broken something. At least it is very hard to verify this in a review.
I am unsure how to proceed here. Mabe we can rebase this branch and redo the merge. But that involved another risk. I am unsure.
I'll be working to fix the outstanding issues and review comments on this PR this week and will try to get this merged by the weekend or the beginning of next week. |
1851baf |
Manually picking and re-committing changes from another branch is also not safe imho: d0e4b12 |
This is a branch that removes the faulty merge commit and also some issues from a previous master merge: Please reset this branch to mine and push to this PR. If you have checked out this branch you can do it as follows:
to check the changes
I am unsure about resolving conflicts in |
All GUI changes in this branch should be reverted. The GUI is implemented in #2844. |
OK, So please wait with the reset. By the way: for merging I use SmartGit. It works perfectly for resolving conflicts and is free for FOSS projects. |
Cool. I'll wait for the tree cleanup. Please let me know if I can help with the process.
Thanks. This is really awesome. |
Hi everybody. |
@JaviVilarroig Thanks for passing the baton to our GSoC students. I am confident they are able to finish the work you have started. Unfortunately this branch is unmergeable due some errors that happened while resolving merge conflicts along the way. As mentioned in #2816 I have aggregated all necessary changes into a single commit and applied a final fix commit on top of that, see the branch uklotzde/mixxx/tree/rebuild-remove-beatmap-beatgrid. But I would like to keep you mentioned as the author, because it was not me that did all this work! How about this pragmatic solution for a clean restart:
Afterwards @hacksdump would be able to rebase his changes from #2861 on your branch and we are ready to go. Also asking @daschuer @hacksdump @crisclacerda for comments. |
@uklotzde if it's just about authorship, you can just use:
|
@Holzhaus Done. I have force pushed uklotzde/mixxx/tree/rebuild-remove-beatmap-beatgrid, now with @JaviVilarroig as the author of the aggregate commit and a commit message that matches the title and number of this PR. |
Thank you @uklotzde. @hacksdump please rebase your commits in #2861 onto @uklotzde's branch then force push #2861 and we can continue from there. |
Does that mean that I must take no action? |
Correct, there's nothing you need to do @JaviVilarroig. |
Good Copy. |
Sure, we can close this now in favor of #2861. |
I have work in progress for a clean rebase of this branch. |
The clean rebase is here: |
This is still a WIP.
On BeatMaps, the infrastructure for adding variable Signature and BPM data and to mark beat as a bar beat or a phrase beat is mostly done.
On BeatGrids, the infrastructure for adding fixed Signature data and to indicate where to count bar and phrase beats is mostly done.
I have reached the point where it's possible to mark a beat as bar beat and to show them in the waveformrenderer. I have updated Tango skin (disclaimer: I'm not a designer, so it's ugly) to allow to mark bar beats.
By pressing the added button in the beat management interface, the nearest beat becomes a bar beat and all the following beats are recalculated accordingly up to the end of the track or the next phrase bar.
Bar beats are painted in a color defined in the skin, in my example in dim yellow.
Now I will move to add a button for phrase beats. But in the meantime I will love to have your review of the changes done until now.