-
Notifications
You must be signed in to change notification settings - Fork 3k
Guitar dives #31292
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
base: master
Are you sure you want to change the base?
Guitar dives #31292
Conversation
d3759e2 to
22db964
Compare
18c8ddb to
87a1af7
Compare
cbjeukendrup
left a comment
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've looked through it relatively quickly (and I've assumed James will take a slightly deeper look at the engraving part than I did), and found a few boring comments; but generally looks good to me!
| UiAction("dive", | ||
| mu::context::UiCtxProjectFocused, | ||
| mu::context::CTX_NOTATION_OPENED, | ||
| TranslatableString("action", "Dive"), |
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.
Maybe we should add a //: comment for each action, with a one-sentence explanation for translators, so that they know what these strings are about
src/engraving/types/propertyvalue.h
Outdated
|
|
||
| LH_TAPPING_SYMBOL, | ||
| RH_TAPPING_SYMBOL, | ||
| VIBRATO_LINE_TYPE_TYPE, |
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.
| VIBRATO_LINE_TYPE_TYPE, | |
| VIBRATO_LINE_TYPE, |
?
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.
Mistake
| enum class VibratoType : unsigned char { | ||
| GUITAR_VIBRATO, GUITAR_VIBRATO_WIDE, VIBRATO_SAWTOOTH, VIBRATO_SAWTOOTH_WIDE | ||
| enum class VibratoType : char { | ||
| NONE = -1, |
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.
There are some warnings about switches that don't handle NONE yet
src/engraving/dom/guitarbend.cpp
Outdated
| while (note->tieBack() && note->tieBack()->startNote()) { | ||
| note = note->tieBack()->startNote(); | ||
| } | ||
| GuitarBend* precedingBend = note->bendBack(); |
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.
see MSVC warning: declaration of 'precedingBend' hides previous local declaration
| item->mutldata()->setSymIds(SymIdList(symsCount, symId)); | ||
| item->mutldata()->moveY(0.5 * item->symHeight(symId)); | ||
| RectF bbox = item->symBbox(symId); | ||
| for (int i = 1; i < item->ldata()->symIds().size(); ++i) { |
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.
| for (int i = 1; i < item->ldata()->symIds().size(); ++i) { | |
| for (size_t i = 1; i < item->ldata()->symIds().size(); ++i) { |
(compiler warning)
|
|
||
| delegate: FlatRadioButton { | ||
| width: 132 | ||
| height: 51 |
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.
51 is a somewhat unusual value given that we tend to round to multiples of 4. But not very important
miiizen
left a comment
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.
Looking good to me! Spotted some trivial bits.
I like that we're reusing the guitar bend class. I think the only problem with that will be separating bends and dives in the DOM.
| bendText->setPos(PointF(vertex.x() - 0.5 * bendText->width(), bbox.top() - verticalTextPad - bendText->height())); | ||
| } | ||
|
|
||
| void GuitarDiveLayout::layoutScoop(GuitarBendSegment* item, LayoutContext& ctx) |
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.
Compiler warning - ctx unused
| return; | ||
| } | ||
|
|
||
| SymId scoopSym = SymId::guitarVibratoBarScoop; |
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.
| SymId scoopSym = SymId::guitarVibratoBarScoop; | |
| const SymId scoopSym = SymId::guitarVibratoBarScoop; |
| return prevStaffIdx != muse::nidx && mmRest->score()->staff(prevStaffIdx)->part() == itemPart; | ||
| } | ||
|
|
||
| bool SystemLayout::whammyBarShouldBeCenteredBetweenStaved(const WhammyBarSegment* wbar, const System* system) |
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.
| bool SystemLayout::whammyBarShouldBeCenteredBetweenStaved(const WhammyBarSegment* wbar, const System* system) | |
| bool SystemLayout::whammyBarShouldBeCenteredBetweenStaves(const WhammyBarSegment* wbar, const System* system) |
| item->mutldata()->setSymIds(SymIdList(symsCount, symId)); | ||
| item->mutldata()->moveY(0.5 * item->symHeight(symId)); | ||
| RectF bbox = item->symBbox(symId); | ||
| for (int i = 1; i < item->ldata()->symIds().size(); ++i) { |
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.
| for (int i = 1; i < item->ldata()->symIds().size(); ++i) { | |
| for (size_t i = 1; i < item->ldata()->symIds().size(); ++i) { |
|
|
||
| FlatRadioButtonGroupPropertyView { | ||
| id: holdLineStyle | ||
| visible: root.model && root.model.isHoldLine |
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 should also be disabled when the preceding bend is a dip, as the hold line will be using the vibrato symbols.
Implements guitar dive notation.
Done:
To do: