Skip to content

Conversation

@mike-spa
Copy link
Contributor

@mike-spa mike-spa commented Jun 4, 2025

Tapping implementation

@mike-spa mike-spa requested review from a user and bkunda June 4, 2025 12:31
@mike-spa mike-spa force-pushed the tapping branch 3 times, most recently from 3b3f078 to 9f68000 Compare June 9, 2025 11:47
Copy link

@bkunda bkunda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the open discussion happening internally about the design, there are a couple of trivial issues that'd be good to iron out at this stage:

  1. Palette icon colours not correct in dark mode
tapping-palettes_colour.mov
  1. Half slurs not selected when added
tapping_not-selected-palette.mov

@mike-spa mike-spa force-pushed the tapping branch 4 times, most recently from 2b92bbf to a84b31f Compare June 17, 2025 11:29
@ghost ghost requested a review from miiizen June 18, 2025 10:47
ghost
ghost previously approved these changes Jun 18, 2025
@ghost ghost dismissed their stale review June 18, 2025 10:58

vtests

@mike-spa mike-spa force-pushed the tapping branch 2 times, most recently from ee2df56 to f0e727c Compare June 19, 2025 09:13
@ghost ghost added the vtests This PR produces approved changes to vtest results label Jun 19, 2025
Copy link
Contributor

@miiizen miiizen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, I've only spotted a few small changes

tappings.push_back(toTapping(a));
}
}
DO_ASSERT(tappings.size() <= 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels odd to me to enforce/check this when getting tappings - it might make more sense to do this check when adding to a chord?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you're right, but it feels even weirder to count them when inserting, cause it means adding an extra for loop that does nothing (whereas here the loop would be needed anyway to find the Tapping, so the assertion check can be done for free)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

TappingText(const TappingText& t);
TappingText* clone() const override { return new TappingText(*this); }

virtual Color curColor() const;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

override rather than virtual

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oopsie, thanks

case ElementType::GLISSANDO: return new Glissando(parent);
case ElementType::BRACKET: return new Bracket(parent);
case ElementType::ARTICULATION: return new Articulation(parent->isChordRest() ? toChordRest(parent) : dummy->chord());
case ElementType::TAPPING: return new Tapping(parent->isChordRest() ? toChordRest(parent) : dummy->chord());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're missing the following cases in this switch: HAMMER_ON_PULL_OFF_SEGMENT, HAMMER_ON_PULL_OFF_TEXT, TAPPING_HALF_SLUR, TAPPING_HALF_SLUR_SEGMENT, TAPPING_TEXT

const double slurCollisionHorizOffset = 0.2 * spatium;
const double fuzzyHorizCompare = 0.25 * spatium;
auto compare = [fuzzyHorizCompare](double x1, double x2) { return std::abs(x1 - x2) < fuzzyHorizCompare; };
for (SpannerSegment* seg1 : segments) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (SpannerSegment* seg1 : segments) {
for (SlurSegment* seg1 : segments) {

Every segment should be a slur segment here - you can remove checks & conversions below

mask.setWidth(0.5 * mask.width());
const double maskPad = 0.25 * item->spatium();
mask.adjust(-maskPad, -maskPad, 0.0, maskPad);
slurSeg->mutldata()->setMask(mask);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this!

@miiizen miiizen merged commit d3e0a74 into musescore:master Jun 20, 2025
12 of 13 checks passed
@ghost ghost added this to MuseScore Studio 4.6 Jun 20, 2025
@ghost ghost moved this to Done in MuseScore Studio 4.6 Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vtests This PR produces approved changes to vtest results

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants