Skip to content
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

Integrate lates changes from DDMAL #3564

Merged
merged 113 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
faad0aa
pass neon path as command line argument
yinanazhou May 16, 2023
51fec1c
Merge branch 'develop' into develop-rism_merge
yinanazhou Jul 5, 2023
36cff54
Merge pull request #105 from rism-digital/develop-ddmal-merge
yinanazhou Jul 5, 2023
0bbfe64
pass neon path as command line argument
yinanazhou May 16, 2023
39c0099
Remove testNeon.sh from git
yinanazhou Jul 5, 2023
64f0440
Merge pull request #106 from DDMAL/develop-rism_merge
yinanazhou Jul 5, 2023
d8e0618
Merge pull request #107 from DDMAL/syllable-child-fix
yinanazhou Jul 10, 2023
118eeb6
MatchHeight editor action for bbox
yinanazhou Jul 10, 2023
9e30b54
Add overlap correction on x-axis
yinanazhou Jul 12, 2023
bd90014
Add staff rotation offset
yinanazhou Jul 13, 2023
939be30
Adjust original bbox size for ungrouping
yinanazhou Jul 13, 2023
87b2d9a
Merge pull request #108 from DDMAL/smart-bbox
yinanazhou Jul 14, 2023
467e074
Fix ungroup when syllable start with layer element
yinanazhou Jul 14, 2023
28efa4b
Clean up comments
yinanazhou Jul 14, 2023
bad01cf
Refactor ungroup bbox
yinanazhou Jul 24, 2023
5456a4c
Clean up
yinanazhou Jul 24, 2023
123ff94
Merge pull request #109 from DDMAL/ungroup-bbox
yinanazhou Jul 25, 2023
d69ae9e
Remove x-axis adjustment
yinanazhou Jul 25, 2023
928682d
Merge pull request #110 from DDMAL/smart-bbox
yinanazhou Jul 25, 2023
7c1dc57
Fix ungroup when firstIsSyl
yinanazhou Jul 27, 2023
f761cd7
Merge pull request #111 from DDMAL/ungroup-bbox
yinanazhou Jul 28, 2023
4d66a78
Remove redundant new syl for insert action
yinanazhou Jul 28, 2023
2bd455a
Merge pull request #112 from DDMAL/bbox-color
yinanazhou Jul 30, 2023
6769c82
Remove unnecessary doubleParent check
yinanazhou Jul 30, 2023
599b28a
Rename doubleParent to secondParent
yinanazhou Jul 30, 2023
cf6e7e8
Optimize parents counting
yinanazhou Jul 30, 2023
1ce2b26
Clean up
yinanazhou Jul 30, 2023
d1070c8
Remove unnecessary conversion
yinanazhou Jul 30, 2023
0e81f75
Move second level parent check
yinanazhou Jul 31, 2023
3b2c0da
Clean up
yinanazhou Jul 31, 2023
4a1e0ea
Remove unnecessary second level parent check
yinanazhou Jul 31, 2023
5f8dfc2
Simplify syl zone calculation
yinanazhou Jul 31, 2023
83a7276
Optimize reordering
yinanazhou Jul 31, 2023
ecc5cbb
Rename fullSyllable to parent
yinanazhou Jul 31, 2023
8fe8581
Refactor multiple full parents
yinanazhou Aug 1, 2023
c631643
Fix bbox calculation for empty full parent
yinanazhou Aug 1, 2023
0b6f654
Remove unnecessary checks & reordering
yinanazhou Aug 1, 2023
fabe667
Remove unused variable
yinanazhou Aug 1, 2023
926131e
Preserve ordering of multiple ligated nc in the same neume
yinanazhou Aug 2, 2023
0fa95a9
Add validity check && correction
yinanazhou Aug 3, 2023
8f93fd3
Convert m_infoObject to m_editInfo
yinanazhou Aug 14, 2023
0a1727f
Fix outer scope shadowing
yinanazhou Aug 14, 2023
ffcf151
Clean up comments
yinanazhou Aug 14, 2023
83ac0e7
Break when last element
yinanazhou Aug 14, 2023
37232c1
Reset m_editInfo for OOM error
yinanazhou Aug 15, 2023
12ea581
Refactor new bbox zone && add staff rotation offset
yinanazhou Aug 17, 2023
bef9179
Merge pull request #113 from DDMAL/group-lig-neume
yinanazhou Sep 12, 2023
4e18f35
Merge pull request #114 from DDMAL/new-bbox-width
yinanazhou Sep 12, 2023
8330f3b
Add empty syl for follows syllable if precedes becomes empty
yinanazhou Oct 27, 2023
d3d0f8f
Merge pull request #115 from DDMAL/toggle-syllable-fix
yinanazhou Oct 30, 2023
a82d751
Set column value for newly inserted staff if has columns
yinanazhou Dec 1, 2023
3e5ba64
Unlink syllable when removed
yinanazhou Dec 5, 2023
2fe5306
Merge pull request #116 from DDMAL/multicol
yinanazhou Dec 5, 2023
600b100
Merge pull request #117 from DDMAL/empty-toggled-syllable
yinanazhou Dec 5, 2023
e847556
Handle empty staff when inserting new staff
yinanazhou Dec 11, 2023
fe3a052
New <measure> for blank files in neume notation
yinanazhou Dec 12, 2023
0e4af70
Merge pull request #118 from DDMAL/blank-mei
yinanazhou Dec 13, 2023
459b293
Fix removing clef error
yinanazhou Dec 19, 2023
9970c87
Merge pull request #119 from DDMAL/clef-fix
yinanazhou Dec 20, 2023
5a5cc73
Fix staff rotation offset for inserted syllables
yinanazhou Dec 21, 2023
ca901b4
Merge pull request #120 from DDMAL/rotate-offset
yinanazhou Dec 21, 2023
bacf879
Merge pull request #121 from rism-digital/develop
yinanazhou Dec 22, 2023
78afb12
Use ExtractIDFragment function
lpugin Dec 23, 2023
d449c0a
pass neon path as command line argument
yinanazhou May 16, 2023
9f8ef22
Remove testNeon.sh from git
yinanazhou Jul 5, 2023
e6bc318
MatchHeight editor action for bbox
yinanazhou Jul 10, 2023
f41a0a0
Add overlap correction on x-axis
yinanazhou Jul 12, 2023
2305741
Add staff rotation offset
yinanazhou Jul 13, 2023
187d982
Adjust original bbox size for ungrouping
yinanazhou Jul 13, 2023
81fd49f
Fix ungroup when syllable start with layer element
yinanazhou Jul 14, 2023
dea073b
Clean up comments
yinanazhou Jul 14, 2023
89321b8
Refactor ungroup bbox
yinanazhou Jul 24, 2023
9cb464b
Clean up
yinanazhou Jul 24, 2023
b302f3e
Remove x-axis adjustment
yinanazhou Jul 25, 2023
92fe5f6
Fix ungroup when firstIsSyl
yinanazhou Jul 27, 2023
a0e3dcd
Remove redundant new syl for insert action
yinanazhou Jul 28, 2023
0b26cc7
Remove unnecessary doubleParent check
yinanazhou Jul 30, 2023
682d11d
Rename doubleParent to secondParent
yinanazhou Jul 30, 2023
6d29f65
Optimize parents counting
yinanazhou Jul 30, 2023
ee76984
Clean up
yinanazhou Jul 30, 2023
affe5b4
Remove unnecessary conversion
yinanazhou Jul 30, 2023
88a7b37
Move second level parent check
yinanazhou Jul 31, 2023
3c91687
Clean up
yinanazhou Jul 31, 2023
8cc6061
Remove unnecessary second level parent check
yinanazhou Jul 31, 2023
08c4dcf
Simplify syl zone calculation
yinanazhou Jul 31, 2023
3c90120
Optimize reordering
yinanazhou Jul 31, 2023
87bc478
Rename fullSyllable to parent
yinanazhou Jul 31, 2023
d5fc196
Refactor multiple full parents
yinanazhou Aug 1, 2023
a52ba37
Fix bbox calculation for empty full parent
yinanazhou Aug 1, 2023
f35390d
Remove unnecessary checks & reordering
yinanazhou Aug 1, 2023
11425b4
Remove unused variable
yinanazhou Aug 1, 2023
dc01be2
Preserve ordering of multiple ligated nc in the same neume
yinanazhou Aug 2, 2023
9abbe67
Add validity check && correction
yinanazhou Aug 3, 2023
51f2b10
Convert m_infoObject to m_editInfo
yinanazhou Aug 14, 2023
8e0d846
Fix outer scope shadowing
yinanazhou Aug 14, 2023
31dcb03
Clean up comments
yinanazhou Aug 14, 2023
f3a5651
Break when last element
yinanazhou Aug 14, 2023
7b96407
Reset m_editInfo for OOM error
yinanazhou Aug 15, 2023
6238cff
Refactor new bbox zone && add staff rotation offset
yinanazhou Aug 17, 2023
7be3754
Add empty syl for follows syllable if precedes becomes empty
yinanazhou Oct 27, 2023
b0916d7
Set column value for newly inserted staff if has columns
yinanazhou Dec 1, 2023
8e884fa
Unlink syllable when removed
yinanazhou Dec 5, 2023
f6a7ecf
Handle empty staff when inserting new staff
yinanazhou Dec 11, 2023
bcbde28
New <measure> for blank files in neume notation
yinanazhou Dec 12, 2023
4a1c61f
Fix removing clef error
yinanazhou Dec 19, 2023
6ed5103
Fix staff rotation offset for inserted syllables
yinanazhou Dec 21, 2023
3b005e8
Add Doc::IsFacs helper (and others) and use it
lpugin Dec 23, 2023
16ab863
Merge branch 'develop-facsimile' into develop-ddmal-merge-23-12
lpugin Dec 23, 2023
a2667ae
Use Doc::IsTranscription helper
lpugin Dec 23, 2023
6215ccd
Merge branch 'develop-facsimile' into develop-ddmal-merge-23-12
lpugin Dec 23, 2023
d89dc94
Fix missing Read/Write zone coordinated ul
lpugin Dec 23, 2023
baa503a
Merge pull request #122 from rism-digital/develop-ddmal-merge-23-12
yinanazhou Dec 27, 2023
11e013d
Merge pull request #123 from DDMAL/update-verovio
yinanazhou Dec 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/vrv/doc.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ class Doc : public Object {
///@{
DocType GetType() const { return m_type; }
void SetType(DocType type);
bool IsFacs() const { return (m_type == Facs); }
bool IsRaw() const { return (m_type == Raw); }
bool IsRendering() const { return (m_type == Rendering); }
bool IsTranscription() const { return (m_type == Transcription); }
///@}

/**
Expand Down
10 changes: 5 additions & 5 deletions include/vrv/editortoolkit_neume.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ namespace vrv {
class EditorToolkitNeume : public EditorToolkit {
public:
EditorToolkitNeume(Doc *doc, View *view) : EditorToolkit(doc, view) {}
bool ParseEditorAction(const std::string &json_editorAction);
virtual std::string EditInfo() { return m_infoObject.json(); };
bool ParseEditorAction(const std::string &json_editorAction) override;
std::string EditInfo() override;

/**
* Experimental editor functions.
Expand All @@ -44,6 +44,7 @@ class EditorToolkitNeume : public EditorToolkit {
bool Insert(std::string elementType, std::string staffId, int ulx, int uly, int lrx, int lry,
std::vector<std::pair<std::string, std::string>> attributes);
bool InsertToSyllable(std::string elementId);
bool MatchHeight(std::string elementId);
bool Merge(std::vector<std::string> elementIds);
bool MoveOutsideSyllable(std::string elementId);
bool Set(std::string elementId, std::string attrType, std::string attrValue);
Expand All @@ -54,6 +55,7 @@ class EditorToolkitNeume : public EditorToolkit {
bool Remove(std::string elementId);
bool Resize(std::string elementId, int ulx, int uly, int lrx, int lry, float resize = NAN);
bool Group(std::string groupType, std::vector<std::string> elementIds);
void UnlinkSyllable(Syllable *syllable);
bool Ungroup(std::string groupType, std::vector<std::string> elementIds);
bool ChangeGroup(std::string elementId, std::string contour);
bool ToggleLigature(std::vector<std::string> elementIds);
Expand All @@ -72,6 +74,7 @@ class EditorToolkitNeume : public EditorToolkit {
bool ParseInsertAction(jsonxx::Object param, std::string *elementType, std::string *staffId, int *ulx, int *uly,
int *lrx, int *lry, std::vector<std::pair<std::string, std::string>> *attributes);
bool ParseInsertToSyllableAction(jsonxx::Object param, std::string *elementId);
bool ParseMatchHeightAction(jsonxx::Object param, std::string *elementId);
bool ParseMergeAction(jsonxx::Object param, std::vector<std::string> *elementIds);
bool ParseMoveOutsideSyllableAction(jsonxx::Object param, std::string *elementId);
bool ParseSetAction(jsonxx::Object param, std::string *elementId, std::string *attrType, std::string *attrValue);
Expand All @@ -98,9 +101,6 @@ class EditorToolkitNeume : public EditorToolkit {
bool AdjustPitchFromPosition(Object *obj, Clef *clef = NULL);
bool AdjustClefLineFromPosition(Clef *clef, Staff *staff = NULL);
///@}

private:
jsonxx::Object m_infoObject;
};

//--------------------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions src/doc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ void Doc::PrepareData()
}

/************ Resolve @facs ************/
if (this->GetType() == Facs) {
if (this->IsFacs()) {
// Associate zones with elements
PrepareFacsimileFunctor prepareFacsimile(this->GetFacsimile());
this->Process(prepareFacsimile);
Expand Down Expand Up @@ -1281,10 +1281,10 @@ void Doc::ConvertToCastOffMensuralDoc(bool castOff)
if (!m_isMensuralMusicOnly) return;

// Do not convert transcription files
if (this->GetType() == Transcription) return;
if (this->IsTranscription()) return;

// Do not convert facs files
if (this->GetType() == Facs) return;
if (this->IsFacs()) return;

// We are converting to measure music in a definite way
if (this->GetOptions()->m_mensuralToMeasure.GetValue()) {
Expand Down Expand Up @@ -2088,7 +2088,7 @@ int Doc::GetAdjustedDrawingPageHeight() const
{
assert(m_drawingPage);

if ((this->GetType() == Transcription) || (this->GetType() == Facs)) {
if (this->IsTranscription() || this->IsFacs()) {
return m_drawingPage->m_pageHeight / DEFINITION_FACTOR;
}

Expand All @@ -2100,7 +2100,7 @@ int Doc::GetAdjustedDrawingPageWidth() const
{
assert(m_drawingPage);

if ((this->GetType() == Transcription) || (this->GetType() == Facs)) {
if (this->IsTranscription() || this->IsFacs()) {
return m_drawingPage->m_pageWidth / DEFINITION_FACTOR;
}

Expand Down
Loading