Skip to content

[Tab Layout] Allow fingering string text to affect which tablature string is attempted to apply on a linked staff/tab staff#403

Closed
worldwideweary wants to merge 2 commits into
Jojo-Schmitz:3.xfrom
worldwideweary:3.7-StringTextAffectsTablaturePosition
Closed

[Tab Layout] Allow fingering string text to affect which tablature string is attempted to apply on a linked staff/tab staff#403
worldwideweary wants to merge 2 commits into
Jojo-Schmitz:3.xfrom
worldwideweary:3.7-StringTextAffectsTablaturePosition

Conversation

@worldwideweary

@worldwideweary worldwideweary commented Apr 6, 2024

Copy link
Copy Markdown
Collaborator

Resolves: #402

So far this little change allows the string fingering text to force the string. If it doesn't, it displays a ? question mark. Hoping Scorster will test it out and give some feedback or find some undesired behavior, etc.
Seems to be okay from an initial testing stage:

StringTextTab.mp4

@worldwideweary
worldwideweary force-pushed the 3.7-StringTextAffectsTablaturePosition branch 2 times, most recently from e1d0665 to 8d1cca0 Compare April 7, 2024 04:55
@worldwideweary

Copy link
Copy Markdown
Collaborator Author

Looks like some vtests/mtests fail. Not sure how the vtests are failing/are different, but for mtests:

Errors while running CTest
	 24 - tst_layout_elements (Failed)
	 51 - tst_mxml_io (Failed)

Haven't messed with mtests/vtests for some time, but at least the build artifacts work for testing

@Jojo-Schmitz

Jojo-Schmitz commented Apr 7, 2024

Copy link
Copy Markdown
Owner

The mtests fail with a crash

51/62 Test #51: tst_mxml_io ......................***Failed   29.28 sec
ASAN:DEADLYSIGNAL
=================================================================
==14310==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x56385054626d bp 0x7fff3ad56620 sp 0x7fff3ad56610 T0)
==14310==The signal is caused by a READ memory access.
==14310==Hint: address points to the zero page.
    #0 0x56385054626c in QListData::isEmpty() const /home/runner/work/MuseScore/Qt/598/include/QtCore/qlist.h:114
    #1 0x563851105f7d in QList<Ms::ScoreElement*>::isEmpty() const /home/runner/work/MuseScore/Qt/598/include/QtCore/qlist.h:195
    #2 0x56385127deef in Ms::LinkedElements::mainElement() /home/runner/work/MuseScore/MuseScore/libmscore/scoreElement.cpp:649
    #3 0x563850d6f0a5 in Ms::Note::layout() /home/runner/work/MuseScore/MuseScore/libmscore/note.cpp:2065
    #4 0x563850a4c70d in Ms::Chord::layoutTablature() /home/runner/work/MuseScore/MuseScore/libmscore/chord.cpp:2195
    #5 0x563850a4755d in Ms::Chord::layout() /home/runner/work/MuseScore/MuseScore/libmscore/chord.cpp:1837
    #6 0x563850c77474 in layoutSegmentElements /home/runner/work/MuseScore/MuseScore/libmscore/layout.cpp:93
    #7 0x563850c77a8f in Ms::Score::layoutChords1(Ms::Segment*, int) /home/runner/work/MuseScore/MuseScore/libmscore/layout.cpp:150
    #8 0x563850c9c227 in Ms::Score::getNextMeasure(Ms::LayoutContext&) /home/runner/work/MuseScore/MuseScore/libmscore/layout.cpp:3216
    #9 0x563850cab565 in Ms::Score::collectSystem(Ms::LayoutContext&) /home/runner/work/MuseScore/MuseScore/libmscore/layout.cpp:4014
    #10 0x563850cbffe4 in Ms::Score::doLayoutRange(Ms::Fraction const&, Ms::Fraction const&) /home/runner/work/MuseScore/MuseScore/libmscore/layout.cpp:5265
    #11 0x563850cbde15 in Ms::Score::doLayout() /home/runner/work/MuseScore/MuseScore/libmscore/layout.cpp:5099
    #12 0x563850c86170 in Ms::Score::fixupLaissezVibrer() /home/runner/work/MuseScore/MuseScore/libmscore/layout.cpp:1664
    #13 0x5638508a5c9b in Ms::MusicXMLParserPass2::scorePartwise() /home/runner/work/MuseScore/MuseScore/importexport/musicxml/importmxmlpass2.cpp:2131
    #14 0x5638508a4f8d in Ms::MusicXMLParserPass2::parse() /home/runner/work/MuseScore/MuseScore/importexport/musicxml/importmxmlpass2.cpp:2035
    #15 0x5638508a4dfe in Ms::MusicXMLParserPass2::parse(QIODevice*) /home/runner/work/MuseScore/MuseScore/importexport/musicxml/importmxmlpass2.cpp:2016
    #16 0x5638508177c4 in Ms::importMusicXMLfromBuffer(Ms::Score*, QString const&, QIODevice*) /home/runner/work/MuseScore/MuseScore/importexport/musicxml/importmxml.cpp:153
    #17 0x563850638e10 in doValidateAndImport /home/runner/work/MuseScore/MuseScore/importexport/musicxml/importxml.cpp:235
    #18 0x563850639b60 in Ms::importMusicXml(Ms::MasterScore*, QString const&) /home/runner/work/MuseScore/MuseScore/importexport/musicxml/importxml.cpp:281
    #19 0x56385052f3d4 in Ms::MTest::readCreatedScore(QString const&) /home/runner/work/MuseScore/MuseScore/mtest/testutils.cpp:133
    #20 0x56385052ebea in Ms::MTest::readScore(QString const&) /home/runner/work/MuseScore/MuseScore/mtest/testutils.cpp:96
    #21 0x56385051ab35 in TestMxmlIO::mxmlImportTestRef(char const*) /home/runner/work/MuseScore/MuseScore/mtest/musicxml/io/tst_mxml_io.cpp:520
    #22 0x563850521816 in TestMxmlIO::inferredTransposition() (/home/runner/work/MuseScore/MuseScore/build.debug/mtest/musicxml/io/tst_mxml_io+0x3ff816)
    #23 0x56385051bb7a in TestMxmlIO::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/runner/work/MuseScore/MuseScore/build.debug/mtest/musicxml/io/tst_mxml_io_autogen/include/tst_mxml_io.moc:1035
    #24 0x7fd9e281b815 in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (/home/runner/work/MuseScore/Qt/598/lib/libQt5Core.so.5+0x285815)
    #25 0x7fd9e4fae073  (/home/runner/work/MuseScore/Qt/598/lib/libQt5Test.so.5+0x14073)
    #26 0x7fd9e4fae995  (/home/runner/work/MuseScore/Qt/598/lib/libQt5Test.so.5+0x14995)
    #27 0x7fd9e4faef81  (/home/runner/work/MuseScore/Qt/598/lib/libQt5Test.so.5+0x14f81)
    #28 0x7fd9e4faf458 in QTest::qExec(QObject*, int, char**) (/home/runner/work/MuseScore/Qt/598/lib/libQt5Test.so.5+0x15458)
    #29 0x56385051b2db in main /home/runner/work/MuseScore/MuseScore/mtest/musicxml/io/tst_mxml_io.cpp:528
    #30 0x7fd9e207c082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082)
    #31 0x56385050f62d in _start (/home/runner/work/MuseScore/MuseScore/build.debug/mtest/musicxml/io/tst_mxml_io+0x3ed62d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/runner/work/MuseScore/Qt/598/include/QtCore/qlist.h:114 in QListData::isEmpty() const
==14310==ABORTING

So it crashes when checking whether the QList<ScoreElement *>is empty.

Comment thread libmscore/note.cpp Outdated
Comment thread libmscore/note.cpp Outdated
…ring is attempted to apply on a linked staff/tab staff
@worldwideweary
worldwideweary force-pushed the 3.7-StringTextAffectsTablaturePosition branch from 8d1cca0 to 8646465 Compare April 7, 2024 12:02
@Jojo-Schmitz Jojo-Schmitz changed the title [Tab Layout] Allow fingering string text to affect which tablature st… [Tab Layout] Allow fingering string text to affect which tablature string is attempted to apply on a linked staff/tab staff Apr 7, 2024
Jojo-Schmitz pushed a commit that referenced this pull request Apr 7, 2024
…ffect which tablature string is attempted to apply on a linked staff/tab staff

Port of #403
Jojo-Schmitz pushed a commit that referenced this pull request Apr 7, 2024
…h tablature string is attempted to apply on a linked staff/tab staff

Port of #403
@Jojo-Schmitz

Jojo-Schmitz commented Apr 7, 2024

Copy link
Copy Markdown
Owner

See musescore#22254, I've ported it to master
The question mark stuff doesn't work though

Jojo-Schmitz pushed a commit that referenced this pull request Apr 7, 2024
…h tablature string is attempted to apply on a linked staff/tab staff

Port of #403
@worldwideweary

worldwideweary commented Apr 7, 2024

Copy link
Copy Markdown
Collaborator Author

Cool. Check comment over there.

Also, I'm not finding any internal representation for "barre lines" so I'm not sure it's feasible to get something working for those easily (MS3... not sure maybe MS4 has something)... but maybe can get something going for capo text though

@worldwideweary

worldwideweary commented Apr 8, 2024

Copy link
Copy Markdown
Collaborator Author

Ok, I'm going to add another commit on top of the first one which will also attempt to make use of Capo Texts... if the checks pass then testing on this one will be appreciated since it's slightly more complicated (but not by much.... still using the same code area). As demonstration:

capoGuitar.mp4

+ Reordered finger string handling to easily use the same code
Jojo-Schmitz pushed a commit that referenced this pull request Apr 8, 2024
…h tablature string is attempted to apply on a linked staff/tab staff

Port of #403, 1st commit
Jojo-Schmitz added a commit that referenced this pull request Apr 8, 2024
…res.

+ Reordered finger string handling to easily use the same code

Port of #403, 2nd commit
Jojo-Schmitz pushed a commit that referenced this pull request Apr 8, 2024
…res.

+ Reordered finger string handling to easily use the same code

Port of #403, 2nd commit
@Jojo-Schmitz

Copy link
Copy Markdown
Owner

Ported to master too

Jojo-Schmitz pushed a commit that referenced this pull request Apr 8, 2024
…h tablature string is attempted to apply on a linked staff/tab staff

Port of #403, 1st commit
Jojo-Schmitz pushed a commit that referenced this pull request Apr 8, 2024
…res.

+ Reordered finger string handling to easily use the same code

Port of #403, 2nd commit
Jojo-Schmitz pushed a commit that referenced this pull request Apr 8, 2024
…h tablature string is attempted to apply on a linked staff/tab staff

Port of #403, 1st commit
Jojo-Schmitz pushed a commit that referenced this pull request Apr 8, 2024
…res.

+ Reordered finger string handling to easily use the same code

Port of #403, 2nd commit
Jojo-Schmitz pushed a commit that referenced this pull request Apr 8, 2024
…ring is attempted to apply on a linked staff/tab staff

Port of [#403](#403), 1st commit
Jojo-Schmitz pushed a commit that referenced this pull request Apr 8, 2024
Jojo-Schmitz pushed a commit that referenced this pull request Apr 8, 2024
…ring is attempted to apply on a linked staff/tab staff

Port of [#403](#403), 1st commit
Jojo-Schmitz pushed a commit that referenced this pull request Apr 8, 2024
Jojo-Schmitz pushed a commit that referenced this pull request Apr 8, 2024
@Jojo-Schmitz

Jojo-Schmitz commented Sep 2, 2024

Copy link
Copy Markdown
Owner

Do you deem it ready for getting merged?

@worldwideweary

worldwideweary commented Sep 2, 2024

Copy link
Copy Markdown
Collaborator Author

Well, https://musescore.org/en/node/362557 conversation describes guitarists as using fret marker 0 and onward even with a capo ("This is indeed how capo works! All the fret numbers become relative to the capo."), which is against the functionality of this pull request, which is to limit below the capo.

For example, [put a capo on fret 5], and these forum members said most guitarists start at fret zero again. That is: "Written Fret 2" makes sense to them with a capo at fret five, so that "Written fret 0" is equivalent to "sounding fret 5" and "written fret 3" is "sounding fret 8". If that's how normal or trained guitarists work, then this pull request should be thrown out, since it disables the ability to get to physical fret 4 and below and automatically shifts to the appropriate string to disallow for example "written below fret 5" with a 5-capo.

@Jojo-Schmitz

Copy link
Copy Markdown
Owner

And that means this PR needs to get amended or that it can/should get closed?

@worldwideweary

Copy link
Copy Markdown
Collaborator Author

I guess so. I'll keep a personal copy of it cause I like the idea of limiting the string positionings. But for what it's worth it sounds like it shouldn't be standard behavior at all. If there were an option to "limit frets to capo" or something that could have a style setting stored... that'd be nice. But for now suppose we should close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set tablature string assignments via String Number objects

2 participants