Skip to content

Commit

Permalink
Merge branch 'develop-facsimile-neume-line' into develop-facsimile-ne…
Browse files Browse the repository at this point in the history
…ume-line
  • Loading branch information
lpugin authored May 16, 2024
2 parents 2823f7b + 0d6b5e8 commit f16f670
Show file tree
Hide file tree
Showing 38 changed files with 448 additions and 657 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
compiler: g++
version: "10"

- os: ubuntu-20.04
- os: ubuntu-22.04
compiler: g++
version: "11"

Expand Down
4 changes: 2 additions & 2 deletions Verovio.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5172,7 +5172,7 @@
"$(inherited)",
NO_HUMDRUM_SUPPORT,
);
MACOSX_DEPLOYMENT_TARGET = "";
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_NAME = "$(TARGET_NAME)";
USER_HEADER_SEARCH_PATHS = "";
};
Expand All @@ -5184,7 +5184,7 @@
CODE_SIGN_IDENTITY = "-";
DEAD_CODE_STRIPPING = YES;
GCC_PREPROCESSOR_DEFINITIONS = NO_HUMDRUM_SUPPORT;
MACOSX_DEPLOYMENT_TARGET = "";
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_NAME = "$(TARGET_NAME)";
USER_HEADER_SEARCH_PATHS = "";
};
Expand Down
56 changes: 0 additions & 56 deletions include/vrv/adjustyrelfortranscriptionfunctor.h

This file was deleted.

7 changes: 0 additions & 7 deletions include/vrv/devicecontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ class DeviceContext {
m_baseWidth = 0;
m_baseHeight = 0;
m_pushBack = false;
m_viewBoxFactor = (double)DEFINITION_FACTOR;
}
DeviceContext(ClassId classId)
{
Expand All @@ -90,7 +89,6 @@ class DeviceContext {
m_baseWidth = 0;
m_baseHeight = 0;
m_pushBack = false;
m_viewBoxFactor = (double)DEFINITION_FACTOR;
}
virtual ~DeviceContext(){};
ClassId GetClassId() const { return m_classId; }
Expand Down Expand Up @@ -126,14 +124,12 @@ class DeviceContext {
m_baseWidth = width;
m_baseHeight = height;
}
void SetViewBoxFactor(double ppuFactor);
int GetWidth() const { return m_width; }
int GetHeight() const { return m_height; }
int GetContentHeight() const { return m_contentHeight; }
double GetUserScaleX() { return m_userScaleX; }
double GetUserScaleY() { return m_userScaleY; }
std::pair<int, int> GetBaseSize() const { return std::make_pair(m_baseWidth, m_baseHeight); }
double GetViewBoxFactor() const { return m_viewBoxFactor; }
///@}

/**
Expand Down Expand Up @@ -369,9 +365,6 @@ class DeviceContext {
/** stores the scale as requested by the used */
double m_userScaleX;
double m_userScaleY;

/** stores the viewbox factor taking into account the DEFINTION_FACTOR and the PPU */
double m_viewBoxFactor;
};

} // namespace vrv
Expand Down
14 changes: 0 additions & 14 deletions include/vrv/doc.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,14 +451,6 @@ class Doc : public Object {
bool IsMensuralMusicOnly() const { return m_isMensuralMusicOnly; }
///@}

/**
* @name Setter for and getter for neume-line flag
*/
///@{
void SetNeumeLines(bool isNeumeLines) { m_isNeumeLines = isNeumeLines; }
bool IsNeumeLines() const { return m_isNeumeLines; }
///@}

/**
* @name Setter and getter for facsimile
*/
Expand Down Expand Up @@ -668,12 +660,6 @@ class Doc : public Object {
*/
bool m_isMensuralMusicOnly;

/**
* A flag to indicate that the document contains neume lines.
* This is a special document type where neume lines are encoded with <section type="neon-neume-line">
*/
bool m_isNeumeLines;

/** Page width (MEI scoredef@page.width) - currently not saved */
int m_pageWidth;
/** Page height (MEI scoredef@page.height) - currently not saved */
Expand Down
25 changes: 3 additions & 22 deletions include/vrv/editortoolkit_neume.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "doc.h"
#include "editortoolkit.h"
#include "measure.h"
#include "view.h"
#include "vrv.h"
#include "zone.h"
Expand Down Expand Up @@ -51,8 +50,6 @@ class EditorToolkitNeume : public EditorToolkit {
bool Set(std::string elementId, std::string attrType, std::string attrValue);
bool SetText(std::string elementId, const std::string &text);
bool SetClef(std::string elementId, std::string shape);
bool SetLiquescent(std::string elementId, std::string shape);
bool SortStaves();
bool Split(std::string elementId, int x);
bool SplitNeume(std::string elementId, std::string ncId);
bool Remove(std::string elementId);
Expand Down Expand Up @@ -83,7 +80,6 @@ class EditorToolkitNeume : public EditorToolkit {
bool ParseSetAction(jsonxx::Object param, std::string *elementId, std::string *attrType, std::string *attrValue);
bool ParseSetTextAction(jsonxx::Object param, std::string *elementId, std::string *text);
bool ParseSetClefAction(jsonxx::Object param, std::string *elementId, std::string *shape);
bool ParseSetLiquescentAction(jsonxx::Object param, std::string *elementId, std::string *shape);
bool ParseSplitAction(jsonxx::Object param, std::string *elementId, int *x);
bool ParseSplitNeumeAction(jsonxx::Object param, std::string *elementId, std::string *ncId);
bool ParseRemoveAction(jsonxx::Object param, std::string *elementId);
Expand Down Expand Up @@ -182,26 +178,11 @@ struct ClosestNeume {
struct StaffSort {
// Sort staves left-to-right and top-to-bottom
// Sort by y if there is no intersection, by x if there is x intersection is smaller than half length of staff line

// Update 2024-04:
// Used only in neume lines,
// System->(Measure->Staff)
// Need to sort Measure to sort staff
bool operator()(Object *a, Object *b)
{
if (!a->Is(SYSTEM) || !b->Is(SYSTEM)) return false;
if (!a->FindDescendantByType(MEASURE) || !b->FindDescendantByType(MEASURE)) return false;
Measure *measureA = dynamic_cast<Measure *>(a->FindDescendantByType(MEASURE));
Measure *measureB = dynamic_cast<Measure *>(b->FindDescendantByType(MEASURE));
if (!measureA->IsNeumeLine() || !measureB->IsNeumeLine()) return true;
Object *staffA = a->FindDescendantByType(STAFF);
Object *staffB = b->FindDescendantByType(STAFF);
assert(staffA);
assert(staffB);
Zone *zoneA = staffA->GetFacsimileInterface()->GetZone();
Zone *zoneB = staffB->GetFacsimileInterface()->GetZone();
assert(zoneA);
assert(zoneB);
if (!a->GetFacsimileInterface() || !b->GetFacsimileInterface()) return true;
Zone *zoneA = a->GetFacsimileInterface()->GetZone();
Zone *zoneB = b->GetFacsimileInterface()->GetZone();

int aLowest, bLowest, aHighest, bHighest;

Expand Down
6 changes: 1 addition & 5 deletions include/vrv/facsimilefunctor.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SyncFromFacsimileFunctor : public Functor {
/*
* Abstract base implementation
*/
bool ImplementsEndInterface() const override { return true; }
bool ImplementsEndInterface() const override { return false; }

/*
* Functor interface
Expand All @@ -51,7 +51,6 @@ class SyncFromFacsimileFunctor : public Functor {
FunctorCode VisitLayerElement(LayerElement *layerElement) override;
FunctorCode VisitMeasure(Measure *measure) override;
FunctorCode VisitPage(Page *page) override;
FunctorCode VisitPageEnd(Page *page) override;
FunctorCode VisitPb(Pb *pb) override;
FunctorCode VisitSb(Sb *sb) override;
FunctorCode VisitStaff(Staff *staff) override;
Expand All @@ -72,9 +71,6 @@ class SyncFromFacsimileFunctor : public Functor {
//
Page *m_currentPage;
System *m_currentSystem;
Measure *m_currentNeumeLine;
/** map to store the zone corresponding to a staff */
std::map<Staff *, Zone *> m_staffZones;
};

//----------------------------------------------------------------------------
Expand Down
7 changes: 0 additions & 7 deletions include/vrv/facsimileinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ class FacsimileInterface : public Interface, public AttFacsimile {
Zone *GetZone() { return m_zone; }
const Zone *GetZone() const { return m_zone; }
///@}
///

/** Get the surface */
///@{
Surface *GetSurface() { return m_surface; }
const Surface *GetSurface() const { return m_surface; }
///@}

//-----------------//
// Pseudo functors //
Expand Down
1 change: 0 additions & 1 deletion include/vrv/layerelement.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ class LayerElement : public Object,
public:
/** Absolute position X. This is used for facsimile (transcription) encoding */
int m_drawingFacsX;
int m_drawingFacsY; // This is used only for accid, syl
/**
* This stores a pointer to the cross-staff (if any) and the appropriate layer
* See PrepareCrossStaffFunctor
Expand Down
14 changes: 4 additions & 10 deletions include/vrv/measure.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Measure : public Object,
* Reset method resets all attribute classes
*/
///@{
Measure(MeasureType measuredMusic = MEASURED, int logMeasureNb = -1);
Measure(bool measuredMusic = true, int logMeasureNb = -1);
virtual ~Measure();
Object *Clone() const override { return new Measure(*this); };
void Reset() override;
Expand All @@ -79,12 +79,7 @@ class Measure : public Object,
/**
* Return true if measured music (otherwise we have fake measures)
*/
bool IsMeasuredMusic() const { return (m_measureType == MEASURED); }

/**
* Return true if the measure represents a neume (section) line
*/
bool IsNeumeLine() const { return (m_measureType == NEUMELINE); }
bool IsMeasuredMusic() const { return m_measuredMusic; }

/**
* Get and set the measure index
Expand Down Expand Up @@ -409,10 +404,9 @@ class Measure : public Object,

private:
/**
* Indicate measured music (CMN), unmeasured (fake measures for mensural or neumes) or neume lines
* Neume line measure are created from <section type="neon-neume-line">
* Indicates measured music (otherwise we have fake measures)
*/
MeasureType m_measureType;
bool m_measuredMusic;

/**
* The unique measure index
Expand Down
17 changes: 0 additions & 17 deletions include/vrv/staff.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,6 @@ class Staff : public Object,
}
///@}

/**
* @name Getters and setters for the rotation.
* Used only with facsimile rendering.
*/
///@{
void SetDrawingRotation(double drawingRotation) { m_drawingRotation = drawingRotation; }
double GetDrawingRotation() const { return m_drawingRotation; }
bool HasDrawingRotation() const { return (m_drawingRotation != 0.0); }
int GetDrawingRotationOffsetFor(int x);
///@}

/**
* Delete all the legder line arrays.
*/
Expand Down Expand Up @@ -301,12 +290,6 @@ class Staff : public Object,
ArrayOfLedgerLines m_ledgerLinesAboveCue;
ArrayOfLedgerLines m_ledgerLinesBelowCue;
///@}

/**
* The drawing rotation.
* Used only with facsimile rendering
*/
double m_drawingRotation;
};

} // namespace vrv
Expand Down
1 change: 0 additions & 1 deletion include/vrv/view.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ class View {
///@{
void DrawDivLine(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure);
void DrawSyllable(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure);
void DrawLiquescent(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure);
void DrawNc(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure);
void DrawNeume(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure);
///@}
Expand Down
8 changes: 0 additions & 8 deletions include/vrv/vrvdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -661,14 +661,6 @@ enum SmuflTextFont { SMUFL_NONE = 0, SMUFL_FONT_SELECTED, SMUFL_FONT_FALLBACK };

enum GraphicID { PRIMARY = 0, SPANNING, SYMBOLREF };

//----------------------------------------------------------------------------
// Measure type
//----------------------------------------------------------------------------

enum MeasureType { MEASURED = 0, UNMEASURED, NEUMELINE };

#define NEUME_LINE_TYPE "neon-neume-line"

//----------------------------------------------------------------------------
// Legacy Wolfgang defines
//----------------------------------------------------------------------------
Expand Down
35 changes: 0 additions & 35 deletions src/adjustyrelfortranscriptionfunctor.cpp

This file was deleted.

4 changes: 0 additions & 4 deletions src/calcdotsfunctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ FunctorCode CalcDotsFunctor::VisitChord(Chord *chord)

FunctorCode CalcDotsFunctor::VisitNote(Note *note)
{
// We currently have no dots object with mensural notes
if (note->IsMensuralDur()) {
return FUNCTOR_SIBLINGS;
}
if (!note->IsVisible()) {
return FUNCTOR_SIBLINGS;
}
Expand Down
Loading

0 comments on commit f16f670

Please sign in to comment.