From 97021a9db9c5f8455bedb6c52eb69c9f79a038cb Mon Sep 17 00:00:00 2001 From: jacques-menu Date: Mon, 4 Nov 2024 21:52:46 +0100 Subject: [PATCH] Adding chords, tuplets and staff changes begin and end detection to mxsr2msr, phase 1 --- MusicFormatsVersionDate.txt | 2 +- documentation/FOO/mfmgPartgroupshandling.tex | 2 +- include/MusicFormatsVersionDate.h | 2 +- include/mflibrary/mfTraceOah.h | 2 + .../passes/mxsr2msr/mxsr2msrSkeletonBuilder.h | 218 +++- .../mxsr2msrSkeletonBuilderInterface.h | 11 +- ...anslator.h => mxsr2msrSkeletonPopulator.h} | 19 +- .../mxsr2msrSkeletonPopulatorInterface.h | 17 +- include/representations/msr/msrVoices.h | 2 +- include/representations/mxsr/mxsrGeneration.h | 1 + .../representations/mxsr/mxsrNotesEvents.h | 269 +++++ musicxmlfiles/chords/SingleChord.xml | 4 +- .../staffchanges/NotesStaffChange.mscz | Bin 15056 -> 0 bytes .../staffchanges/NotesStaffChange.xml | 173 --- .../staffchanges/Notes_Staff_Change.mscz | Bin 4671 -> 0 bytes .../Notes_Staff_Change_From_MuseScore.xml | 199 --- .../SimpleStaffChanges_FROM_MuseScore.xml | 175 --- musicxmlfiles/tuplets/SingleChordInTuplet.xml | 220 ++++ src/MusicFormatsVersionDate.h | 2 +- .../msdlconverter/msdlConverterInterface.cpp | 9 +- .../msr2braille/msr2brailleInterface.cpp | 2 +- .../msr2musicxml/msr2musicxmlInterface.cpp | 2 +- .../musicxml2brailleInterface.cpp | 10 +- .../musicxml2guidoInterface.cpp | 10 +- .../musicxml2lilypondInterface.cpp | 10 +- .../musicxml2musicxmlInterface.cpp | 6 +- src/mflibrary/mfIndentedTextOutput.cpp | 2 +- src/mflibrary/mfTraceOah.cpp | 48 +- src/mflibrary/mfTraceOah.h | 2 + .../lpsr2lilypond/lpsr2lilypondTranslator.cpp | 4 +- src/passes/msr2msr/msr2msrInterface.cpp | 2 +- .../mxsr2msr/mxsr2msrSkeletonBuilder.cpp | 1075 ++++++++++++++++- src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h | 218 +++- .../mxsr2msrSkeletonBuilderInterface.cpp | 14 +- .../mxsr2msrSkeletonBuilderInterface.h | 11 +- ...ator.cpp => mxsr2msrSkeletonPopulator.cpp} | 1044 ++++++++-------- ...anslator.h => mxsr2msrSkeletonPopulator.h} | 19 +- ...=> mxsr2msrSkeletonPopulatorInterface.cpp} | 24 +- .../mxsr2msrSkeletonPopulatorInterface.h | 17 +- src/representations/msr/msrChords.cpp | 6 +- src/representations/msr/msrTuplets.cpp | 7 +- src/representations/msr/msrVoices.h | 2 +- src/representations/mxsr/mxsrGeneration.h | 1 + src/representations/mxsr/mxsrNotesEvents.cpp | 800 ++++++++++++ src/representations/mxsr/mxsrNotesEvents.h | 269 +++++ 45 files changed, 3703 insertions(+), 1229 deletions(-) rename include/passes/mxsr2msr/{mxsr2msrTranslator.h => mxsr2msrSkeletonPopulator.h} (99%) rename src/passes/mxsr2msr/mxsr2msrTranslatorInterface.h => include/passes/mxsr2msr/mxsr2msrSkeletonPopulatorInterface.h (57%) create mode 100644 include/representations/mxsr/mxsrNotesEvents.h delete mode 100644 musicxmlfiles/staffchanges/NotesStaffChange.mscz delete mode 100644 musicxmlfiles/staffchanges/NotesStaffChange.xml delete mode 100644 musicxmlfiles/staffchanges/Notes_Staff_Change.mscz delete mode 100644 musicxmlfiles/staffchanges/Notes_Staff_Change_From_MuseScore.xml delete mode 100644 musicxmlfiles/staffchanges/SimpleStaffChanges_FROM_MuseScore.xml create mode 100644 musicxmlfiles/tuplets/SingleChordInTuplet.xml rename src/passes/mxsr2msr/{mxsr2msrTranslator.cpp => mxsr2msrSkeletonPopulator.cpp} (95%) rename src/passes/mxsr2msr/{mxsr2msrTranslator.h => mxsr2msrSkeletonPopulator.h} (99%) rename src/passes/mxsr2msr/{mxsr2msrTranslatorInterface.cpp => mxsr2msrSkeletonPopulatorInterface.cpp} (91%) rename include/passes/mxsr2msr/mxsr2msrTranslatorInterface.h => src/passes/mxsr2msr/mxsr2msrSkeletonPopulatorInterface.h (57%) create mode 100644 src/representations/mxsr/mxsrNotesEvents.cpp create mode 100644 src/representations/mxsr/mxsrNotesEvents.h diff --git a/MusicFormatsVersionDate.txt b/MusicFormatsVersionDate.txt index f312e583d..b78df9952 100644 --- a/MusicFormatsVersionDate.txt +++ b/MusicFormatsVersionDate.txt @@ -1 +1 @@ -October 22, 2024 +November 4, 2024 diff --git a/documentation/FOO/mfmgPartgroupshandling.tex b/documentation/FOO/mfmgPartgroupshandling.tex index 1c506742e..6a5e27afb 100644 --- a/documentation/FOO/mfmgPartgroupshandling.tex +++ b/documentation/FOO/mfmgPartgroupshandling.tex @@ -19,7 +19,7 @@ \chapter{Part groups handling}\label{Part groups handling} In \mxml, part groups can overlap, even though no one seems ever to have needed that. That seems to be more a feature in the Finale handling of \mxml export that a true musical need. -\msrRepr\ does not support overlapping part group. Handling part groups is done in \mxsrToMsrBoth{mxsr2msrTranslator.h}, where overlapping groups are identified and rejected: +\msrRepr\ does not support overlapping part group. Handling part groups is done in \mxsrToMsrBoth{mxsr2msrSkeletonPopulator.h}, where overlapping groups are identified and rejected: \begin{lstlisting}[language=Terminal] jacquesmenu@macmini > xml2ly partgroups/OverlappingPartGroups.xml ### MusicXML ERROR ### partgroups/OverlappingPartGroups.xml:169: diff --git a/include/MusicFormatsVersionDate.h b/include/MusicFormatsVersionDate.h index a896d07b1..948685e8d 100644 --- a/include/MusicFormatsVersionDate.h +++ b/include/MusicFormatsVersionDate.h @@ -1 +1 @@ -#define MUSICFORMATS_VERSION_DATE "October 22, 2024" +#define MUSICFORMATS_VERSION_DATE "November 4, 2024" diff --git a/include/mflibrary/mfTraceOah.h b/include/mflibrary/mfTraceOah.h index 5d15e362d..53e9f6dd6 100644 --- a/include/mflibrary/mfTraceOah.h +++ b/include/mflibrary/mfTraceOah.h @@ -920,12 +920,14 @@ class EXP traceOahGroup : public oahGroup // staff changes // -------------------------------------- + Bool fTraceStaffChangesBasics; Bool fTraceStaffChanges; // voices // -------------------------------------- + Bool fTraceVoiceBasics; Bool fTraceVoices; Bool fTraceVoicesDetails; diff --git a/include/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h b/include/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h index 296708b8b..77f610ee7 100644 --- a/include/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h +++ b/include/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h @@ -14,8 +14,10 @@ #include "typedefs.h" +#include "mxsrNotesEvents.h" #include "msrPartGroups.h" #include "msrPrintObjects.h" +#include "msrTupletsEnumTypes.h" namespace MusicFormats @@ -319,6 +321,139 @@ typedef SMARTP S_mxsrPartGroupsStack; EXP std::ostream& operator << (std::ostream& os, const mxsrPartGroupsStack& elt); EXP std::ostream& operator << (std::ostream& os, const S_mxsrPartGroupsStack& elt); +//________________________________________________________________________ +// class mxsr2msrVoiceHandler : public smartable +// { +// /* +// positions represent the order in which the parts appear in , +// starting at 0 since std::vectors are used +// */ +// +// public: +// +// // creation +// // ------------------------------------------------------ +// +// static SMARTP create ( +// const S_msrVoice& voice); +// +// protected: +// +// // constructors/destructor +// // ------------------------------------------------------ +// +// mxsr2msrVoiceHandler ( +// const S_msrVoice& fMsrVoice); +// +// virtual ~mxsr2msrVoiceHandler (); +// +// public: +// +// // set and get +// // ------------------------------------------------------ +// +// S_msrVoice getMsrVoice () const +// { return fMsrVoice; } +// +// const std::list& +// getTupletsStack () const +// { return fTupletsStack; } +// +// const std::size_t getTupletsStackSize () const +// { return fTupletsStack.size (); } +// +// const S_msrTuplet getTupletsStackTop () const +// { return fTupletsStack.front (); } +// +// void setLastMetNoteInVoice (S_msrNote note) +// { fLastMetNoteInVoice = note; } +// +// S_msrNote getLastMetNoteInVoice () const +// { return fLastMetNoteInVoice; } +// +// public: +// +// // public services +// // ------------------------------------------------------ +// +// void pushTupletOntoTupletsStack (const S_msrTuplet& tuplet) +// { fTupletsStack.push_front (tuplet); } +// +// // void handleTupletStartByHandler ( +// // const S_msrTuplet& tuplet, +// // const S_msrVoice& currentNoteVoice); +// // +// // void handleTupletContinueByHandler ( +// // const S_msrNote& note, +// // const S_msrVoice& currentNoteVoice); +// // +// // void handleTupletStopByHandler ( +// // const S_msrNote& note, +// // const S_msrVoice& currentNoteVoice); +// +// void finalizeTupletStackTopAndPopItFromTupletsStack ( +// int inputLineNumber, +// std::string context); +// +// public: +// +// // print +// // ------------------------------------------------------ +// +// std::string asString () const; +// +// virtual void print (std::ostream& os) const; +// +// private: +// +// // private fields +// // ------------------------------------------------------ +// +// +// S_msrVoice fMsrVoice; +// +// S_msrNote fLastMetNoteInVoice; +// +// std::list +// fTupletsStack; +// +// S_msrNote fCurrentOuterMostTupletFirstNote; +// S_msrTuplet fCurrentOuterMostTuplet; +// +// msrWholeNotes fCurrentOuterMostTupletRelativeOffset; +// +// private: +// +// // private work fields +// // ------------------------------------------------------ +// +// // we use a pair containing the staff and voice numbers: JMI v0.9.70 +// // std::map +// // std::map, S_msrTuplet> +// // fLastHandledTupletInVoiceMap; +// +// // // the tuplets stops are not always in first-in/first-out order, so: +// // std::set fExpectedTupletsStopNumbersSet; +// +// private: +// +// // private methods +// // ------------------------------------------------------ +// +// void displayTupletsStack ( +// const std::string& context); +// +// void handleTupletsPendingOnTupletsStack ( +// int inputLineNumber); +// +// void displayLastHandledTupletInVoiceMap ( +// const std::string& header); +// }; +// typedef SMARTP S_mxsr2msrVoiceHandler; +// +// EXP std::ostream& operator << (std::ostream& os, const mxsr2msrVoiceHandler& elt); +// EXP std::ostream& operator << (std::ostream& os, const S_mxsr2msrVoiceHandler& elt); + //________________________________________________________________________ class EXP mxsr2msrSkeletonBuilder : @@ -425,6 +560,16 @@ class EXP mxsr2msrSkeletonBuilder : public visitor, + // chords + // ------------------------------------------------------ + + public visitor, + + // tuplets + // ------------------------------------------------------ + + public visitor, + // lyrics // ------------------------------------------------------ @@ -446,7 +591,9 @@ class EXP mxsr2msrSkeletonBuilder : // constructors/destructor // ------------------------------------------------------ - mxsr2msrSkeletonBuilder (); + mxsr2msrSkeletonBuilder ( + mxsrScoreNotesEvents& + theResultingScoreNotesEvents); virtual ~mxsr2msrSkeletonBuilder (); @@ -592,6 +739,19 @@ class EXP mxsr2msrSkeletonBuilder : virtual void visitStart (S_note& elt); virtual void visitEnd (S_note& elt); + // chords + // ------------------------------------------------------ + + virtual void visitStart (S_chord& elt); + virtual void visitEnd (S_chord& elt); + + // tuplets + // ------------------------------------------------------ + + virtual void visitStart (S_tuplet& elt); + + virtual void visitStart (S_time_modification& elt); + // lyrics // ------------------------------------------------------ @@ -618,6 +778,12 @@ class EXP mxsr2msrSkeletonBuilder : S_msrScore fMsrScore; + // the score notes events we shall collect for mxsr2msrSkeletonPopulator + // ------------------------------------------------------ + + mxsrScoreNotesEvents& fResultingScoreNotesEvents; + + // credits handling // ------------------------------------------------------ @@ -769,8 +935,6 @@ class EXP mxsr2msrSkeletonBuilder : // staff handling // ------------------------------------------------------ - int fCurrentStaffMusicXMLNumber; // used throughout - S_msrStaff createStaffInCurrentPartIfNotYetDone ( int inputLineNumber, int staffNumber); @@ -807,10 +971,58 @@ class EXP mxsr2msrSkeletonBuilder : Bool fOnGoingPrint; + // notes handling // ------------------------------------------------------ + int fCurrentNoteSequentialNumber; + + int fCurrentNoteStartInputLine; + int fCurrentNoteEndInputLine; + + int fPreviousNoteStartInputLine; + int fPreviousNoteEndInputLine; + + int fCurrentNoteStaffNumber; // used throughout + int fPreviousNoteStaffNumber; + + int fCurrentNoteVoiceNumber; // used throughout + int fPreviousNoteVoiceNumber; + +/* +/Users/jacquesmenu/musicformats-git-dev/src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h:989:31: warning: private field 'fCurrentNoteVoiceNumber' is not used [-Wunused-private-field] + 989 | int fCurrentNoteVoiceNumber; // used throughout + | ^ +/Users/jacquesmenu/musicformats-git-dev/src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h:990:31: warning: private field 'fPreviousNoteVoiceNumber' is not used [-Wunused-private-field] + 990 | int fPreviousNoteVoiceNumber; + | ^ +*/ + Bool fOnGoingNote; + // chords handling + // ------------------------------------------------------ + + Bool fCurrentNoteBelongsToAChord; + Bool fPreviousNoteBelongsToAChord; + +// Bool fOnGoingChord; // JMI v0.9.71 + + // tuplets handling + // ------------------------------------------------------ + + // nested tuplets are numbered 1, 2, ... + int fCurrentTupletNumber; + int fPreviousTupletNumber; + + msrTupletTypeKind fCurrentTupletTypeKind; + + Bool fCurrentNoteBelongsToATuplet; + + // a tuplet stop may occur in a chord before the latter's last note, hence: + Bool fThereIsAPendingTupletStop; // CHORD_TUP + +// Bool fOnGoingTuplet; // JMI v0.9.71 + // lyrics handling // ------------------------------------------------------ diff --git a/include/passes/mxsr2msr/mxsr2msrSkeletonBuilderInterface.h b/include/passes/mxsr2msr/mxsr2msrSkeletonBuilderInterface.h index 02e89a52a..89bfcb0a8 100644 --- a/include/passes/mxsr2msr/mxsr2msrSkeletonBuilderInterface.h +++ b/include/passes/mxsr2msr/mxsr2msrSkeletonBuilderInterface.h @@ -12,16 +12,19 @@ #ifndef ___mxsr2msrSkeletonBuilderInterface___ #define ___mxsr2msrSkeletonBuilderInterface___ +#include "mxsr2msrSkeletonBuilder.h" + namespace MusicFormats { //_______________________________________________________________________________ EXP S_msrScore translateMxsrToMsrSkeleton ( - const Sxmlelement& theMxsr, - const S_msrOahGroup& msrOpts, - mfPassIDKind passIDKind, - const std::string& passDescription); + const Sxmlelement& theMxsr, + mxsrScoreNotesEvents& theResultingScoreNotesEvents, + const S_msrOahGroup& msrOpts, + mfPassIDKind passIDKind, + const std::string& passDescription); //_______________________________________________________________________________ // EXP void displayMsrScoreSkeleton ( // UNUSED JMI v0.9.66 diff --git a/include/passes/mxsr2msr/mxsr2msrTranslator.h b/include/passes/mxsr2msr/mxsr2msrSkeletonPopulator.h similarity index 99% rename from include/passes/mxsr2msr/mxsr2msrTranslator.h rename to include/passes/mxsr2msr/mxsr2msrSkeletonPopulator.h index 2ee23830c..f1061789b 100644 --- a/include/passes/mxsr2msr/mxsr2msrTranslator.h +++ b/include/passes/mxsr2msr/mxsr2msrSkeletonPopulator.h @@ -24,6 +24,7 @@ #include "msrDivisions.h" #include "msrDoubleTremolos.h" #include "msrGlissandos.h" +#include "mxsrNotesEvents.h" #include "msrRehearsalMarks.h" #include "msrSlides.h" #include "msrTablatures.h" @@ -170,7 +171,7 @@ EXP std::ostream& operator << (std::ostream& os, const mxsr2msrVoiceHandler& elt EXP std::ostream& operator << (std::ostream& os, const S_mxsr2msrVoiceHandler& elt); //________________________________________________________________________ -class EXP mxsr2msrTranslator : +class EXP mxsr2msrSkeletonPopulator : // MXSR score partwise // ------------------------------------------------------ @@ -680,10 +681,12 @@ class EXP mxsr2msrTranslator : // constructors/destructor // ------------------------------------------------------ - mxsr2msrTranslator ( - const S_msrScore& scoreSkeleton); + mxsr2msrSkeletonPopulator ( + const S_msrScore& scoreSkeleton, + mxsrScoreNotesEvents& + theKnownScoreNotesEvents); - virtual ~mxsr2msrTranslator (); + virtual ~mxsr2msrSkeletonPopulator (); // set and get // ------------------------------------------------------ @@ -1260,6 +1263,12 @@ class EXP mxsr2msrTranslator : S_msrScore fMsrScore; + // the score notes events we know from mxsr2msrSkeletonBuilder + // ------------------------------------------------------ + + mxsrScoreNotesEvents& fKnownScoreNotesEvents; + + // part handling // ------------------------------------------------------ @@ -2528,7 +2537,7 @@ class EXP mxsr2msrTranslator : Bool fCurrentNoteBelongsToATuplet; // a tuplet stop may occur in a chord before the latter's last note, hence: - Bool fThereIsAPendingTupletStop; + Bool fThereIsAPendingTupletStop; // CHORD_TUP S_msrNote fNoteWithThePendingTupletStop; S_msrVoice fVoiceOfTheNoteWithThePendingTupletStop; diff --git a/src/passes/mxsr2msr/mxsr2msrTranslatorInterface.h b/include/passes/mxsr2msr/mxsr2msrSkeletonPopulatorInterface.h similarity index 57% rename from src/passes/mxsr2msr/mxsr2msrTranslatorInterface.h rename to include/passes/mxsr2msr/mxsr2msrSkeletonPopulatorInterface.h index f993d0c1c..32bc4a11c 100644 --- a/src/passes/mxsr2msr/mxsr2msrTranslatorInterface.h +++ b/include/passes/mxsr2msr/mxsr2msrSkeletonPopulatorInterface.h @@ -9,13 +9,15 @@ https://github.com/jacques-menu/musicformats */ -#ifndef ___mxsr2msrTranslatorInterface___ -#define ___mxsr2msrTranslatorInterface___ +#ifndef ___mxsr2msrSkeletonPopulatorInterface___ +#define ___mxsr2msrSkeletonPopulatorInterface___ #include #include "exports.h" +#include "mxsr2msrSkeletonPopulator.h" + #include "msrOah.h" @@ -24,13 +26,14 @@ namespace MusicFormats //______________________________________________________________________________ EXP void populateMsrSkeletonFromMxsr ( - const Sxmlelement& theMxsr, - S_msrScore scoreSkeletonToBePopulated, - mfPassIDKind passIDKind, - const std::string& passDescription); + const Sxmlelement& theMxsr, + S_msrScore scoreSkeletonToBePopulated, + mxsrScoreNotesEvents& theKnownScoreNotesEvents, + mfPassIDKind passIDKind, + const std::string& passDescription); } -#endif // ___mxsr2msrTranslatorInterface___ +#endif // ___mxsr2msrSkeletonPopulatorInterface___ diff --git a/include/representations/msr/msrVoices.h b/include/representations/msr/msrVoices.h index 13d480fe3..a43d0d24b 100644 --- a/include/representations/msr/msrVoices.h +++ b/include/representations/msr/msrVoices.h @@ -1133,7 +1133,7 @@ class EXP msrVoice : public msrElement // the handling of tuplets in mxsr2msrTranslator.cpp // need to store the yet incomplete tuplets // due to the order in which their elements are present in the MusicXML data, - // see mxsr2msrTranslator.h + // see mxsr2msrSkeletonPopulator.h int fRegularVoiceOrdinalNumberInPart; // there can only be 4 regular voices in a staff diff --git a/include/representations/mxsr/mxsrGeneration.h b/include/representations/mxsr/mxsrGeneration.h index 2078c35ef..e8863ccba 100644 --- a/include/representations/mxsr/mxsrGeneration.h +++ b/include/representations/mxsr/mxsrGeneration.h @@ -51,6 +51,7 @@ EXP SXMLFile createSxmlFile (); //------------------------------------------------------------------------ Sxmlelement createMxmlScorePartWiseElement (); + } diff --git a/include/representations/mxsr/mxsrNotesEvents.h b/include/representations/mxsr/mxsrNotesEvents.h new file mode 100644 index 000000000..368ed0c3d --- /dev/null +++ b/include/representations/mxsr/mxsrNotesEvents.h @@ -0,0 +1,269 @@ +/* + MusicFormats Library + Copyright (C) Jacques Menu 2016-2024 + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, you can obtain one at http://mozilla.org/MPL/2.0/. + + https://github.com/jacques-menu/musicformats +*/ + +#ifndef ___mxsrNotesEvents___ +#define ___mxsrNotesEvents___ + +#include +#include +#include +#include + +#include "smartpointer.h" + +#include "mfBool.h" +#include "mfIndentedTextOutput.h" + + +using namespace MusicXML2; + +namespace MusicFormats +{ + +//______________________________________________________________________________ +// data types + +// avoid start and stop, to avoid confusion with MusicXML concepts +// the airplane analogy is to avoid confusion with a sequence of notes +// displayed on another staff + +enum class mxsrNoteEventKind { + kNoteEventChordBegin, kNoteEventChordEnd, + kNoteEventTupletBegin, kNoteEventTupletEnd, + kNoteEventStaffChangeTakeOff, kNoteEventStaffChangeLanding +}; + +std::string mxsrNoteEventKindAsString ( + mxsrNoteEventKind noteEventKind); + +std::ostream& operator << (std::ostream& os, const mxsrNoteEventKind& elt); + +//------------------------------------------------------------------------ +class EXP mxsrNoteEvent : public smartable +{ + + public: + + // creation from MusicXML + // ------------------------------------------------------ + + static SMARTP create ( + mxsrNoteEventKind noteEventKind, + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + public: + + // constructors/destructor + // ------------------------------------------------------ + + mxsrNoteEvent ( + mxsrNoteEventKind noteEventKind, + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + virtual ~mxsrNoteEvent (); + + public: + + // set and get + // ------------------------------------------------------ + + int getNoteSequentialNumber () const + { return fNoteSequentialNumber; } + + int getNoteInputStartLineNumber () const + { return fNoteInputStartLineNumber; } + + int getNoteInputEndLineNumber () const + { return fNoteInputEndLineNumber; } + + public: + + // public services + // ------------------------------------------------------ + + + private: + + // private services + // ------------------------------------------------------ + + + public: + + // print + // ------------------------------------------------------ + + std::string asString () const; + std::string asShortString () const; + + void print (std::ostream& os) const; + + private: + + // private fields + // ------------------------------------------------------ + + mxsrNoteEventKind fNoteEventKind; + + // the input line numbers alone cannot be used as unique identifier, + // since the end of lines are not mandatory in MusicXML date, hence: + int fNoteSequentialNumber; + + int fNoteInputStartLineNumber; + int fNoteInputEndLineNumber; +}; +typedef SMARTP S_mxsrNoteEvent; +EXP std::ostream& operator << (std::ostream& os, const S_mxsrNoteEvent& elt); +EXP std::ostream& operator << (std::ostream& os, const mxsrNoteEvent& elt); + +//________________________________________________________________________ +bool compareFrameNotesByIncreasingSequentialNumber ( + S_mxsrNoteEvent& first, + S_mxsrNoteEvent& second); + +//------------------------------------------------------------------------ +class EXP mxsrScoreNotesEvents : public smartable +{ + + public: + + // creation from MusicXML + // ------------------------------------------------------ + + static SMARTP create (); + + public: + + // constructors/destructor + // ------------------------------------------------------ + + mxsrScoreNotesEvents (); + + virtual ~mxsrScoreNotesEvents (); + + public: + + // set and get + // ------------------------------------------------------ + +// int getNoteSequentialNumber () const +// { return fNoteSequentialNumber; } +// +// int getNoteInputStartLineNumber () const +// { return fNoteInputStartLineNumber; } +// +// int getNoteInputEndLineNumber () const +// { return fNoteInputEndLineNumber; } + + public: + + // public services + // ------------------------------------------------------ + + void registerChordBeginEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + void registerChordEndEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + void registerTupletBeginEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + void registerTupletEndEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + void registerStaffChangeTakeOffEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + void registerStaffChangeLandingEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + void sortAllNotesEventsList (); + + Bool aChordBeginsAtNoteSequentialNumber ( + int noteSequentialNumber) const; + Bool aChordEndsAtNoteSequentialNumber ( + int noteSequentialNumber) const; + + Bool aTupletBeginsAtNoteSequentialNumber ( + int noteSequentialNumber) const; + Bool aTupletEndsAtNoteSequentialNumber ( + int noteSequentialNumber) const; + + Bool aStaffChangeTakesOffAtNoteSequentialNumber ( + int noteSequentialNumber) const; + Bool aTStaffChangeLandsAtNoteSequentialNumber ( + int noteSequentialNumber) const; + + private: + + // private services + // ------------------------------------------------------ + + public: + + // print + // ------------------------------------------------------ + + std::string asString () const; + std::string asShortString () const; + + void print (std::ostream& os) const; + + private: + + // private fields + // ------------------------------------------------------ + + // per-event type maps + std::map + fChordsBeginNotesEventsMap; + std::map + fChordsEndNotesEventsMap; + + std::map + fTupletsBeginNotesEventsMap; + std::map + fTupletsEndNotesEventsMap; + + std::map + fStaffChangesTakesOffsPositionsMap; + std::map + fStaffChangesLandingsPositionsMap; + + // all events list + std::list + fAllNotesEventsList; +}; +typedef SMARTP S_mxsrScoreNotesEvents; +EXP std::ostream& operator << (std::ostream& os, const S_mxsrScoreNotesEvents& elt); +EXP std::ostream& operator << (std::ostream& os, const mxsrScoreNotesEvents& elt); + +} + + +#endif // ___mxsrNotesEvents___ diff --git a/musicxmlfiles/chords/SingleChord.xml b/musicxmlfiles/chords/SingleChord.xml index 480457b3c..1eb457741 100644 --- a/musicxmlfiles/chords/SingleChord.xml +++ b/musicxmlfiles/chords/SingleChord.xml @@ -60,7 +60,7 @@ 1 eighth - + diff --git a/musicxmlfiles/staffchanges/NotesStaffChange.mscz b/musicxmlfiles/staffchanges/NotesStaffChange.mscz deleted file mode 100644 index 6a9bf795a3cf56df50bb239daa1d03868d4ead71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15056 zcmZ{L1yE#5lP+$9ySp^*?hFi0<2Jav3^us?;O_43?l8E!ySqC)?ry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RB0|DoTq14R(9g7&xA{@AfM zJ__1Ei)tA4dOFsIHBLba3_z)JbaG}XL}KZF={^|9f66BQ;2_HRlBw`DfS6x*Sutf{ zdP%t-jE1&0j{4>{#=jVTTU&WX*C6@{A&a_q?)>7<&KLj<3@wOIPrFs$8mp0Bg1o*= z=!HQ0&KcLPHkNE~;g_nX2TVTpteu6MQrNEe`Yd%m1sr!fE5GSa_A{5$dc9}%sz|92YrZz=!wtpAac#qq!S*}wV!Z8-nK55o1o mn9;x4|7{!p!>;wk{=Zv_yfh@#KRBqbZ|IjzF?0X(>;D0wwpQ!_ diff --git a/musicxmlfiles/staffchanges/NotesStaffChange.xml b/musicxmlfiles/staffchanges/NotesStaffChange.xml deleted file mode 100644 index 12c0c2b6b..000000000 --- a/musicxmlfiles/staffchanges/NotesStaffChange.xml +++ /dev/null @@ -1,173 +0,0 @@ - - - - Notes Staff Change - - - MuseScore 4.0.2 - 2023-04-02 - - - - - - - - - - MusicXML Part - - - - - - 1 - 1 - 78.7402 - 0 - - - - - - - 2 - - 0 - - - 2 - - G - 2 - - - F - 4 - - - - - A - 3 - - 1 - 1 - eighth - up - 2 - begin - - - - E - 4 - - 1 - 1 - eighth - down - 1 - continue - - - - G - 3 - - 1 - 1 - eighth - up - 2 - continue - - - - B - 4 - - 1 - 1 - eighth - down - 1 - end - - - 4 - - - - 4 - 5 - 2 - - - - - - C - 5 - - 1 - 1 - eighth - down - 1 - begin - - - - D - 5 - - 1 - 1 - eighth - down - 1 - continue - - - - F - 3 - - 1 - 1 - eighth - up - 2 - continue - - - - D - 4 - - 1 - 1 - eighth - up - 2 - end - - - 4 - - - - 4 - 5 - 2 - - - light-heavy - - - - diff --git a/musicxmlfiles/staffchanges/Notes_Staff_Change.mscz b/musicxmlfiles/staffchanges/Notes_Staff_Change.mscz deleted file mode 100644 index 07484b2e704b6525e634f0375eea33c1eac677d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4671 zcmZ`-bx;&;w_ZS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&dV&xPpt**UeQ-v1J*4EK7rN<%XLn2RX?olelNc-XDG{cG z1iu!pNX|z(6afDZ<%msULgM)DT7tNESMKy%JPJ!HU3enBxj8SN@Z`dKcp>Phqo5(c z&d&4}fg9R}+D=;w&(wAWIuNz?{=I~Me(g~MCuVzlCHNL4=woecY*gWzb(6KP0~)f* zTX1ly43tzE5~shbmu1dAbgwzEOMrSW2N@{0Xrb6at4SnmGbX=#3Q)eXv@|pW>W>;P zF53;^@_AX=Sy^GJ=f=M+UptGmQ&5c#-$-}wWlu;KKA1Sb(Q6+k8n{nYAV)~@yvn?a z+m#OeG2~yf0s|9(^`E_!zxv?6Ur6Y`%Kz`Q{1fA!mdF1f001GO6@T0RV1WD+nGOV82wv~N&hwd7yhWrfdBvi diff --git a/musicxmlfiles/staffchanges/Notes_Staff_Change_From_MuseScore.xml b/musicxmlfiles/staffchanges/Notes_Staff_Change_From_MuseScore.xml deleted file mode 100644 index 497b9b9dd..000000000 --- a/musicxmlfiles/staffchanges/Notes_Staff_Change_From_MuseScore.xml +++ /dev/null @@ -1,199 +0,0 @@ - - - - Notes Staff Change - - - MuseScore 3.6.2 - 2023-03-20 - - - - - - - - - - 6.99911 - 40 - - - 1697.36 - 1200.15 - - 85.7252 - 85.7252 - 85.7252 - 85.7252 - - - 85.7252 - 85.7252 - 85.7252 - 85.7252 - - - - - - - title - Notes Staff Change - - - - MusicXML Part - - - - - - 1 - 1 - 78.7402 - 0 - - - - - - - - - 64.90 - 0.00 - - 170.00 - - - 65.00 - - - - 2 - - 0 - - - 2 - - G - 2 - - - F - 4 - - - - - A - 3 - - 1 - 1 - eighth - up - 2 - begin - - - - E - 4 - - 1 - 1 - eighth - down - 1 - continue - - - - G - 3 - - 1 - 1 - eighth - up - 2 - continue - - - - F - 4 - - 1 - 1 - eighth - down - 1 - end - - - - C - 5 - - 1 - 1 - eighth - down - 1 - begin - - - - B - 4 - - 1 - 1 - eighth - down - 1 - continue - - - - F - 3 - - 1 - 1 - eighth - up - 2 - continue - - - - D - 4 - - 1 - 1 - eighth - up - 2 - end - - - 8 - - - - 8 - 5 - 2 - - - - diff --git a/musicxmlfiles/staffchanges/SimpleStaffChanges_FROM_MuseScore.xml b/musicxmlfiles/staffchanges/SimpleStaffChanges_FROM_MuseScore.xml deleted file mode 100644 index 7fac2476e..000000000 --- a/musicxmlfiles/staffchanges/SimpleStaffChanges_FROM_MuseScore.xml +++ /dev/null @@ -1,175 +0,0 @@ - - - - - Simple Staff Changes - - - - MuseScore 4.0.2 - 2023-04-09 - - - - - - - - - - MusicXML Part - - - - - - 1 - 1 - 78.7402 - 0 - - - - - - - 2 - - 0 - - - 2 - - G - 2 - - - F - 4 - - - - - A - 3 - - 1 - 1 - eighth - up - 2 - begin - - - - E - 4 - - 1 - 1 - eighth - down - 1 - continue - - - - F - 3 - - 1 - 1 - eighth - up - 2 - continue - - - - G - 4 - - 1 - 1 - eighth - down - 1 - end - - - 4 - - - - 4 - 5 - 2 - - - - - - C - 5 - - 1 - 1 - eighth - down - 1 - begin - - - - E - 4 - - 1 - 1 - eighth - down - 1 - continue - - - - A - 3 - - 1 - 1 - eighth - up - 2 - continue - - - - B - 3 - - 1 - 1 - eighth - up - 2 - end - - - 4 - - - - 4 - 5 - 2 - - - light-heavy - - - - diff --git a/musicxmlfiles/tuplets/SingleChordInTuplet.xml b/musicxmlfiles/tuplets/SingleChordInTuplet.xml new file mode 100644 index 000000000..fd35e0dcc --- /dev/null +++ b/musicxmlfiles/tuplets/SingleChordInTuplet.xml @@ -0,0 +1,220 @@ + + + + Single Chords Tuplet + + + MuseScore 4.4.3 + 2024-11-01 + + + + + + + + + + 7.05556 + 40 + + + 1683.78 + 1190.55 + + 56.6929 + 56.6929 + 56.6929 + 113.386 + + + 56.6929 + 56.6929 + 56.6929 + 113.386 + + + + 1.8 + 5.5 + 5 + 4.5 + 1 + 1 + 1.1 + 1 + 1.6 + 1.1 + 1.1 + 2.1 + 0.5 + 1.1 + 1 + 2.1 + 0.5 + 1 + 1.2 + 70 + 70 + 49 + + + + + + + title + Single Chords Tuplet + + + + + + + keyboard.piano.grand + + + + 1 + 1 + 78.7402 + 0 + + + + + + + + + 50 + 869.84 + + 168.64 + + + + 3 + + 0 + + + + G + 2 + + + + + C + 5 + + 2 + 1 + quarter + + 3 + 2 + + down + + + + + + + + G + 5 + + 2 + 1 + quarter + + 3 + 2 + + down + + + + B + 4 + + 2 + 1 + quarter + + 3 + 2 + + down + + + + + F + 5 + + 2 + 1 + quarter + + 3 + 2 + + down + + + + C + 4 + + 2 + 1 + quarter + + 3 + 2 + + down + + + + + + + + A + 4 + + 2 + 1 + quarter + + 3 + 2 + + down + + + + + E + 5 + + 2 + 1 + quarter + + 3 + 2 + + down + + + + diff --git a/src/MusicFormatsVersionDate.h b/src/MusicFormatsVersionDate.h index a896d07b1..948685e8d 100644 --- a/src/MusicFormatsVersionDate.h +++ b/src/MusicFormatsVersionDate.h @@ -1 +1 @@ -#define MUSICFORMATS_VERSION_DATE "October 22, 2024" +#define MUSICFORMATS_VERSION_DATE "November 4, 2024" diff --git a/src/converters/msdlconverter/msdlConverterInterface.cpp b/src/converters/msdlconverter/msdlConverterInterface.cpp index a3f093334..4287c3832 100644 --- a/src/converters/msdlconverter/msdlConverterInterface.cpp +++ b/src/converters/msdlconverter/msdlConverterInterface.cpp @@ -45,7 +45,7 @@ #include "musicxml2mxsrInterface.h" #include "mxsr2msrSkeletonBuilderInterface.h" -#include "mxsr2msrTranslatorInterface.h" +#include "mxsr2msrSkeletonPopulatorInterface.h" #include "msr2mxsrInterface.h" #include "msr2msrInterface.h" #include "msr2lpsrInterface.h" @@ -270,6 +270,8 @@ mfMusicformatsErrorKind convertMsdlString2lilypondWithHandler ( // // create the skeleton of the first MSR from the originalMxsr (pass 2a) // // ------------------------------------------------------ // +// mxsrScoreNotesEvents theMxsrScoreNotesEvents; +// // try { // firstMsrScore = // translateMxsrToMsrSkeleton ( @@ -306,8 +308,9 @@ mfMusicformatsErrorKind convertMsdlString2lilypondWithHandler ( // populateMsrSkeletonFromMxsr ( // theMxsr, // firstMsrScore, -// mfPassIDKind::kMfPassID_2b, -// gLanguage->populateTheMSRSkeletonFromMusicXMLData ()); +// theMxsrScoreNotesEvents, +// mfPassIDKind::kMfPassID_2b, +// gLanguage->populateTheMSRSkeletonFromMusicXMLData ()); // } // catch (mxsr2msrException& e) { // mfDisplayException (e, gOutput); diff --git a/src/converters/msr2braille/msr2brailleInterface.cpp b/src/converters/msr2braille/msr2brailleInterface.cpp index f91632113..ee6721c6d 100644 --- a/src/converters/msr2braille/msr2brailleInterface.cpp +++ b/src/converters/msr2braille/msr2brailleInterface.cpp @@ -37,7 +37,7 @@ #include "msr2mxsrInterface.h" #include "mxsr2msrSkeletonBuilderInterface.h" -#include "mxsr2msrTranslatorInterface.h" +#include "mxsr2msrSkeletonPopulatorInterface.h" #include "msr2mxsrInterface.h" #include "msr2bsrInterface.h" #include "bsr2bsrFinalizerInterface.h" diff --git a/src/converters/msr2musicxml/msr2musicxmlInterface.cpp b/src/converters/msr2musicxml/msr2musicxmlInterface.cpp index e4efd4674..b9f617219 100644 --- a/src/converters/msr2musicxml/msr2musicxmlInterface.cpp +++ b/src/converters/msr2musicxml/msr2musicxmlInterface.cpp @@ -36,7 +36,7 @@ #include "msr2musicxmlRegularHandler.h" #include "mxsr2msrSkeletonBuilderInterface.h" -#include "mxsr2msrTranslatorInterface.h" +#include "mxsr2msrSkeletonPopulatorInterface.h" #include "msr2msrInterface.h" #include "msr2mxsrInterface.h" diff --git a/src/converters/musicxml2braille/musicxml2brailleInterface.cpp b/src/converters/musicxml2braille/musicxml2brailleInterface.cpp index 3ebfb1360..a110ff4db 100644 --- a/src/converters/musicxml2braille/musicxml2brailleInterface.cpp +++ b/src/converters/musicxml2braille/musicxml2brailleInterface.cpp @@ -48,7 +48,7 @@ #include "musicxml2mxsrInterface.h" #include "mxsr2msrSkeletonBuilderInterface.h" -#include "mxsr2msrTranslatorInterface.h" +#include "mxsr2msrSkeletonPopulatorInterface.h" #include "msr2mxsrInterface.h" #include "msr2msrInterface.h" #include "msr2bsrInterface.h" @@ -126,10 +126,13 @@ static mfMusicformatsErrorKind xmlFile2brailleWithHandler ( // create the MSR skeleton from the MXSR (pass 2) // ------------------------------------------------------ + mxsrScoreNotesEvents theMxsrScoreNotesEvents; + try { firstMsrScore = translateMxsrToMsrSkeleton ( theMxsr, + theMxsrScoreNotesEvents, gMsrOahGroup, mfPassIDKind::kMfPassID_2, gLanguage->convertTheMXSRIntoAnMSRSkeleton ()); @@ -165,8 +168,9 @@ static mfMusicformatsErrorKind xmlFile2brailleWithHandler ( populateMsrSkeletonFromMxsr ( theMxsr, firstMsrScore, - mfPassIDKind::kMfPassID_3, - gLanguage->populateTheMSRSkeletonFromMusicXMLData ()); + theMxsrScoreNotesEvents, + mfPassIDKind::kMfPassID_3, + gLanguage->populateTheMSRSkeletonFromMusicXMLData ()); } // try catch ( mxsr2msrException& e) { diff --git a/src/converters/musicxml2guido/musicxml2guidoInterface.cpp b/src/converters/musicxml2guido/musicxml2guidoInterface.cpp index 7c29e34cd..5b3fb96a2 100644 --- a/src/converters/musicxml2guido/musicxml2guidoInterface.cpp +++ b/src/converters/musicxml2guido/musicxml2guidoInterface.cpp @@ -43,7 +43,7 @@ #include "musicxml2mxsrInterface.h" #include "mxsr2msrSkeletonBuilderInterface.h" -#include "mxsr2msrTranslatorInterface.h" +#include "mxsr2msrSkeletonPopulatorInterface.h" #include "msr2msrInterface.h" #include "msr2mxsrInterface.h" @@ -120,10 +120,13 @@ static mfMusicformatsErrorKind xmlFile2guidoWithHandler ( // create the skeleton of the first MSR from the originalMxsr (pass 2) // ------------------------------------------------------ + mxsrScoreNotesEvents theMxsrScoreNotesEvents; + try { firstMsrScore = translateMxsrToMsrSkeleton ( originalMxsr, + theMxsrScoreNotesEvents, gMsrOahGroup, mfPassIDKind::kMfPassID_2, "Create the skeleton of the first MSR from the originalMxsr"); @@ -160,8 +163,9 @@ static mfMusicformatsErrorKind xmlFile2guidoWithHandler ( populateMsrSkeletonFromMxsr ( originalMxsr, firstMsrScore, - mfPassIDKind::kMfPassID_3, - gLanguage->populateTheMSRSkeletonFromMusicXMLData ()); + theMxsrScoreNotesEvents, + mfPassIDKind::kMfPassID_3, + gLanguage->populateTheMSRSkeletonFromMusicXMLData ()); } // try catch ( mxsr2msrException& e) { diff --git a/src/converters/musicxml2lilypond/musicxml2lilypondInterface.cpp b/src/converters/musicxml2lilypond/musicxml2lilypondInterface.cpp index 9ceb8c7ed..2ee87e575 100644 --- a/src/converters/musicxml2lilypond/musicxml2lilypondInterface.cpp +++ b/src/converters/musicxml2lilypond/musicxml2lilypondInterface.cpp @@ -50,7 +50,7 @@ #include "musicxml2mxsrInterface.h" #include "mxsr2msrSkeletonBuilderInterface.h" -#include "mxsr2msrTranslatorInterface.h" +#include "mxsr2msrSkeletonPopulatorInterface.h" #include "msr2mxsrInterface.h" #include "msr2msrInterface.h" #include "msr2lpsrInterface.h" @@ -121,10 +121,13 @@ static mfMusicformatsErrorKind sxmlFile2lilypondWithHandler ( // create the skeleton of the first MSR from the originalMxsr (pass 2) // ------------------------------------------------------ + mxsrScoreNotesEvents theMxsrScoreNotesEvents; + try { firstMsrScore = translateMxsrToMsrSkeleton ( theMxsr, + theMxsrScoreNotesEvents, gMsrOahGroup, mfPassIDKind::kMfPassID_2, gLanguage->convertTheMXSRIntoAnMSRSkeleton ()); @@ -160,8 +163,9 @@ static mfMusicformatsErrorKind sxmlFile2lilypondWithHandler ( populateMsrSkeletonFromMxsr ( theMxsr, firstMsrScore, - mfPassIDKind::kMfPassID_3, - gLanguage->populateTheMSRSkeletonFromMusicXMLData ()); + theMxsrScoreNotesEvents, + mfPassIDKind::kMfPassID_3, + gLanguage->populateTheMSRSkeletonFromMusicXMLData ()); } // try catch ( mxsr2msrException& e) { diff --git a/src/converters/musicxml2musicxml/musicxml2musicxmlInterface.cpp b/src/converters/musicxml2musicxml/musicxml2musicxmlInterface.cpp index 76a6edb0a..4b87a259e 100644 --- a/src/converters/musicxml2musicxml/musicxml2musicxmlInterface.cpp +++ b/src/converters/musicxml2musicxml/musicxml2musicxmlInterface.cpp @@ -47,7 +47,7 @@ #include "musicxml2mxsrInterface.h" #include "mxsr2msrSkeletonBuilderInterface.h" -#include "mxsr2msrTranslatorInterface.h" +#include "mxsr2msrSkeletonPopulatorInterface.h" #include "msr2msrInterface.h" #include "msr2mxsrInterface.h" @@ -124,10 +124,13 @@ static mfMusicformatsErrorKind xmlFile2musicxmlWithHandler ( // create the skeleton of the first MSR from the originalMxsr (pass 2) // ------------------------------------------------------ + mxsrScoreNotesEvents theMxsrScoreNotesEvents; + try { firstMsrScore = translateMxsrToMsrSkeleton ( originalMxsr, + theMxsrScoreNotesEvents, gMsrOahGroup, mfPassIDKind::kMfPassID_2, gLanguage->convertTheMXSRIntoAnMSRSkeleton ()); @@ -163,6 +166,7 @@ static mfMusicformatsErrorKind xmlFile2musicxmlWithHandler ( populateMsrSkeletonFromMxsr ( originalMxsr, firstMsrScore, + theMxsrScoreNotesEvents, mfPassIDKind::kMfPassID_3, "Populate the MSR skeletonfrom MusicXML data"); } // try diff --git a/src/mflibrary/mfIndentedTextOutput.cpp b/src/mflibrary/mfIndentedTextOutput.cpp index 7228fe11d..8ec7e7257 100644 --- a/src/mflibrary/mfIndentedTextOutput.cpp +++ b/src/mflibrary/mfIndentedTextOutput.cpp @@ -180,7 +180,7 @@ mfOutputIndenter& mfOutputIndenter::increment (int value) std::endl << std::endl; #endif // MF_INDENTATION_DEBUGGING_IS_ENABLED - if (fIndentation < 0) { + if (false && fIndentation < 0) { mfAssert ( __FILE__, __LINE__, false, diff --git a/src/mflibrary/mfTraceOah.cpp b/src/mflibrary/mfTraceOah.cpp index 9344727ef..ea0145c97 100644 --- a/src/mflibrary/mfTraceOah.cpp +++ b/src/mflibrary/mfTraceOah.cpp @@ -2235,15 +2235,31 @@ R"(Staff details)", addBooleanAtom ( traceStaffDetailsBooleanAtom); - // staff changes + // staff changes basics S_oahTwoBooleansAtom - traceStaffChangesBooleanAtom = + traceStaffChangesBasicsBooleanAtom = oahTwoBooleansAtom::create ( + "trace-staff-changes-basics", "tstchangesb", +R"(Staff changes basics)", + "fTraceStaffChangesBasics", + fTraceStaffChangesBasics, + fTracePassesBooleanAtom); + + subGroup-> + appendAtomToSubGroup ( + traceStaffChangesBasicsBooleanAtom); + + // staff changes + + S_oahThreeBooleansAtom + traceStaffChangesBooleanAtom = + oahThreeBooleansAtom::create ( "trace-staff-changes", "tstchanges", R"(Staff changes)", "fTraceStaffChanges", fTraceStaffChanges, + traceStaffChangesBasicsBooleanAtom, fTracePassesBooleanAtom); subGroup-> @@ -2253,15 +2269,34 @@ R"(Staff changes)", addBooleanAtom ( traceStaffChangesBooleanAtom); - // voices + // voices basics S_oahTwoBooleansAtom - traceVoicesBooleanAtom = + traceVoicesBasicsBooleanAtom = oahTwoBooleansAtom::create ( + "trace-voices-basics", "tvoicesb", +R"(Voices)", + "fTraceVoiceBasics", + fTraceVoiceBasics, + fTracePassesBooleanAtom); + + subGroup-> + appendAtomToSubGroup ( + traceVoicesBasicsBooleanAtom); + bookstoVoicesMultiplexBooleansAtom-> + addBooleanAtom ( + traceVoicesBasicsBooleanAtom); + + // voices + + S_oahThreeBooleansAtom + traceVoicesBooleanAtom = + oahThreeBooleansAtom::create ( "trace-voices", "tvoices", R"(Voices)", "fTraceVoices", fTraceVoices, + traceVoicesBasicsBooleanAtom, fTracePassesBooleanAtom); subGroup-> @@ -2273,14 +2308,15 @@ R"(Voices)", // voices details - S_oahThreeBooleansAtom + S_oahFourBooleansAtom traceVoicesDetailsBooleanAtom = - oahThreeBooleansAtom::create ( + oahFourBooleansAtom::create ( "trace-voices-details", "tvoicesd", R"(Voices with more details (quite verbose).. This option implies '-trace-voices, -tvoices'.)", "fTraceVoicesDetails", fTraceVoicesDetails, + traceVoicesBasicsBooleanAtom, traceVoicesBooleanAtom, fTracePassesBooleanAtom); diff --git a/src/mflibrary/mfTraceOah.h b/src/mflibrary/mfTraceOah.h index 5d15e362d..53e9f6dd6 100644 --- a/src/mflibrary/mfTraceOah.h +++ b/src/mflibrary/mfTraceOah.h @@ -920,12 +920,14 @@ class EXP traceOahGroup : public oahGroup // staff changes // -------------------------------------- + Bool fTraceStaffChangesBasics; Bool fTraceStaffChanges; // voices // -------------------------------------- + Bool fTraceVoiceBasics; Bool fTraceVoices; Bool fTraceVoicesDetails; diff --git a/src/passes/lpsr2lilypond/lpsr2lilypondTranslator.cpp b/src/passes/lpsr2lilypond/lpsr2lilypondTranslator.cpp index 691b46669..aea85c594 100644 --- a/src/passes/lpsr2lilypond/lpsr2lilypondTranslator.cpp +++ b/src/passes/lpsr2lilypond/lpsr2lilypondTranslator.cpp @@ -27729,8 +27729,8 @@ void lpsr2lilypondTranslator::visitStart (S_msrMidiTempo& elt) fLilypondCodeStream << "\\tempo " << - elt->getMidiTempoNotesDuration () << // BLARK - "= " << + elt->getMidiTempoNotesDuration () << // BLARK v0.9.71 + " = " << elt->getMidiTempoPerSecond () << std::endl; diff --git a/src/passes/msr2msr/msr2msrInterface.cpp b/src/passes/msr2msr/msr2msrInterface.cpp index 21177c4a2..54463d710 100644 --- a/src/passes/msr2msr/msr2msrInterface.cpp +++ b/src/passes/msr2msr/msr2msrInterface.cpp @@ -38,7 +38,7 @@ #include "msr2msrTranslator.h" -#include "mxsr2msrTranslatorInterface.h" +#include "mxsr2msrSkeletonPopulatorInterface.h" #include "waeHandlers.h" diff --git a/src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.cpp b/src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.cpp index 903e6c2d7..bbad166e5 100644 --- a/src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.cpp +++ b/src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.cpp @@ -24,7 +24,7 @@ #include "mfConstants.h" #include "mfServices.h" #include "mfStringsHandling.h" - +#include "mfTraceOah.h" #include "msrMeasureConstants.h" #include "displayMsrSummaryVisitor.h" @@ -487,8 +487,363 @@ std::ostream& operator << (std::ostream& os, const S_mxsrPartGroupsStack& elt) { return os; } -//_______________________________________________________________________________ -mxsr2msrSkeletonBuilder::mxsr2msrSkeletonBuilder () +// //______________________________________________________________________________ +// S_mxsr2msrVoiceHandler mxsr2msrVoiceHandler::create ( +// const S_msrVoice& voice) +// { +// mxsr2msrVoiceHandler* obj = new +// mxsr2msrVoiceHandler ( +// voice); +// assert (obj != nullptr); +// return obj; +// } +// +// mxsr2msrVoiceHandler::mxsr2msrVoiceHandler ( +// const S_msrVoice& voice) +// { +// fMsrVoice = voice; +// } +// +// mxsr2msrVoiceHandler::~mxsr2msrVoiceHandler () +// {} +// +// //________________________________________________________________________ +// void mxsr2msrVoiceHandler::displayTupletsStack ( +// const std::string& context) +// { +// size_t tupletsStackSize = fTupletsStack.size (); +// +// gLog << +// std::endl << +// ">>++++++++++++++ The tuplets stack contains " << +// mfSingularOrPlural ( +// tupletsStackSize, "element", "elements") << +// ':' << +// std::endl; +// +// if (tupletsStackSize) { +// std::list::const_iterator +// iBegin = fTupletsStack.begin (), +// iEnd = fTupletsStack.end (), +// i = iBegin; +// +// S_msrTuplet tuplet = (*i); +// +// ++gIndenter; +// +// int n = tupletsStackSize; +// for ( ; ; ) { +// gLog << +// "v (" << n << ")" << +// std::endl; +// +// ++gIndenter; +// gLog << tuplet->asString (); // JMI v0.9.71 +// --gIndenter; +// +// --n; +// +// if (++i == iEnd) break; +// +// gLog << std::endl; +// } // for +// +// --gIndenter; +// } +// +// gLog << +// " <<++++++++++++++++ " << +// std::endl << std::endl; +// } +// +// // void mxsr2msrVoiceHandler::displayLastHandledTupletInVoiceMap ( +// // const std::string& header) +// // { +// // gLog << +// // std::endl << +// // header << +// // ", fLastHandledTupletInVoiceMap contains:"; +// // +// // if (! fLastHandledTupletInVoiceMap.size ()) { +// // gLog << +// // " none" << +// // std::endl; +// // } +// // +// // else { +// // std::map, S_msrTuplet>::const_iterator +// // iBegin = fLastHandledTupletInVoiceMap.begin (), +// // iEnd = fLastHandledTupletInVoiceMap.end (), +// // i = iBegin; +// // +// // gLog << std::endl; +// // +// // ++gIndenter; +// // +// // for ( ; ; ) { +// // gLog << +// // "staff " << (*i).first.first << +// // ", voice " << (*i).first.second << +// // std::endl; +// // // "\"" << (*i).first->getVoiceName () << +// // // "\" ----> " << (*i).second->asString (); +// // if (++i == iEnd) break; +// // gLog << std::endl; +// // } // for +// // +// // gLog << std::endl; +// // +// // --gIndenter; +// // } +// // +// // gLog << std::endl; +// // } +// +// void mxsr2msrVoiceHandler::finalizeTupletStackTopAndPopItFromTupletsStack ( +// int inputLineNumber, +// std::string context) +// { +// #ifdef MF_TRACE_IS_ENABLED +// if (gTraceOahGroup->getTraceTupletsBasics ()) { +// std::stringstream ss; +// +// ss << +// "Finalizing tuplet stack top and popping it from tuplet stack" << +// ", fTupletsStack.size (): " << fTupletsStack.size (); +// +// ss << +// ", fCurrentOuterMostTuplet: "; +// if (fCurrentOuterMostTuplet) { +// ss << +// fCurrentOuterMostTuplet->asString (); +// } +// else { +// ss << "[NULL]"; +// } +// +// ss << +// ", context: " << context << +// ", line " << inputLineNumber; +// +// gWaeHandler->waeTrace ( +// __FILE__, __LINE__, +// ss.str ()); +// } +// #endif // MF_TRACE_IS_ENABLED +// +// #ifdef MF_TRACE_IS_ENABLED +// if (gTraceOahGroup->getTraceTupletsDetails ()) { +// displayTupletsStack ( +// "############## Before finalizeTupletStackTopAndPopItFromTupletsStack() 2"); +// } +// // if (gTraceOahGroup->getTraceTuplets ()) { +// // displayVoicesTupletsStacksMap ( +// // "############## Before finalizeTupletStackTopAndPopItFromTupletsStack() 3"); +// // } +// #endif // MF_TRACE_IS_ENABLED +// +// // fetch the current voice +// S_msrVoice +// currentNoteVoice = +// fMsrVoice; // JMI v0.9.70 +// +// // get tuplet from top of tuplet stack +// S_msrTuplet +// tupletStackFront = +// fTupletsStack.front (); +// +// // pop from the tuplets stack +// #ifdef MF_TRACE_IS_ENABLED +// if (gTraceOahGroup->getTraceTupletsBasics ()) { +// std::stringstream ss; +// +// ss << +// "Popping tupletStackFront " << +// tupletStackFront->asString () << +// " for voice " << +// fMsrVoice->getVoiceName () << +// ", context: " << context << +// ", line " << inputLineNumber; +// +// gWaeHandler->waeTrace ( +// __FILE__, __LINE__, +// ss.str ()); +// } +// #endif // MF_TRACE_IS_ENABLED +// +// #ifdef MF_TRACE_IS_ENABLED +// if (gTraceOahGroup->getTraceTupletsDetails ()) { +// displayTupletsStack ( +// "############## After finalizeTupletStackTopAndPopItFromTupletsStack() 4"); +// } +// // if (gTraceOahGroup->getTraceTupletsDetails ()) { +// // displayVoicesTupletsStacksMap ( +// // "############## After finalizeTupletStackTopAndPopItFromTupletsStack() 5"); +// // } +// #endif // MF_TRACE_IS_ENABLED +// +// #ifdef MF_SANITY_CHECKS_ARE_ENABLED +// // sanity check JMI v0.9.70 +// mfAssert ( +// __FILE__, __LINE__, +// fTupletsStack.size () > 0, +// "fTupletsStack is empty"); +// #endif // MF_SANITY_CHECKS_ARE_ENABLED +// +// fTupletsStack.pop_front (); // JMI v0.9.68 +// +// #ifdef MF_TRACE_IS_ENABLED +// if (gTraceOahGroup->getTraceTupletsDetails ()) { +// displayTupletsStack ( +// "############## After finalizeTupletStackTopAndPopItFromTupletsStack() 6"); +// } +// // if (gTraceOahGroup->getTraceTupletsDetails ()) { +// // displayVoicesTupletsStacksMap ( +// // "############## After finalizeTupletStackTopAndPopItFromTupletsStack() 7"); +// // } +// #endif // MF_TRACE_IS_ENABLED +// +// // abort (); +// +// switch (fTupletsStack.size ()) { +// case 0: +// // tupletStackFront is a top level tuplet +// #ifdef MF_TRACE_IS_ENABLED +// if (gTraceOahGroup->getTraceTupletsBasics ()) { +// gLog << +// "Appending top level tuplet " << +// tupletStackFront->asString () << +// " to voice \"" << +// currentNoteVoice->getVoiceName () << +// "\"" << +// ", line " << inputLineNumber << +// std::endl; +// } +// #endif // MF_TRACE_IS_ENABLED +// break; +// +// default: +// // tupletStackFront is a nested tuplet +// #ifdef MF_TRACE_IS_ENABLED +// if (gTraceOahGroup->getTraceTupletsBasics ()) { +// gLog << +// "=== appending nested tuplet " << +// tupletStackFront << +// " to current stack top tuplet " << +// fTupletsStack.front ()->asString () << +// ", line " << inputLineNumber << +// std::endl; +// } +// #endif // MF_TRACE_IS_ENABLED +// +// fTupletsStack.front ()-> +// appendTupletToTuplet (tupletStackFront); +// } // switch +// +// // forget about the current outermost tuplet and its first note // JMI v0.9.68 HARMFUL +// // fCurrentOuterMostTupletFirstNote = nullptr; +// // fCurrentOuterMostTuplet = nullptr; +// +// #ifdef MF_TRACE_IS_ENABLED +// if (gTraceOahGroup->getTraceTupletsDetails ()) { +// displayTupletsStack ( +// "############## After finalizeTupletStackTopAndPopItFromTupletsStack() 8"); +// } +// // if (gTraceOahGroup->getTraceTupletsDetails ()) { +// // displayVoicesTupletsStacksMap ( +// // "############## After finalizeTupletStackTopAndPopItFromTupletsStack() 9"); +// // } +// #endif // MF_TRACE_IS_ENABLED +// } +// +// std::string mxsr2msrVoiceHandler::asString () const +// { +// std::stringstream ss; +// +// ss << +// "[mxsr2msrVoiceHandler" << +// ']' << +// std::endl; +// +// return ss.str (); +// } +// +// void mxsr2msrVoiceHandler::print (std::ostream& os) const +// { +// os << +// "[mxsr2msrVoiceHandler" << +// std::endl; +// +// ++gIndenter; +// +// const int fieldWidth = 14; +// +// os << std::left << +// std::setw (fieldWidth) << +// "fMsrVoice" << ": " << +// fMsrVoice->getVoiceName () << +// std::endl << +// +// std::setw (fieldWidth) << +// "fLastMetNoteInVoice" << ": " << +// fLastMetNoteInVoice << +// std::endl << +// +// std::setw (fieldWidth) << +// "fCurrentOuterMostTupletFirstNote" << ": " << +// fCurrentOuterMostTupletFirstNote << +// std::endl << +// +// std::setw (fieldWidth) << +// "fCurrentOuterMostTuplet" << ": " << +// fCurrentOuterMostTuplet << +// std::endl << +// +// std::setw (fieldWidth) << +// "fCurrentOuterMostTuplet" << ": " << +// fCurrentOuterMostTuplet << +// std::endl << +// +// std::setw (fieldWidth) << +// "fTupletsStack" << ": " << +// std::endl; +// +// ++gIndenter; +// for (S_msrTuplet tuplet : fTupletsStack) { +// os << +// tuplet << +// std::endl; +// } // for +// --gIndenter; +// +// os << ']' << std::endl; +// +// --gIndenter; +// } +// +// std::ostream& operator << (std::ostream& os, const mxsr2msrVoiceHandler& elt) +// { +// elt.print (os); +// return os; +// } +// +// std::ostream& operator << (std::ostream& os, const S_mxsr2msrVoiceHandler& elt) +// { +// if (elt) { +// elt->print (os); +// } +// else { +// os << "[NULL]" << std::endl; +// } +// +// return os; +// } + +//________________________________________________________________________ +mxsr2msrSkeletonBuilder::mxsr2msrSkeletonBuilder ( + mxsrScoreNotesEvents& theResultingScoreNotesEvents) + : fResultingScoreNotesEvents ( + theResultingScoreNotesEvents) { // the MSR score we're building fMsrScore = @@ -496,14 +851,24 @@ mxsr2msrSkeletonBuilder::mxsr2msrSkeletonBuilder () K_MF_INPUT_LINE_UNKNOWN_, "msrScore::create()"); + // the score notes events we shall collect for mxsr2msrSkeletonPopulator + fCurrentNoteSequentialNumber = 0; + + fCurrentNoteStartInputLine = -1; + fCurrentNoteEndInputLine = -1; + + fPreviousNoteStartInputLine = -1; + fPreviousNoteEndInputLine = -1; + // parts handling fCurrentPartGroupIdentity= -1; // the score part 'start' will set this identity // staff handling - fCurrentStaffMusicXMLNumber = -1; + fCurrentNoteStaffNumber = K_STAFF_NUMBER_UNKNOWN_; + fPreviousNoteStaffNumber = K_STAFF_NUMBER_UNKNOWN_; // voice handling - fCurrentVoiceMusicXMLNumber = -1; + fCurrentVoiceMusicXMLNumber = K_VOICE_NUMBER_UNKNOWN_; // measures handling fScoreFirstMeasureNumber = K_MEASURE_NUMBER_UNKNOWN_; @@ -512,6 +877,18 @@ mxsr2msrSkeletonBuilder::mxsr2msrSkeletonBuilder () fScoreMeasuresNumber = 0; fPartNumberOfMeasures = 0; + // chords handling + fCurrentNoteBelongsToAChord = false; + fPreviousNoteBelongsToAChord = false; + + // tuplets handling + fCurrentTupletTypeKind = msrTupletTypeKind::kTupletTypeNone; + + fCurrentTupletNumber = -1; + fPreviousTupletNumber = -1; + + fCurrentNoteBelongsToATuplet = false; + // lyrics handling fCurrentStanzaNumber = msrStanza::K_STANZA_NUMBER_UNKNOWN_; // JMI fCurrentStanzaName = msrStanza::K_STANZA_NAME_UNKNOWN_; // JMI @@ -522,10 +899,6 @@ mxsr2msrSkeletonBuilder::mxsr2msrSkeletonBuilder () // figured bass handling fFiguredBassVoicesCounter = 0; - // note context - fCurrentStaffMusicXMLNumber = 0; - fCurrentVoiceMusicXMLNumber = 0; - // create the implicit outer-most part group, // needed for stand-alone parts createTheImplicitOuterPartGroupAndAddItToTheMsrScore ( @@ -545,6 +918,28 @@ void mxsr2msrSkeletonBuilder::browseMxsr ( // browse the MXSR browser.browse (*theMxsr); + + // sort the fResultingScoreNotesEvents all notes events list + fResultingScoreNotesEvents.sortAllNotesEventsList (); + +#ifdef MF_TRACE_IS_ENABLED + if ( + gTraceOahGroup->getTraceChordsBasics () + || + gTraceOahGroup->getTraceTupletsBasics () + || + gTraceOahGroup->getTraceStaffChanges () // JMI v0.9.71 + ) { + gLog << + std::endl << + "The MSR skeleton builder collected the following note events:" << + std::endl; + + ++gIndenter; + fResultingScoreNotesEvents.print (gLog); + --gIndenter; + } +#endif // MF_TRACE_IS_ENABLED } } @@ -1209,7 +1604,7 @@ void mxsr2msrSkeletonBuilder::registerPartGroupStop ( // std::stringstream ss; // // ss << -// "staff number " << fCurrentStaffMusicXMLNumber << +// "staff number " << fCurrentNoteStaffNumber << // " is not positive" << // ", line " << inputLineNumber; // @@ -4125,7 +4520,9 @@ void mxsr2msrSkeletonBuilder::visitStart (S_part& elt) fPartNumberOfMeasures = 0; // staves and voices - fCurrentStaffMusicXMLNumber = 1; // default if there are no element + fCurrentNoteStaffNumber = 1; // default if there are no element + fPreviousNoteStaffNumber = K_STAFF_NUMBER_UNKNOWN_; + fCurrentVoiceMusicXMLNumber = 1; // default if there are no element } @@ -4312,14 +4709,15 @@ void mxsr2msrSkeletonBuilder::visitStart (S_staff& elt) } #endif // MF_TRACE_IS_ENABLED - fCurrentStaffMusicXMLNumber = int(*elt); + fPreviousNoteStaffNumber = fCurrentNoteStaffNumber; + fCurrentNoteStaffNumber = int(*elt); // the staff number should be positive - if (fCurrentStaffMusicXMLNumber == K_STAFF_NUMBER_UNKNOWN_) { + if (fCurrentNoteStaffNumber == K_STAFF_NUMBER_UNKNOWN_) { std::stringstream ss; ss << - "staff number " << fCurrentStaffMusicXMLNumber << + "staff number " << fCurrentNoteStaffNumber << " is not positive" << ", line " << elt->getInputStartLineNumber (); @@ -4385,6 +4783,45 @@ void mxsr2msrSkeletonBuilder::visitStart (S_voice& elt) // do it upton visitEnd (S_note& ) } +//________________________________________________________________________ +void mxsr2msrSkeletonBuilder::visitStart (S_print& elt) +{ +#ifdef MF_TRACE_IS_ENABLED + if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { + std::stringstream ss; + + ss << + "--> Start visiting S_print" << + ", line " << elt->getInputStartLineNumber (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + + fOnGoingPrint = true; +} + +void mxsr2msrSkeletonBuilder::visitEnd (S_print& elt) +{ +#ifdef MF_TRACE_IS_ENABLED + if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { + std::stringstream ss; + + ss << + "--> End visiting S_print" << + ", line " << elt->getInputStartLineNumber (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + + fOnGoingPrint = false; +} + //________________________________________________________________________ void mxsr2msrSkeletonBuilder::visitStart (S_measure& elt) { @@ -4465,46 +4902,108 @@ void mxsr2msrSkeletonBuilder::visitEnd (S_measure& elt) } #endif // MF_TRACE_IS_ENABLED - --gIndenter; -} + // an end of measure enforces the end of a chord or tuplets CHORD_TUP + // the current note is then the one preceding the end of measure -//________________________________________________________________________ -void mxsr2msrSkeletonBuilder::visitStart (S_print& elt) -{ -#ifdef MF_TRACE_IS_ENABLED - if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { - std::stringstream ss; + gLog << + "===> visitEnd (S_measure& elt)" << + ", fCurrentNoteSequentialNumber: " << + fCurrentNoteSequentialNumber << - ss << - "--> Start visiting S_print" << - ", line " << elt->getInputStartLineNumber (); + ", fCurrentNoteStartInputLine: " << + fCurrentNoteStartInputLine << - gWaeHandler->waeTrace ( - __FILE__, __LINE__, - ss.str ()); - } -#endif // MF_TRACE_IS_ENABLED + ", fCurrentNoteBelongsToAChord: " << + fCurrentNoteBelongsToAChord << + ", fPreviousNoteBelongsToAChord: " << + fPreviousNoteBelongsToAChord << - fOnGoingPrint = true; -} + ", fCurrentNoteBelongsToATuplet: " << + fCurrentNoteBelongsToATuplet << -void mxsr2msrSkeletonBuilder::visitEnd (S_print& elt) -{ -#ifdef MF_TRACE_IS_ENABLED - if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { - std::stringstream ss; + ", fCurrentTupletTypeKind: " << + fCurrentTupletTypeKind << + std::endl; - ss << - "--> End visiting S_print" << - ", line " << elt->getInputStartLineNumber (); + // Q_MEASURE - gWaeHandler->waeTrace ( - __FILE__, __LINE__, - ss.str ()); - } -#endif // MF_TRACE_IS_ENABLED + // register chord events if any + if (fCurrentNoteBelongsToAChord) { + // the note before the measure end is the last one of the chord + fResultingScoreNotesEvents.registerChordEndEvent ( + fCurrentNoteSequentialNumber, + fCurrentNoteStartInputLine, + fCurrentNoteEndInputLine); - fOnGoingPrint = false; +// fOnGoingChord = true; + } + + else { +// // is this note the one that follows the last one of a chord? +// if (fPreviousNoteBelongsToAChord) { +// // this the note after the last one of the chord +// // we're one note late! +// fResultingScoreNotesEvents.registerChordEndEvent ( +// fCurrentNoteSequentialNumber - 1, +// fPreviousNoteStartInputLine, +// fPreviousNoteEndInputLine); +// +// // fOnGoingChord = false; +// } +// else { +// } + } + + // Q_MEASURE + + // register tuplet events if any + + if (fThereIsAPendingTupletStop) { + fResultingScoreNotesEvents.registerTupletEndEvent ( + fCurrentNoteSequentialNumber, + fCurrentNoteStartInputLine, + fCurrentNoteEndInputLine); + + // forget about the pending tuplet stop + fThereIsAPendingTupletStop = false; + } + + switch (fCurrentTupletTypeKind) { + case msrTupletTypeKind::kTupletTypeNone: + // should not occur + break; + + case msrTupletTypeKind::kTupletTypeStart: + // should not occur +// fResultingScoreNotesEvents.registerTupletBeginEvent ( +// fCurrentNoteSequentialNumber, +// fCurrentNoteStartInputLine, +// fCurrentNoteEndInputLine); +abort(); +// fOnGoingTuplet = true; + break; + + case msrTupletTypeKind::kTupletTypeContinue: + // nothing to do + break; + + case msrTupletTypeKind::kTupletTypeStop: +// fResultingScoreNotesEvents.registerTupletEndEvent ( +// fCurrentNoteSequentialNumber, +// fCurrentNoteStartInputLine, +// fCurrentNoteEndInputLine); +// +// // forget about the pending tuplet stop +// fThereIsAPendingTupletStop = false; + +// fOnGoingTuplet = false; + break; + + case msrTupletTypeKind::kTupletTypeStartAndStopInARow: + break; + } // switch + + --gIndenter; } //______________________________________________________________________________ @@ -4524,8 +5023,24 @@ void mxsr2msrSkeletonBuilder::visitStart (S_note& elt) } #endif // MF_TRACE_IS_ENABLED + ++fCurrentNoteSequentialNumber; + + fPreviousNoteBelongsToAChord = fCurrentNoteBelongsToAChord; + fCurrentNoteBelongsToAChord = false; + + fCurrentTupletTypeKind = msrTupletTypeKind::kTupletTypeNone; + fCurrentNoteBelongsToATuplet = false; + + fPreviousNoteStartInputLine = fCurrentNoteStartInputLine; + fPreviousNoteStartInputLine = fCurrentNoteEndInputLine; + + fCurrentNoteStartInputLine = + elt->getInputStartLineNumber (); + fCurrentNoteEndInputLine = + elt->getInputEndLineNumber (); + // assuming staff number 1, unless S_staff states otherwise afterwards - fCurrentStaffMusicXMLNumber = 1; + fCurrentNoteStaffNumber = 1; // assuming voice number 1, unless S_voice states otherwise afterwards fCurrentVoiceMusicXMLNumber = 1; @@ -4558,32 +5073,38 @@ void mxsr2msrSkeletonBuilder::visitEnd (S_note& elt) staff = createStaffInCurrentPartIfNotYetDone ( elt->getInputStartLineNumber (), - fCurrentStaffMusicXMLNumber); + fCurrentNoteStaffNumber); // should the voice be created? S_msrVoice noteVoice = createRegularVoiceInStaffIfNotYetDone ( elt->getInputStartLineNumber (), - fCurrentStaffMusicXMLNumber, + fCurrentNoteStaffNumber, fCurrentVoiceMusicXMLNumber); #ifdef MF_TRACE_IS_ENABLED - if (gTraceOahGroup->getTraceNotesDetails ()) { + if (true || gTraceOahGroup->getTraceNotesDetails ()) { std::stringstream ss; ss << - "--> S_note, fCurrentStaffMusicXMLNumber: " << - fCurrentStaffMusicXMLNumber << - std::endl << - "--> S_note, current staff name: " << - staff->getStaffName() << - std::endl << - "--> S_note, fCurrentVoiceMusicXMLNumber: " << + "--> visitEnd (S_note& elt) 1:" + ", fCurrentNoteSequentialNumber: " << + fCurrentNoteSequentialNumber << + ", fCurrentNoteStartInputLine: " << + fCurrentNoteStartInputLine << + + ", fCurrentNoteStaffNumber: " << + fCurrentNoteStaffNumber << + ", tStaffName(): " << + staff->getStaffName () << + ", fCurrentVoiceMusicXMLNumber: " << fCurrentVoiceMusicXMLNumber << - std::endl << - "--> S_note, current noteVoice name: " << - noteVoice->getVoiceName(); + ", getVoiceName(): " << + noteVoice->getVoiceName () << + ", fCurrentTupletTypeKind: " << + fCurrentTupletTypeKind << + ", line " << fCurrentNoteStartInputLine; gWaeHandler->waeTrace ( __FILE__, __LINE__, @@ -4606,9 +5127,9 @@ void mxsr2msrSkeletonBuilder::visitEnd (S_note& elt) gWaeHandler->waeTrace ( __FILE__, __LINE__, ss.str ()); - } + } #endif // MF_TRACE_IS_ENABLED - } + } else { // create the part harmonies voice if not yet done S_msrVoice @@ -4651,7 +5172,433 @@ void mxsr2msrSkeletonBuilder::visitEnd (S_note& elt) fThereAreFiguredBassToBeAttachedToCurrentNote = false; } - fOnGoingNote = false; + // Q_NOTE + + // register chord events if any +#ifdef MF_TRACE_IS_ENABLED + if (gTraceOahGroup->getTraceChordsBasics ()) { + std::stringstream ss; + + ss << + "--> visitEnd (S_note& elt) 2:" + ", fCurrentNoteSequentialNumber: " << + fCurrentNoteSequentialNumber << + ", fCurrentNoteStartInputLine: " << + fCurrentNoteStartInputLine << + + ", fCurrentNoteBelongsToAChord: " << + fCurrentNoteBelongsToAChord << + ", fPreviousNoteBelongsToAChord: " << + fPreviousNoteBelongsToAChord << + ", line " << fCurrentNoteStartInputLine; + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + + if (fCurrentNoteBelongsToAChord) { + // was the previous note also in the chords? + if (fPreviousNoteBelongsToAChord) { + // this note is after the second one of the chord + // wait and see upon the next note or the measure end + } + else { + // this is the second note of the chord + // we're one note late! + fResultingScoreNotesEvents.registerChordBeginEvent ( + fCurrentNoteSequentialNumber - 1, + fPreviousNoteStartInputLine, + fPreviousNoteEndInputLine); + +// fOnGoingChord = true; + } + } + + else { + // is this note the one that follows the last one of a chord? + if (fPreviousNoteBelongsToAChord) { + // this the note after the last one of the chord + // we're one note late! + fResultingScoreNotesEvents.registerChordEndEvent ( + fCurrentNoteSequentialNumber - 1, + fPreviousNoteStartInputLine, + fPreviousNoteEndInputLine); + +// fOnGoingChord = false; + } + else { + // wait and see upon the next note or the measure end + } + } + + // Q_NOTE + + // register tuplet events if any +#ifdef MF_TRACE_IS_ENABLED + if (gTraceOahGroup->getTraceTupletsBasics ()) { + std::stringstream ss; + + ss << + "--> visitEnd (S_note& elt) 3:" + ", fCurrentNoteSequentialNumber: " << + fCurrentNoteSequentialNumber << + ", fCurrentNoteStartInputLine: " << + fCurrentNoteStartInputLine << + + ", fCurrentNoteBelongsToATuplet: " << + fCurrentNoteBelongsToATuplet << + ", fCurrentTupletTypeKind: " << + fCurrentTupletTypeKind << + ", fThereIsAPendingTupletStop: " << + fThereIsAPendingTupletStop << + ", line " << fCurrentNoteStartInputLine; + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + + switch (fCurrentTupletTypeKind) { + case msrTupletTypeKind::kTupletTypeNone: + if (fCurrentNoteBelongsToATuplet) { + // rien + } + else { + if (fThereIsAPendingTupletStop) { + // register the preceding tuplet end + fResultingScoreNotesEvents.registerTupletEndEvent ( + fCurrentNoteSequentialNumber, + fCurrentNoteStartInputLine, + fCurrentNoteEndInputLine); + + // forget about the pending tuplet stop + fThereIsAPendingTupletStop = false; + } + } + break; + + case msrTupletTypeKind::kTupletTypeStart: + // is there a pending tuplet stop? + if (fThereIsAPendingTupletStop) { + // yes, the previous note is the end of the preceding tuplet + fResultingScoreNotesEvents.registerTupletEndEvent ( + fCurrentNoteSequentialNumber - 1, + fPreviousNoteStartInputLine, + fPreviousNoteEndInputLine); + + // forget about the pending tuplet stop + fThereIsAPendingTupletStop = false; + } + + // now register the new tuplet begin event + fResultingScoreNotesEvents.registerTupletBeginEvent ( + fCurrentNoteSequentialNumber, + fCurrentNoteStartInputLine, + fCurrentNoteEndInputLine); + break; + + case msrTupletTypeKind::kTupletTypeContinue: + // nothing to do + break; + + case msrTupletTypeKind::kTupletTypeStop: + fThereIsAPendingTupletStop = true; + +// fResultingScoreNotesEvents.registerTupletEndEvent ( +// fCurrentNoteSequentialNumber, +// fCurrentNoteStartInputLine, +// fCurrentNoteEndInputLine); + +// // forget about the pending tuplet stop +// fThereIsAPendingTupletStop = false; + +// fOnGoingTuplet = false; + break; + + case msrTupletTypeKind::kTupletTypeStartAndStopInARow: + break; + } // switch + + // Q_NOTE + + // is there a staff change? +#ifdef MF_TRACE_IS_ENABLED + if (gTraceOahGroup->getTraceStaffChanges ()) { + std::stringstream ss; + + ss << + "===> Is there is a staff change???" << + '\n' << + + ", fCurrentNoteStaffNumber: " << + fCurrentNoteStaffNumber << + ", fPreviousNoteStaffNumber: " << + fPreviousNoteStaffNumber << + + ", fCurrentNoteVoiceNumber: " << + fCurrentNoteVoiceNumber << + ", fPreviousNoteVoiceNumber: " << + fPreviousNoteVoiceNumber << + + ", line " << fCurrentNoteStartInputLine; + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + + if ( + fCurrentNoteStaffNumber != fPreviousNoteStaffNumber + && +// fCurrentNoteVoiceNumber != fPreviousNoteVoiceNumber +// && + fPreviousNoteStaffNumber != K_STAFF_NUMBER_UNKNOWN_ // JMI STAFF_CHANGE + ) { + // yes, register a staff change event + // taking off from the previous note + // and landing on the current note + +#ifdef MF_TRACE_IS_ENABLED + if (gTraceOahGroup->getTraceStaffChanges ()) { + std::stringstream ss; + + ss << + "===> There is a staff change" << + '\n' << + + ", fCurrentNoteStaffNumber: " << + fCurrentNoteStaffNumber << + ", fPreviousNoteStaffNumber: " << + fPreviousNoteStaffNumber << + + ", fCurrentNoteVoiceNumber: " << + fCurrentNoteVoiceNumber << + ", fPreviousNoteVoiceNumber: " << + fPreviousNoteVoiceNumber << + + ", line " << fCurrentNoteStartInputLine; + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + + fResultingScoreNotesEvents.registerStaffChangeTakeOffEvent ( // CHORD_TUP + fCurrentNoteSequentialNumber - 1, + fPreviousNoteStartInputLine, + fPreviousNoteEndInputLine); + + fResultingScoreNotesEvents.registerStaffChangeLandingEvent ( + fCurrentNoteSequentialNumber, + fCurrentNoteStartInputLine, + fCurrentNoteEndInputLine); + } +} + +//________________________________________________________________________ +void mxsr2msrSkeletonBuilder::visitStart (S_chord& elt) +{ +#ifdef MF_TRACE_IS_ENABLED + if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { + std::stringstream ss; + + ss << + "--> Start visiting S_chord" << + ", line " << elt->getInputStartLineNumber (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + +#ifdef MF_TRACE_IS_ENABLED + if (gTraceOahGroup->getTraceChordsBasics ()) { + std::stringstream ss; + + ss << + "--> There is a chord markup" << + ", fCurrentNoteSequentialNumber: " << + fCurrentNoteSequentialNumber << + ", line " << elt->getInputStartLineNumber (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + + fCurrentNoteBelongsToAChord = true; +} + +void mxsr2msrSkeletonBuilder:: visitEnd (S_chord& elt) +{ +#ifdef MF_TRACE_IS_ENABLED + if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { + std::stringstream ss; + + ss << + "--> End visiting S_chord" << + ", line " << elt->getInputStartLineNumber (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED +} + +//________________________________________________________________________ +void mxsr2msrSkeletonBuilder::visitStart (S_tuplet& elt) +{ +#ifdef MF_TRACE_IS_ENABLED + if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { + std::stringstream ss; + + ss << + "--> Start visiting S_tuplet" << + ", line " << elt->getInputStartLineNumber (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + + // number + + fCurrentTupletNumber = elt->getAttributeIntValue ("number", 0); + + // type + + { + std::string tupletType = elt->getAttributeValue ("type"); + + if (tupletType == "start") { + fCurrentTupletTypeKind = msrTupletTypeKind::kTupletTypeStart; + +#ifdef MF_TRACE_IS_ENABLED + if (gTraceOahGroup->getTraceTupletsBasics ()) { + std::stringstream ss; + + ss << + "--> There is a tuplet start (kTupletTypeStart)" << + ", fCurrentNoteSequentialNumber: " << + fCurrentNoteSequentialNumber << + ", line " << elt->getInputStartLineNumber (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + } + + else if (tupletType == "continue") { + fCurrentTupletTypeKind = msrTupletTypeKind::kTupletTypeContinue; + +#ifdef MF_TRACE_IS_ENABLED + if (gTraceOahGroup->getTraceTupletsBasics ()) { + std::stringstream ss; + + ss << + "--> There is a tuplet continue (kTupletTypeContinue)" << + ", fCurrentNoteSequentialNumber: " << + fCurrentNoteSequentialNumber << + ", line " << elt->getInputStartLineNumber (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + } + + else if (tupletType == "stop") { + fCurrentTupletTypeKind = msrTupletTypeKind::kTupletTypeStop; + +#ifdef MF_TRACE_IS_ENABLED + if (gTraceOahGroup->getTraceTupletsBasics ()) { + std::stringstream ss; + + ss << + "--> There is a tuplet stop (kTupletTypeStop)" << + ", fCurrentNoteSequentialNumber: " << + fCurrentNoteSequentialNumber << + ", line " << elt->getInputStartLineNumber (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + } + + else { + std::stringstream ss; + + ss << + "tuplet type \"" << tupletType << + "\" is unknown"; + + mxsr2msrError ( + gServiceRunData->getInputSourceName (), + elt->getInputStartLineNumber (), + __FILE__, __LINE__, + ss.str ()); + } + } + + // number + + fPreviousTupletNumber = fCurrentTupletNumber; + + // the tuplet number may be absent, so use 0 in that case + fCurrentTupletNumber = elt->getAttributeIntValue ("number", 0); + +#ifdef MF_TRACE_IS_ENABLED + if (gTraceOahGroup->getTraceTupletsBasics ()) { + std::stringstream ss; + + ss << + "Tuplet information gathered: " << + "fCurrentTupletNumber: " << + fCurrentTupletNumber << + ", fCurrentTupletTypeKind: " << + fCurrentTupletTypeKind; + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + + fCurrentNoteBelongsToATuplet = true; +} + +void mxsr2msrSkeletonBuilder::visitStart (S_time_modification& elt) +{ + +#ifdef MF_TRACE_IS_ENABLED + if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { + std::stringstream ss; + + ss << + "--> End visiting S_tuplet" << + ", line " << elt->getInputStartLineNumber (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + + fCurrentNoteBelongsToATuplet = true; } //________________________________________________________________________ @@ -4803,7 +5750,7 @@ void mxsr2msrSkeletonBuilder::visitEnd (S_lyric& elt) currentVoice = createRegularVoiceInStaffIfNotYetDone ( elt->getInputStartLineNumber (), - fCurrentStaffMusicXMLNumber, + fCurrentNoteStaffNumber, fCurrentVoiceMusicXMLNumber); // create stanzaNumber in current voice if need be diff --git a/src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h b/src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h index 296708b8b..77f610ee7 100644 --- a/src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h +++ b/src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h @@ -14,8 +14,10 @@ #include "typedefs.h" +#include "mxsrNotesEvents.h" #include "msrPartGroups.h" #include "msrPrintObjects.h" +#include "msrTupletsEnumTypes.h" namespace MusicFormats @@ -319,6 +321,139 @@ typedef SMARTP S_mxsrPartGroupsStack; EXP std::ostream& operator << (std::ostream& os, const mxsrPartGroupsStack& elt); EXP std::ostream& operator << (std::ostream& os, const S_mxsrPartGroupsStack& elt); +//________________________________________________________________________ +// class mxsr2msrVoiceHandler : public smartable +// { +// /* +// positions represent the order in which the parts appear in , +// starting at 0 since std::vectors are used +// */ +// +// public: +// +// // creation +// // ------------------------------------------------------ +// +// static SMARTP create ( +// const S_msrVoice& voice); +// +// protected: +// +// // constructors/destructor +// // ------------------------------------------------------ +// +// mxsr2msrVoiceHandler ( +// const S_msrVoice& fMsrVoice); +// +// virtual ~mxsr2msrVoiceHandler (); +// +// public: +// +// // set and get +// // ------------------------------------------------------ +// +// S_msrVoice getMsrVoice () const +// { return fMsrVoice; } +// +// const std::list& +// getTupletsStack () const +// { return fTupletsStack; } +// +// const std::size_t getTupletsStackSize () const +// { return fTupletsStack.size (); } +// +// const S_msrTuplet getTupletsStackTop () const +// { return fTupletsStack.front (); } +// +// void setLastMetNoteInVoice (S_msrNote note) +// { fLastMetNoteInVoice = note; } +// +// S_msrNote getLastMetNoteInVoice () const +// { return fLastMetNoteInVoice; } +// +// public: +// +// // public services +// // ------------------------------------------------------ +// +// void pushTupletOntoTupletsStack (const S_msrTuplet& tuplet) +// { fTupletsStack.push_front (tuplet); } +// +// // void handleTupletStartByHandler ( +// // const S_msrTuplet& tuplet, +// // const S_msrVoice& currentNoteVoice); +// // +// // void handleTupletContinueByHandler ( +// // const S_msrNote& note, +// // const S_msrVoice& currentNoteVoice); +// // +// // void handleTupletStopByHandler ( +// // const S_msrNote& note, +// // const S_msrVoice& currentNoteVoice); +// +// void finalizeTupletStackTopAndPopItFromTupletsStack ( +// int inputLineNumber, +// std::string context); +// +// public: +// +// // print +// // ------------------------------------------------------ +// +// std::string asString () const; +// +// virtual void print (std::ostream& os) const; +// +// private: +// +// // private fields +// // ------------------------------------------------------ +// +// +// S_msrVoice fMsrVoice; +// +// S_msrNote fLastMetNoteInVoice; +// +// std::list +// fTupletsStack; +// +// S_msrNote fCurrentOuterMostTupletFirstNote; +// S_msrTuplet fCurrentOuterMostTuplet; +// +// msrWholeNotes fCurrentOuterMostTupletRelativeOffset; +// +// private: +// +// // private work fields +// // ------------------------------------------------------ +// +// // we use a pair containing the staff and voice numbers: JMI v0.9.70 +// // std::map +// // std::map, S_msrTuplet> +// // fLastHandledTupletInVoiceMap; +// +// // // the tuplets stops are not always in first-in/first-out order, so: +// // std::set fExpectedTupletsStopNumbersSet; +// +// private: +// +// // private methods +// // ------------------------------------------------------ +// +// void displayTupletsStack ( +// const std::string& context); +// +// void handleTupletsPendingOnTupletsStack ( +// int inputLineNumber); +// +// void displayLastHandledTupletInVoiceMap ( +// const std::string& header); +// }; +// typedef SMARTP S_mxsr2msrVoiceHandler; +// +// EXP std::ostream& operator << (std::ostream& os, const mxsr2msrVoiceHandler& elt); +// EXP std::ostream& operator << (std::ostream& os, const S_mxsr2msrVoiceHandler& elt); + //________________________________________________________________________ class EXP mxsr2msrSkeletonBuilder : @@ -425,6 +560,16 @@ class EXP mxsr2msrSkeletonBuilder : public visitor, + // chords + // ------------------------------------------------------ + + public visitor, + + // tuplets + // ------------------------------------------------------ + + public visitor, + // lyrics // ------------------------------------------------------ @@ -446,7 +591,9 @@ class EXP mxsr2msrSkeletonBuilder : // constructors/destructor // ------------------------------------------------------ - mxsr2msrSkeletonBuilder (); + mxsr2msrSkeletonBuilder ( + mxsrScoreNotesEvents& + theResultingScoreNotesEvents); virtual ~mxsr2msrSkeletonBuilder (); @@ -592,6 +739,19 @@ class EXP mxsr2msrSkeletonBuilder : virtual void visitStart (S_note& elt); virtual void visitEnd (S_note& elt); + // chords + // ------------------------------------------------------ + + virtual void visitStart (S_chord& elt); + virtual void visitEnd (S_chord& elt); + + // tuplets + // ------------------------------------------------------ + + virtual void visitStart (S_tuplet& elt); + + virtual void visitStart (S_time_modification& elt); + // lyrics // ------------------------------------------------------ @@ -618,6 +778,12 @@ class EXP mxsr2msrSkeletonBuilder : S_msrScore fMsrScore; + // the score notes events we shall collect for mxsr2msrSkeletonPopulator + // ------------------------------------------------------ + + mxsrScoreNotesEvents& fResultingScoreNotesEvents; + + // credits handling // ------------------------------------------------------ @@ -769,8 +935,6 @@ class EXP mxsr2msrSkeletonBuilder : // staff handling // ------------------------------------------------------ - int fCurrentStaffMusicXMLNumber; // used throughout - S_msrStaff createStaffInCurrentPartIfNotYetDone ( int inputLineNumber, int staffNumber); @@ -807,10 +971,58 @@ class EXP mxsr2msrSkeletonBuilder : Bool fOnGoingPrint; + // notes handling // ------------------------------------------------------ + int fCurrentNoteSequentialNumber; + + int fCurrentNoteStartInputLine; + int fCurrentNoteEndInputLine; + + int fPreviousNoteStartInputLine; + int fPreviousNoteEndInputLine; + + int fCurrentNoteStaffNumber; // used throughout + int fPreviousNoteStaffNumber; + + int fCurrentNoteVoiceNumber; // used throughout + int fPreviousNoteVoiceNumber; + +/* +/Users/jacquesmenu/musicformats-git-dev/src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h:989:31: warning: private field 'fCurrentNoteVoiceNumber' is not used [-Wunused-private-field] + 989 | int fCurrentNoteVoiceNumber; // used throughout + | ^ +/Users/jacquesmenu/musicformats-git-dev/src/passes/mxsr2msr/mxsr2msrSkeletonBuilder.h:990:31: warning: private field 'fPreviousNoteVoiceNumber' is not used [-Wunused-private-field] + 990 | int fPreviousNoteVoiceNumber; + | ^ +*/ + Bool fOnGoingNote; + // chords handling + // ------------------------------------------------------ + + Bool fCurrentNoteBelongsToAChord; + Bool fPreviousNoteBelongsToAChord; + +// Bool fOnGoingChord; // JMI v0.9.71 + + // tuplets handling + // ------------------------------------------------------ + + // nested tuplets are numbered 1, 2, ... + int fCurrentTupletNumber; + int fPreviousTupletNumber; + + msrTupletTypeKind fCurrentTupletTypeKind; + + Bool fCurrentNoteBelongsToATuplet; + + // a tuplet stop may occur in a chord before the latter's last note, hence: + Bool fThereIsAPendingTupletStop; // CHORD_TUP + +// Bool fOnGoingTuplet; // JMI v0.9.71 + // lyrics handling // ------------------------------------------------------ diff --git a/src/passes/mxsr2msr/mxsr2msrSkeletonBuilderInterface.cpp b/src/passes/mxsr2msr/mxsr2msrSkeletonBuilderInterface.cpp index b718a755b..f9b4e2d19 100644 --- a/src/passes/mxsr2msr/mxsr2msrSkeletonBuilderInterface.cpp +++ b/src/passes/mxsr2msr/mxsr2msrSkeletonBuilderInterface.cpp @@ -33,8 +33,6 @@ #include "mxsr2msrSkeletonBuilderInterface.h" -#include "mxsr2msrSkeletonBuilder.h" - #include "displayMsrSummaryVisitor.h" #include "waeHandlers.h" @@ -45,10 +43,11 @@ namespace MusicFormats //_______________________________________________________________________________ S_msrScore translateMxsrToMsrSkeleton ( - const Sxmlelement& theMxsr, - const S_msrOahGroup& msrOpts, - mfPassIDKind passIDKind, - const std::string& passDescription) + const Sxmlelement& theMxsr, + mxsrScoreNotesEvents& theResultingScoreNotesEvents, + const S_msrOahGroup& msrOpts, + mfPassIDKind passIDKind, + const std::string& passDescription) { #ifdef MF_SANITY_CHECKS_ARE_ENABLED // sanity check @@ -90,7 +89,8 @@ S_msrScore translateMxsrToMsrSkeleton ( // create an MXSR2msrSkeletonBuilder mxsr2msrSkeletonBuilder - skeletonBuilder; + skeletonBuilder ( + theResultingScoreNotesEvents); // build the MSR score skeletonBuilder.browseMxsr ( diff --git a/src/passes/mxsr2msr/mxsr2msrSkeletonBuilderInterface.h b/src/passes/mxsr2msr/mxsr2msrSkeletonBuilderInterface.h index 02e89a52a..89bfcb0a8 100644 --- a/src/passes/mxsr2msr/mxsr2msrSkeletonBuilderInterface.h +++ b/src/passes/mxsr2msr/mxsr2msrSkeletonBuilderInterface.h @@ -12,16 +12,19 @@ #ifndef ___mxsr2msrSkeletonBuilderInterface___ #define ___mxsr2msrSkeletonBuilderInterface___ +#include "mxsr2msrSkeletonBuilder.h" + namespace MusicFormats { //_______________________________________________________________________________ EXP S_msrScore translateMxsrToMsrSkeleton ( - const Sxmlelement& theMxsr, - const S_msrOahGroup& msrOpts, - mfPassIDKind passIDKind, - const std::string& passDescription); + const Sxmlelement& theMxsr, + mxsrScoreNotesEvents& theResultingScoreNotesEvents, + const S_msrOahGroup& msrOpts, + mfPassIDKind passIDKind, + const std::string& passDescription); //_______________________________________________________________________________ // EXP void displayMsrScoreSkeleton ( // UNUSED JMI v0.9.66 diff --git a/src/passes/mxsr2msr/mxsr2msrTranslator.cpp b/src/passes/mxsr2msr/mxsr2msrSkeletonPopulator.cpp similarity index 95% rename from src/passes/mxsr2msr/mxsr2msrTranslator.cpp rename to src/passes/mxsr2msr/mxsr2msrSkeletonPopulator.cpp index 8d270a5f6..e910b050e 100644 --- a/src/passes/mxsr2msr/mxsr2msrTranslator.cpp +++ b/src/passes/mxsr2msr/mxsr2msrSkeletonPopulator.cpp @@ -44,7 +44,7 @@ #include "mxsr2msrOah.h" #include "msrOah.h" -#include "mxsr2msrTranslator.h" +#include "mxsr2msrSkeletonPopulator.h" #include "waeHandlers.h" @@ -405,8 +405,11 @@ std::ostream& operator << (std::ostream& os, const S_mxsr2msrVoiceHandler& elt) } //________________________________________________________________________ -mxsr2msrTranslator::mxsr2msrTranslator ( - const S_msrScore& scoreSkeleton) +mxsr2msrSkeletonPopulator::mxsr2msrSkeletonPopulator ( + const S_msrScore& scoreSkeleton, + mxsrScoreNotesEvents& + theKnownScoreNotesEvents) + : fKnownScoreNotesEvents (theKnownScoreNotesEvents) { // initialize note data to a neutral state initializeNoteData (); @@ -678,11 +681,11 @@ mxsr2msrTranslator::mxsr2msrTranslator ( fCurrentForwardVoiceNumber = K_VOICE_NUMBER_UNKNOWN_; } -mxsr2msrTranslator::~mxsr2msrTranslator () +mxsr2msrSkeletonPopulator::~mxsr2msrSkeletonPopulator () {} //________________________________________________________________________ -void mxsr2msrTranslator::browseMxsr ( +void mxsr2msrSkeletonPopulator::browseMxsr ( const Sxmlelement& theMxsr) { if (theMxsr) { @@ -695,7 +698,7 @@ void mxsr2msrTranslator::browseMxsr ( } //________________________________________________________________________ -void mxsr2msrTranslator::initializeNoteData () +void mxsr2msrSkeletonPopulator::initializeNoteData () { // basic note description @@ -836,7 +839,7 @@ void mxsr2msrTranslator::initializeNoteData () // JMI fCurrentNoteSyllableExtendKind = kSyllableExtend_NONE; v0.9.67 } -void mxsr2msrTranslator::displayStaffAndVoiceInformation ( +void mxsr2msrSkeletonPopulator::displayStaffAndVoiceInformation ( int inputLineNumber, const std::string& context) { @@ -873,7 +876,7 @@ void mxsr2msrTranslator::displayStaffAndVoiceInformation ( } //________________________________________________________________________ -void mxsr2msrTranslator::printVoicesLastMetNoteMap ( +void mxsr2msrSkeletonPopulator::printVoicesLastMetNoteMap ( int inputLineNumber, const std::string& context) { @@ -924,7 +927,7 @@ void mxsr2msrTranslator::printVoicesLastMetNoteMap ( } //________________________________________________________________________ -void mxsr2msrTranslator::checkStep ( +void mxsr2msrSkeletonPopulator::checkStep ( int inputLineNumber, const std::string& stepValue, const std::string& markup) @@ -965,7 +968,7 @@ void mxsr2msrTranslator::checkStep ( } //______________________________________________________________________________ -void mxsr2msrTranslator::populateCurrentPartStavesVectorFromPart ( +void mxsr2msrSkeletonPopulator::populateCurrentPartStavesVectorFromPart ( const S_msrPart& part) { #ifdef MF_TRACE_IS_ENABLED @@ -1023,12 +1026,12 @@ void mxsr2msrTranslator::populateCurrentPartStavesVectorFromPart ( displayCurrentPartStavesVector ( 0, - "after mxsr2msrTranslator::populateCurrentPartStavesVectorFromPart()"); + "after mxsr2msrSkeletonPopulator::populateCurrentPartStavesVectorFromPart()"); } #endif // MF_TRACE_IS_ENABLED } -void mxsr2msrTranslator::displayCurrentPartStavesVector ( +void mxsr2msrSkeletonPopulator::displayCurrentPartStavesVector ( int inputLineNumber, const std::string& context) { @@ -1051,7 +1054,7 @@ void mxsr2msrTranslator::displayCurrentPartStavesVector ( } //______________________________________________________________________________ -void mxsr2msrTranslator::populateCurrentPartVoicesVectorsFromPart ( +void mxsr2msrSkeletonPopulator::populateCurrentPartVoicesVectorsFromPart ( const S_msrPart& part) { #ifdef MF_TRACE_IS_ENABLED @@ -1133,12 +1136,12 @@ void mxsr2msrTranslator::populateCurrentPartVoicesVectorsFromPart ( displayCurrentPartVoicesVector ( 0, - "after mxsr2msrTranslator::populateCurrentPartVoicesVectorsFromPart()"); + "after mxsr2msrSkeletonPopulator::populateCurrentPartVoicesVectorsFromPart()"); } #endif // MF_TRACE_IS_ENABLED } -void mxsr2msrTranslator::displayCurrentPartVoicesVector ( +void mxsr2msrSkeletonPopulator::displayCurrentPartVoicesVector ( int inputLineNumber, const std::string& context) { @@ -1161,7 +1164,7 @@ void mxsr2msrTranslator::displayCurrentPartVoicesVector ( } //______________________________________________________________________________ -S_msrVoice mxsr2msrTranslator::fetchFirstVoiceFromCurrentPart ( +S_msrVoice mxsr2msrSkeletonPopulator::fetchFirstVoiceFromCurrentPart ( int inputLineNumber) { int staffNumber = 1; @@ -1233,7 +1236,7 @@ S_msrVoice mxsr2msrTranslator::fetchFirstVoiceFromCurrentPart ( } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_millimeters& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_millimeters& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1252,7 +1255,7 @@ void mxsr2msrTranslator::visitStart (S_millimeters& elt) fCurrentMillimeters = (float)(*elt); } -void mxsr2msrTranslator::visitStart (S_tenths& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_tenths& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1271,7 +1274,7 @@ void mxsr2msrTranslator::visitStart (S_tenths& elt) fCurrentTenths = (float)(*elt); } -void mxsr2msrTranslator::visitEnd (S_scaling& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_scaling& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1315,7 +1318,7 @@ void mxsr2msrTranslator::visitEnd (S_scaling& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_system_layout& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_system_layout& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1339,7 +1342,7 @@ void mxsr2msrTranslator::visitStart (S_system_layout& elt) fOnGoingSystemLayout = true; } -void mxsr2msrTranslator::visitEnd (S_system_layout& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_system_layout& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1375,7 +1378,7 @@ void mxsr2msrTranslator::visitEnd (S_system_layout& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_system_margins& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_system_margins& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1402,7 +1405,7 @@ void mxsr2msrTranslator::visitStart (S_system_margins& elt) fOnGoingSystemMargins = true; } -void mxsr2msrTranslator::visitStart (S_system_distance& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_system_distance& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1437,7 +1440,7 @@ void mxsr2msrTranslator::visitStart (S_system_distance& elt) } } -void mxsr2msrTranslator::visitStart (S_top_system_distance& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_top_system_distance& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1472,7 +1475,7 @@ void mxsr2msrTranslator::visitStart (S_top_system_distance& elt) } } -void mxsr2msrTranslator::visitEnd (S_system_margins& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_system_margins& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1500,7 +1503,7 @@ void mxsr2msrTranslator::visitEnd (S_system_margins& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_system_dividers& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_system_dividers& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1530,7 +1533,7 @@ void mxsr2msrTranslator::visitStart (S_system_dividers& elt) */ } -void mxsr2msrTranslator::visitStart (S_left_divider& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_left_divider& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1558,7 +1561,7 @@ void mxsr2msrTranslator::visitStart (S_left_divider& elt) printObjectString); } -void mxsr2msrTranslator::visitStart (S_right_divider& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_right_divider& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1587,7 +1590,7 @@ void mxsr2msrTranslator::visitStart (S_right_divider& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_notations& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_notations& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1606,7 +1609,7 @@ void mxsr2msrTranslator::visitStart (S_notations& elt) // JMI } -void mxsr2msrTranslator::visitStart (S_other_notation& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_other_notation& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1626,7 +1629,7 @@ void mxsr2msrTranslator::visitStart (S_other_notation& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_page_layout& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_page_layout& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1650,7 +1653,7 @@ void mxsr2msrTranslator::visitStart (S_page_layout& elt) fOnGoingPageLayout = true; } -void mxsr2msrTranslator::visitEnd (S_page_layout& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_page_layout& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1678,7 +1681,7 @@ void mxsr2msrTranslator::visitEnd (S_page_layout& elt) fOnGoingPageLayout = false; } -void mxsr2msrTranslator::visitStart (S_page_height& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_page_height& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1712,7 +1715,7 @@ void mxsr2msrTranslator::visitStart (S_page_height& elt) } } -void mxsr2msrTranslator::visitStart (S_page_width& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_page_width& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1746,7 +1749,7 @@ void mxsr2msrTranslator::visitStart (S_page_width& elt) } } -void mxsr2msrTranslator::visitStart (S_page_margins& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_page_margins& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1827,7 +1830,7 @@ void mxsr2msrTranslator::visitStart (S_page_margins& elt) fOnGoingPageMargins = true; } -void mxsr2msrTranslator::visitEnd (S_page_margins& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_page_margins& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -1849,7 +1852,7 @@ void mxsr2msrTranslator::visitEnd (S_page_margins& elt) fOnGoingPageMargins = false; } -void mxsr2msrTranslator::visitStart (S_left_margin& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_left_margin& elt) { float leftMargin = (float)(*elt); @@ -1901,7 +1904,7 @@ void mxsr2msrTranslator::visitStart (S_left_margin& elt) } } -void mxsr2msrTranslator::visitStart (S_right_margin& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_right_margin& elt) { float rightMargin = (float)(*elt); @@ -1950,7 +1953,7 @@ void mxsr2msrTranslator::visitStart (S_right_margin& elt) } } -void mxsr2msrTranslator::visitStart (S_top_margin& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_top_margin& elt) { float topMargin = (float)(*elt); @@ -1989,7 +1992,7 @@ void mxsr2msrTranslator::visitStart (S_top_margin& elt) } } -void mxsr2msrTranslator::visitStart (S_bottom_margin& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_bottom_margin& elt) { float bottomMargin = (float)(*elt); @@ -2029,7 +2032,7 @@ void mxsr2msrTranslator::visitStart (S_bottom_margin& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_staff_layout& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_staff_layout& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -2078,7 +2081,7 @@ From DalSegno.xml: JMI there is no ... fOnGoingStaffLayout = true; } -void mxsr2msrTranslator::visitEnd (S_staff_layout& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_staff_layout& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -2100,7 +2103,7 @@ void mxsr2msrTranslator::visitEnd (S_staff_layout& elt) fOnGoingStaffLayout = false; } -void mxsr2msrTranslator::visitStart (S_staff_distance& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_staff_distance& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -2136,7 +2139,7 @@ void mxsr2msrTranslator::visitStart (S_staff_distance& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_measure_layout& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_measure_layout& elt) { #ifdef MF_TRACE_IS_ENABLED if ( @@ -2162,7 +2165,7 @@ void mxsr2msrTranslator::visitStart (S_measure_layout& elt) fOnGoingMeasureLayout = true; } -void mxsr2msrTranslator::visitEnd (S_measure_layout& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_measure_layout& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -2184,7 +2187,7 @@ void mxsr2msrTranslator::visitEnd (S_measure_layout& elt) fOnGoingMeasureLayout = false; } -void mxsr2msrTranslator::visitStart (S_measure_distance& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_measure_distance& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -2220,7 +2223,7 @@ void mxsr2msrTranslator::visitStart (S_measure_distance& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_appearance& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_appearance& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -2339,7 +2342,7 @@ void mxsr2msrTranslator::visitStart (S_appearance& elt) fOnGoingAppearance = true; } -void mxsr2msrTranslator::visitEnd (S_appearance& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_appearance& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -2361,7 +2364,7 @@ void mxsr2msrTranslator::visitEnd (S_appearance& elt) fOnGoingAppearance = false; } -void mxsr2msrTranslator::visitStart (S_line_width& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_line_width& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -2482,7 +2485,7 @@ void mxsr2msrTranslator::visitStart (S_line_width& elt) } } -void mxsr2msrTranslator::visitStart (S_note_size& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_note_size& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -2573,7 +2576,7 @@ void mxsr2msrTranslator::visitStart (S_note_size& elt) } } -void mxsr2msrTranslator::visitStart (S_distance& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_distance& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -2659,7 +2662,7 @@ void mxsr2msrTranslator::visitStart (S_distance& elt) } } -void mxsr2msrTranslator::visitStart (S_glyph& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_glyph& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -2767,7 +2770,7 @@ void mxsr2msrTranslator::visitStart (S_glyph& elt) } } -void mxsr2msrTranslator::visitStart (S_other_appearance& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_other_appearance& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -2796,7 +2799,7 @@ void mxsr2msrTranslator::visitStart (S_other_appearance& elt) } //________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_part& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_part& elt) { // gLog << elt; //JMI v0.9.66 create MusicFormats's own smart pointer type ??? @@ -2948,7 +2951,7 @@ void mxsr2msrTranslator::visitStart (S_part& elt) fCurrentPart-> displayPartVoicesMap ( elt->getInputStartLineNumber (), - "mxsr2msrTranslator::visitStart (S_part& elt)"); + "mxsr2msrSkeletonPopulator::visitStart (S_part& elt)"); } #endif @@ -2960,7 +2963,7 @@ void mxsr2msrTranslator::visitStart (S_part& elt) // display the stave vectors displayCurrentPartStavesVector ( elt->getInputStartLineNumber (), - "mxsr2msrTranslator::visitStart (S_part& elt)"); + "mxsr2msrSkeletonPopulator::visitStart (S_part& elt)"); } #endif @@ -2972,7 +2975,7 @@ void mxsr2msrTranslator::visitStart (S_part& elt) // display the voices vectors displayCurrentPartVoicesVector ( elt->getInputStartLineNumber (), - "mxsr2msrTranslator::visitStart (S_part& elt)"); + "mxsr2msrSkeletonPopulator::visitStart (S_part& elt)"); } #endif @@ -3044,7 +3047,7 @@ void mxsr2msrTranslator::visitStart (S_part& elt) ++gIndenter; } -void mxsr2msrTranslator::visitEnd (S_part& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_part& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3186,7 +3189,7 @@ void mxsr2msrTranslator::visitEnd (S_part& elt) } //________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_attributes& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_attributes& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3209,7 +3212,7 @@ void mxsr2msrTranslator::visitStart (S_attributes& elt) fOnGoingClefKeyTimeSignatureGroup = true; } -void mxsr2msrTranslator::visitEnd (S_attributes& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_attributes& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3245,7 +3248,7 @@ void mxsr2msrTranslator::visitEnd (S_attributes& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_divisions& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_divisions& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3310,7 +3313,7 @@ void mxsr2msrTranslator::visitStart (S_divisions& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_clef& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_clef& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3350,7 +3353,7 @@ void mxsr2msrTranslator::visitStart (S_clef& elt) fCurrentClefSign = ""; } -void mxsr2msrTranslator::visitStart (S_sign& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_sign& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3369,7 +3372,7 @@ void mxsr2msrTranslator::visitStart (S_sign& elt) fCurrentClefSign = elt->getValue(); } -void mxsr2msrTranslator::visitStart (S_line& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_line& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3388,7 +3391,7 @@ void mxsr2msrTranslator::visitStart (S_line& elt) fCurrentClefLine = (int)(*elt); } -void mxsr2msrTranslator::visitStart (S_clef_octave_change& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_clef_octave_change& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3421,7 +3424,7 @@ void mxsr2msrTranslator::visitStart (S_clef_octave_change& elt) } } -void mxsr2msrTranslator::visitEnd (S_clef& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_clef& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3716,7 +3719,7 @@ void mxsr2msrTranslator::visitEnd (S_clef& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_key& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_key& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3762,7 +3765,7 @@ void mxsr2msrTranslator::visitStart (S_key& elt) fCurrentHumdrumScotKeyItem = nullptr; } -void mxsr2msrTranslator::visitStart (S_cancel& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_cancel& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3781,7 +3784,7 @@ void mxsr2msrTranslator::visitStart (S_cancel& elt) fCurrentKeyCancelFifths = (int)(*elt); } -void mxsr2msrTranslator::visitStart (S_fifths& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_fifths& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3802,7 +3805,7 @@ void mxsr2msrTranslator::visitStart (S_fifths& elt) fCurrentKeyFifths = (int)(*elt); } -void mxsr2msrTranslator::visitStart (S_mode& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_mode& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3864,7 +3867,7 @@ void mxsr2msrTranslator::visitStart (S_mode& elt) } } -void mxsr2msrTranslator::visitStart (S_key_step& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_key_step& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3919,7 +3922,7 @@ void mxsr2msrTranslator::visitStart (S_key_step& elt) fCurrentHumdrumScotKeyItem); } -void mxsr2msrTranslator::visitStart (S_key_alter& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_key_alter& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -3974,7 +3977,7 @@ void mxsr2msrTranslator::visitStart (S_key_alter& elt) fCurrentHumdrumScotKeyItem = nullptr; } -void mxsr2msrTranslator::visitStart (S_key_octave& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_key_octave& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4066,7 +4069,7 @@ If the cancel attribute is keyOctaveKind); } -void mxsr2msrTranslator::visitEnd (S_key& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_key& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4121,7 +4124,7 @@ void mxsr2msrTranslator::visitEnd (S_key& elt) } } -S_msrKey mxsr2msrTranslator::handleTraditionalKey ( +S_msrKey mxsr2msrSkeletonPopulator::handleTraditionalKey ( int inputLineNumber) { // key fifths number @@ -4231,7 +4234,7 @@ S_msrKey mxsr2msrTranslator::handleTraditionalKey ( return key; } -S_msrKey mxsr2msrTranslator::handleHumdrumScotKey ( +S_msrKey mxsr2msrSkeletonPopulator::handleHumdrumScotKey ( int inputLineNumber) { // msrQuarterTonesPitch fCurrentNoteQuarterTonesPitch; // JMI BOF @@ -4275,7 +4278,7 @@ S_msrKey mxsr2msrTranslator::handleHumdrumScotKey ( } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_time& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_time& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4336,7 +4339,7 @@ void mxsr2msrTranslator::visitStart (S_time& elt) fOnGoingInterchangeable = false; } -void mxsr2msrTranslator::visitStart (S_beats& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_beats& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4355,7 +4358,7 @@ void mxsr2msrTranslator::visitStart (S_beats& elt) fCurrentTimeSignatureBeats = elt->getValue (); // can be a string such as 3+2 } -void mxsr2msrTranslator::visitStart (S_beat_type& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_beat_type& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4417,7 +4420,7 @@ void mxsr2msrTranslator::visitStart (S_beat_type& elt) timeSignatureItem); } -void mxsr2msrTranslator::visitStart (S_senza_misura& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_senza_misura& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4436,7 +4439,7 @@ void mxsr2msrTranslator::visitStart (S_senza_misura& elt) fCurrentTimeSignatureSymbolKind = msrTimeSignatureSymbolKind::kTimeSignatureSymbolSenzaMisura; } -void mxsr2msrTranslator::visitStart (S_interchangeable& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_interchangeable& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4529,7 +4532,7 @@ void mxsr2msrTranslator::visitStart (S_interchangeable& elt) fOnGoingInterchangeable = true; } -void mxsr2msrTranslator::visitStart (S_time_relation& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_time_relation& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4591,7 +4594,7 @@ void mxsr2msrTranslator::visitStart (S_time_relation& elt) } } -void mxsr2msrTranslator::visitEnd (S_time& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_time& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4671,7 +4674,7 @@ open xmlsamples3.1/Telemann.xml */ -void mxsr2msrTranslator::visitStart (S_score_instrument& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_score_instrument& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4736,7 +4739,7 @@ void mxsr2msrTranslator::visitStart (S_score_instrument& elt) } -void mxsr2msrTranslator::visitStart (S_instrument_name& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_instrument_name& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4759,7 +4762,7 @@ void mxsr2msrTranslator::visitStart (S_instrument_name& elt) // int instruments = (int)(*elt); // JMI } -void mxsr2msrTranslator::visitStart (S_solo& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_solo& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4782,7 +4785,7 @@ void mxsr2msrTranslator::visitStart (S_solo& elt) // int instruments = (int)(*elt); // JMI } -void mxsr2msrTranslator::visitStart (S_instruments& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_instruments& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4843,7 +4846,7 @@ void mxsr2msrTranslator::visitStart (S_instruments& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_transpose& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_transpose& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4867,7 +4870,7 @@ void mxsr2msrTranslator::visitStart (S_transpose& elt) fCurrentTransposeDouble = false; } -void mxsr2msrTranslator::visitStart (S_diatonic& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_diatonic& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4886,7 +4889,7 @@ void mxsr2msrTranslator::visitStart (S_diatonic& elt) fCurrentTransposeDiatonic = (int)(*elt); } -void mxsr2msrTranslator::visitStart (S_chromatic& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_chromatic& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4905,7 +4908,7 @@ void mxsr2msrTranslator::visitStart (S_chromatic& elt) fCurrentTransposeChromatic = (int)(*elt); } -void mxsr2msrTranslator::visitStart (S_octave_change& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_octave_change& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4924,7 +4927,7 @@ void mxsr2msrTranslator::visitStart (S_octave_change& elt) fCurrentTransposeOctaveChange = (int)(*elt); } -void mxsr2msrTranslator::visitStart (S_double& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_double& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -4950,7 +4953,7 @@ void mxsr2msrTranslator::visitStart (S_double& elt) fCurrentTransposeDouble = true; } -void mxsr2msrTranslator::visitEnd (S_transpose& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_transpose& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -5050,7 +5053,7 @@ void mxsr2msrTranslator::visitEnd (S_transpose& elt) } //________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_direction& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_direction& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -5084,7 +5087,7 @@ void mxsr2msrTranslator::visitStart (S_direction& elt) fOnGoingDirection = true; } -void mxsr2msrTranslator::visitEnd (S_direction& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_direction& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -5143,7 +5146,7 @@ void mxsr2msrTranslator::visitEnd (S_direction& elt) } //________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_direction_type& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_direction_type& elt) { /* getTraceMxsrVisitors ()) { @@ -5202,7 +5205,7 @@ void mxsr2msrTranslator::visitEnd (S_direction_type& elt) } //________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_offset& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_offset& elt) { /* mxsr2msrTranslator::handleOnGoingMultiMeasureRestsAtTheEndOfMeasure()" << +// "--> mxsr2msrSkeletonPopulator::handleOnGoingMultiMeasureRestsAtTheEndOfMeasure()" << // std::endl; // // ++gIndenter; @@ -10733,7 +10736,7 @@ void mxsr2msrTranslator::visitEnd (S_measure& elt) // const int fieldWidth = 37; // // gLog << -// "--> mxsr2msrTranslator::handleOnGoingMultiMeasureRestsAtTheEndOfMeasure()" << +// "--> mxsr2msrSkeletonPopulator::handleOnGoingMultiMeasureRestsAtTheEndOfMeasure()" << // ", onGoingMultiMeasureRests:" << // std::endl; // @@ -10752,7 +10755,7 @@ void mxsr2msrTranslator::visitEnd (S_measure& elt) // } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_print& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_print& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -10963,7 +10966,7 @@ Staff spacing between multiple staves is measured in fOnGoingPrint = true; } -void mxsr2msrTranslator::visitEnd (S_print& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_print& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -11007,7 +11010,7 @@ void mxsr2msrTranslator::visitEnd (S_print& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_measure_numbering& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_measure_numbering& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -11027,7 +11030,7 @@ void mxsr2msrTranslator::visitStart (S_measure_numbering& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_barline& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_barline& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -11097,7 +11100,7 @@ void mxsr2msrTranslator::visitStart (S_barline& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_bar_style& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_bar_style& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -11176,7 +11179,7 @@ void mxsr2msrTranslator::visitStart (S_bar_style& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_segno& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_segno& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -11222,7 +11225,7 @@ void mxsr2msrTranslator::visitStart (S_segno& elt) } } -void mxsr2msrTranslator::visitStart (S_coda& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_coda& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -11297,7 +11300,7 @@ void mxsr2msrTranslator::visitStart (S_coda& elt) } } -void mxsr2msrTranslator::visitStart (S_eyeglasses& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_eyeglasses& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -11337,7 +11340,7 @@ void mxsr2msrTranslator::visitStart (S_eyeglasses& elt) } } -void mxsr2msrTranslator::visitStart (S_pedal& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_pedal& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -11468,7 +11471,7 @@ void mxsr2msrTranslator::visitStart (S_pedal& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_ending& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_ending& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -11549,7 +11552,7 @@ void mxsr2msrTranslator::visitStart (S_ending& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_repeat& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_repeat& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -11650,7 +11653,7 @@ void mxsr2msrTranslator::visitStart (S_repeat& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitEnd (S_barline& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_barline& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -12033,7 +12036,7 @@ void mxsr2msrTranslator::visitEnd (S_barline& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_note& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_note& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -12172,7 +12175,7 @@ Controls whether or not spacing is left for an invisible note or object. It is u } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_step& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_step& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -12199,7 +12202,7 @@ void mxsr2msrTranslator::visitStart (S_step& elt) msrDiatonicPitchKindFromChar (step [0]); } -void mxsr2msrTranslator::visitStart (S_alter& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_alter& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -12236,7 +12239,7 @@ void mxsr2msrTranslator::visitStart (S_alter& elt) } } -void mxsr2msrTranslator::visitStart (S_octave& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_octave& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -12275,7 +12278,7 @@ void mxsr2msrTranslator::visitStart (S_octave& elt) octaveNumber); } -void mxsr2msrTranslator::visitStart (S_duration& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_duration& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -12410,10 +12413,10 @@ void mxsr2msrTranslator::visitStart (S_duration& elt) ss.str ()); } -// gLog << "=== mxsr2msrTranslator::visitStart (S_duration& elt), fCurrentNotesDuration: " << fCurrentNotesDuration << std::endl; JMI +// gLog << "=== mxsr2msrSkeletonPopulator::visitStart (S_duration& elt), fCurrentNotesDuration: " << fCurrentNotesDuration << std::endl; JMI } -void mxsr2msrTranslator::visitStart (S_instrument& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_instrument& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -12460,7 +12463,7 @@ void mxsr2msrTranslator::visitStart (S_instrument& elt) // int instruments = (int)(*elt); // JMI } -void mxsr2msrTranslator::visitStart (S_dot& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_dot& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -12479,7 +12482,7 @@ void mxsr2msrTranslator::visitStart (S_dot& elt) ++fCurrentNoteDotsNumber; } -void mxsr2msrTranslator::visitStart (S_type& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_type& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -12548,7 +12551,7 @@ void mxsr2msrTranslator::visitStart (S_type& elt) #endif // MF_TRACE_IS_ENABLED } -void mxsr2msrTranslator::visitStart (S_notehead& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_notehead& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -12689,7 +12692,7 @@ void mxsr2msrTranslator::visitStart (S_notehead& elt) // color JMI v0.9.71 } -void mxsr2msrTranslator::visitStart (S_accidental& elt) // JMI +void mxsr2msrSkeletonPopulator::visitStart (S_accidental& elt) // JMI { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -12861,7 +12864,7 @@ void mxsr2msrTranslator::visitStart (S_accidental& elt) // JMI } } -void mxsr2msrTranslator::visitStart (S_stem& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_stem& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -12934,7 +12937,7 @@ void mxsr2msrTranslator::visitStart (S_stem& elt) stemKind); } -void mxsr2msrTranslator::visitStart (S_beam& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_beam& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -13008,7 +13011,7 @@ void mxsr2msrTranslator::visitStart (S_beam& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_measure_style& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_measure_style& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -13027,7 +13030,7 @@ void mxsr2msrTranslator::visitStart (S_measure_style& elt) // color JMI } -void mxsr2msrTranslator::visitStart (S_beat_repeat& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_beat_repeat& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -13076,7 +13079,7 @@ void mxsr2msrTranslator::visitStart (S_beat_repeat& elt) useDotsString); } -void mxsr2msrTranslator::visitStart (S_measure_repeat& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_measure_repeat& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -13188,7 +13191,7 @@ void mxsr2msrTranslator::visitStart (S_measure_repeat& elt) } } -void mxsr2msrTranslator::visitStart (S_multiple_rest& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_multiple_rest& elt) { /* mxsr2msrTranslator::handleTupletContinue() 1: adding tuplet member note " << + "--> mxsr2msrSkeletonPopulator::handleTupletContinue() 1: adding tuplet member note " << note->asShortString () << " to stack top tuplet " << tupletStackTop->asString () << @@ -21147,12 +21150,12 @@ void mxsr2msrTranslator::handleTupletContinue ( // if (gTraceOahGroup->getTraceTupletsDetails ()) { // voiceHandler-> // displayTupletsStack ( -// "############## mxsr2msrTranslator:kTupletTypeContinue"); +// "############## mxsr2msrSkeletonPopulator:kTupletTypeContinue"); // } // if (gTraceOahGroup->getTraceTupletsDetails ()) { // voiceHandler-> // displayVoicesTupletsStacksMap ( -// "############## mxsr2msrTranslator:kTupletTypeContinue"); +// "############## mxsr2msrSkeletonPopulator:kTupletTypeContinue"); // } // #endif // MF_TRACE_IS_ENABLED } @@ -21179,12 +21182,12 @@ void mxsr2msrTranslator::handleTupletContinue ( // #ifdef MF_TRACE_IS_ENABLED // if (gTraceOahGroup->getTraceTupletsDetails ()) { // displayLastHandledTupletInVoiceMap ( -// "############## mxsr2msrTranslator:handleTupletContinue() 3"); +// "############## mxsr2msrSkeletonPopulator:handleTupletContinue() 3"); // } // #endif // MF_TRACE_IS_ENABLED } -void mxsr2msrTranslator::handleTupletStop ( +void mxsr2msrSkeletonPopulator::handleTupletStop ( const S_msrNote& note, const S_msrVoice& currentNoteVoice) { @@ -21238,7 +21241,7 @@ void mxsr2msrTranslator::handleTupletStop ( #ifdef MF_TRACE_IS_ENABLED if (gTraceOahGroup->getTraceTuplets ()) { gLog << - "--> mxsr2msrTranslator::handleTupletStop(): adding tuplet member note " << + "--> mxsr2msrSkeletonPopulator::handleTupletStop(): adding tuplet member note " << note->asShortString () << " to stack top tuplet " << tupletStackTop->asString () << @@ -21261,12 +21264,12 @@ void mxsr2msrTranslator::handleTupletStop ( // if (gTraceOahGroup->getTraceTupletsDetails ()) { // voiceHandler-> // displayTupletsStack ( -// "############## mxsr2msrTranslator:kTupletTypeContinue"); +// "############## mxsr2msrSkeletonPopulator:kTupletTypeContinue"); // } // if (gTraceOahGroup->getTraceTupletsDetails ()) { // voiceHandler-> // displayVoicesTupletsStacksMap ( -// "############## mxsr2msrTranslator:kTupletTypeContinue"); +// "############## mxsr2msrSkeletonPopulator:kTupletTypeContinue"); // } // #endif // MF_TRACE_IS_ENABLED } @@ -21293,23 +21296,23 @@ void mxsr2msrTranslator::handleTupletStop ( // #ifdef MF_TRACE_IS_ENABLED // if (gTraceOahGroup->getTraceTupletsDetails ()) { // displayLastHandledTupletInVoiceMap ( -// "############## mxsr2msrTranslator:handleTupletStop() 2"); +// "############## mxsr2msrSkeletonPopulator:handleTupletStop() 2"); // } // #endif // MF_TRACE_IS_ENABLED } -void mxsr2msrTranslator::reduceTupletStackTop ( +void mxsr2msrSkeletonPopulator::reduceTupletStackTop ( const S_msrNote& note, const S_msrVoice& currentNoteVoice) { // #ifdef MF_TRACE_IS_ENABLED // if (gTraceOahGroup->getTraceTupletsDetails ()) { // displayTupletsStack ( -// "############## mxsr2msrTranslator:reduceTupletStackTop() 1"); +// "############## mxsr2msrSkeletonPopulator:reduceTupletStackTop() 1"); // } // if (gTraceOahGroup->getTraceTupletsDetails ()) { // displayVoicesTupletsStacksMap ( -// "############## mxsr2msrTranslator:reduceTupletStackTop() 1"); +// "############## mxsr2msrSkeletonPopulator:reduceTupletStackTop() 1"); // } // #endif // MF_TRACE_IS_ENABLED @@ -21350,7 +21353,7 @@ void mxsr2msrTranslator::reduceTupletStackTop ( #ifdef MF_TRACE_IS_ENABLED if (gTraceOahGroup->getTraceTupletsBasics ()) { gLog << - "--> mxsr2msrTranslator::reduceTupletStackTop() 4, note " << + "--> mxsr2msrSkeletonPopulator::reduceTupletStackTop() 4, note " << note->asShortString () << " to stack top tuplet " << tupletStackTop->asString () << @@ -21361,7 +21364,7 @@ void mxsr2msrTranslator::reduceTupletStackTop ( } #endif // MF_TRACE_IS_ENABLED - if (! fThereIsAPendingTupletStop) { + if (! fThereIsAPendingTupletStop) { // CHORD_TUP // JMI v0.9.70 tuplet stop not on last chord member // see ChordsInTupletWithTupletStopNotOnTheChordLastNote.xml @@ -21378,12 +21381,12 @@ void mxsr2msrTranslator::reduceTupletStackTop ( // if (gTraceOahGroup->getTraceTupletsDetails ()) { // voiceHandler-> // displayTupletsStack ( -// "############## mxsr2msrTranslator:kTupletTypeStop, outer-most"); +// "############## mxsr2msrSkeletonPopulator:kTupletTypeStop, outer-most"); // } // if (gTraceOahGroup->getTraceTupletsDetails ()) { // voiceHandler-> // displayVoicesTupletsStacksMap ( -// "############## mxsr2msrTranslator:kTupletTypeStop, outer-most"); +// "############## mxsr2msrSkeletonPopulator:kTupletTypeStop, outer-most"); // } // #endif // MF_TRACE_IS_ENABLED @@ -21391,16 +21394,16 @@ void mxsr2msrTranslator::reduceTupletStackTop ( #ifdef MF_TRACE_IS_ENABLED if (gTraceOahGroup->getTraceTupletsBasics ()) { gLog << - "--> mxsr2msrTranslator::reduceTupletStackTop(): finalizing pending tuplet stack top" << + "--> mxsr2msrSkeletonPopulator::reduceTupletStackTop(): finalizing pending tuplet stack top" << ", line " << note->getInputStartLineNumber () << std::endl; } #endif // MF_TRACE_IS_ENABLED voiceHandler-> - finalizeTupletStackTopAndPopItFromTupletsStack ( // JMI v0.9.71 + finalizeTupletStackTopAndPopItFromTupletsStack ( // JMI v0.9.71 // CHORD_TUP note->getInputStartLineNumber (), - "mxsr2msrTranslator:reduceTupletStackTop() 4"); + "mxsr2msrSkeletonPopulator:reduceTupletStackTop() 4"); // don't pop the inner-most tuplet from the stack yet // voiceHandler->getTupletsStack ().pop_front (); // JMI DEDIEUDIEU @@ -21421,7 +21424,7 @@ void mxsr2msrTranslator::reduceTupletStackTop ( voiceHandler-> finalizeTupletStackTopAndPopItFromTupletsStack ( // JMI v0.9.71 note->getInputStartLineNumber (), - "mxsr2msrTranslator:reduceTupletStackTop() 6"); + "mxsr2msrSkeletonPopulator:reduceTupletStackTop() 6"); S_msrTuplet tupletStackTop = @@ -21431,7 +21434,7 @@ void mxsr2msrTranslator::reduceTupletStackTop ( #ifdef MF_TRACE_IS_ENABLED if (gTraceOahGroup->getTraceTuplets ()) { gLog << - "--> mxsr2msrTranslator:reduceTupletStackTop(): adding nested tuplet member note " << + "--> mxsr2msrSkeletonPopulator:reduceTupletStackTop(): adding nested tuplet member note " << note->asShortString () << " to stack top tuplet " << tupletStackTop->asString () << @@ -21459,19 +21462,19 @@ void mxsr2msrTranslator::reduceTupletStackTop ( // #ifdef MF_TRACE_IS_ENABLED // if (gTraceOahGroup->getTraceTupletsDetails ()) { // displayLastHandledTupletInVoiceMap ( -// "############## mxsr2msrTranslator:reduceTupletStackTop() 2"); +// "############## mxsr2msrSkeletonPopulator:reduceTupletStackTop() 2"); // } // #endif // MF_TRACE_IS_ENABLED // forget about the pending tuplet stop - fThereIsAPendingTupletStop = false; + fThereIsAPendingTupletStop = false; // CHORD_TUP fNoteWithThePendingTupletStop = nullptr; fVoiceOfTheNoteWithThePendingTupletStop = nullptr; } //______________________________________________________________________________ -void mxsr2msrTranslator::attachCurrentArticulationsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachCurrentArticulationsToCurrentNote () { // attach the current articulations if any to the fCurrentNote #ifdef MF_TRACE_IS_ENABLED @@ -21517,7 +21520,7 @@ void mxsr2msrTranslator::attachCurrentArticulationsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachCurrentTechnicalsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachCurrentTechnicalsToCurrentNote () { // attach the current technicals to the note #ifdef MF_TRACE_IS_ENABLED @@ -21562,7 +21565,7 @@ void mxsr2msrTranslator::attachCurrentTechnicalsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachCurrentTechnicalWithIntegersToCurrentNote () +void mxsr2msrSkeletonPopulator::attachCurrentTechnicalWithIntegersToCurrentNote () { // attach the current technicals to the note #ifdef MF_TRACE_IS_ENABLED @@ -21607,7 +21610,7 @@ void mxsr2msrTranslator::attachCurrentTechnicalWithIntegersToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachCurrentTechnicalWithFloatsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachCurrentTechnicalWithFloatsToCurrentNote () { // attach the current technicals to the note #ifdef MF_TRACE_IS_ENABLED @@ -21652,7 +21655,7 @@ if (gTraceOahGroup->getTraceTechnicals ()) { } //______________________________________________________________________________ -void mxsr2msrTranslator::attachCurrentTechnicalWithStringsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachCurrentTechnicalWithStringsToCurrentNote () { // attach the current technicals to the note #ifdef MF_TRACE_IS_ENABLED @@ -21697,7 +21700,7 @@ void mxsr2msrTranslator::attachCurrentTechnicalWithStringsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachCurrentOrnamentsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachCurrentOrnamentsToCurrentNote () { // attach the current ornaments to the note #ifdef MF_TRACE_IS_ENABLED @@ -21743,7 +21746,7 @@ void mxsr2msrTranslator::attachCurrentOrnamentsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachCurrentSpannersToNote ( +void mxsr2msrSkeletonPopulator::attachCurrentSpannersToNote ( const S_msrNote& note, const std::string& context) { @@ -21870,7 +21873,7 @@ void mxsr2msrTranslator::attachCurrentSpannersToNote ( } //______________________________________________________________________________ -void mxsr2msrTranslator::attachCurrentSingleTremoloToCurrentNote () +void mxsr2msrSkeletonPopulator::attachCurrentSingleTremoloToCurrentNote () { // attach the current singleTremolo to the note #ifdef MF_TRACE_IS_ENABLED @@ -21901,7 +21904,7 @@ void mxsr2msrTranslator::attachCurrentSingleTremoloToCurrentNote () //______________________________________________________________________________ /* JMI -void mxsr2msrTranslator::attachCurrentArticulationsToChord ( // JMI +void mxsr2msrSkeletonPopulator::attachCurrentArticulationsToChord ( // JMI const S_msrChord& chord) { if (fCurrentArticulations.size ()) { @@ -21942,7 +21945,7 @@ void mxsr2msrTranslator::attachCurrentArticulationsToChord ( // JMI /* //______________________________________________________________________________ -void mxsr2msrTranslator::attachCurrentOrnamentsToChord ( // JMI +void mxsr2msrSkeletonPopulator::attachCurrentOrnamentsToChord ( // JMI const S_msrChord& chord) { if (fCurrentOrnamentsList.size ()) { @@ -21982,7 +21985,7 @@ void mxsr2msrTranslator::attachCurrentOrnamentsToChord ( // JMI */ //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingTemposToVoice ( +void mxsr2msrSkeletonPopulator::attachPendingTemposToVoice ( const S_msrVoice& voice) { // attach the pending tempos if any to the voice @@ -22015,7 +22018,7 @@ void mxsr2msrTranslator::attachPendingTemposToVoice ( } } -void mxsr2msrTranslator::attachPendingTemposToPart ( +void mxsr2msrSkeletonPopulator::attachPendingTemposToPart ( const S_msrPart& part) { // attach the pending tempos if any to the voice @@ -22046,7 +22049,7 @@ void mxsr2msrTranslator::attachPendingTemposToPart ( } // while } -// void mxsr2msrTranslator::attachPendingBarLinesToVoice ( +// void mxsr2msrSkeletonPopulator::attachPendingBarLinesToVoice ( // const S_msrVoice& voice) // { // // attach the pending barlines if any to the voice @@ -22082,7 +22085,7 @@ void mxsr2msrTranslator::attachPendingTemposToPart ( // } // } -void mxsr2msrTranslator::attachPendingBarLinesToPart ( +void mxsr2msrSkeletonPopulator::attachPendingBarLinesToPart ( const S_msrPart& part) { // attach the pending barlines if any to the voice @@ -22116,7 +22119,7 @@ void mxsr2msrTranslator::attachPendingBarLinesToPart ( } // while } -// void mxsr2msrTranslator::attachPendingRehearsalMarksToVoice ( +// void mxsr2msrSkeletonPopulator::attachPendingRehearsalMarksToVoice ( // const S_msrVoice& voice) // { // // attach the pending rehearsals to the note @@ -22147,7 +22150,7 @@ void mxsr2msrTranslator::attachPendingBarLinesToPart ( // } // while // } -void mxsr2msrTranslator::attachPendingRehearsalMarksToPart ( +void mxsr2msrSkeletonPopulator::attachPendingRehearsalMarksToPart ( const S_msrPart& part) { // attach the pending rehearsals to the note @@ -22178,7 +22181,7 @@ void mxsr2msrTranslator::attachPendingRehearsalMarksToPart ( } // while } -void mxsr2msrTranslator::attachPendingLineBreaksToPart ( +void mxsr2msrSkeletonPopulator::attachPendingLineBreaksToPart ( const S_msrPart& part) { // attach the pending line breaks to the note @@ -22211,7 +22214,7 @@ void mxsr2msrTranslator::attachPendingLineBreaksToPart ( } // while } -void mxsr2msrTranslator::attachPendingPageBreaksToPart ( +void mxsr2msrSkeletonPopulator::attachPendingPageBreaksToPart ( const S_msrPart& part) { // attach the pending page breaks to the note @@ -22245,7 +22248,7 @@ void mxsr2msrTranslator::attachPendingPageBreaksToPart ( } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingTiesToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingTiesToCurrentNote () { // attach the pending ties to the note #ifdef MF_TRACE_IS_ENABLED @@ -22274,7 +22277,7 @@ void mxsr2msrTranslator::attachPendingTiesToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingSegnosToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingSegnosToCurrentNote () { // attach the pending segno to the note #ifdef MF_TRACE_IS_ENABLED @@ -22303,7 +22306,7 @@ void mxsr2msrTranslator::attachPendingSegnosToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingDalSegnosToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingDalSegnosToCurrentNote () { // attach the pending dal segno to the note #ifdef MF_TRACE_IS_ENABLED @@ -22331,7 +22334,7 @@ void mxsr2msrTranslator::attachPendingDalSegnosToCurrentNote () } // while } -void mxsr2msrTranslator::attachPendingDalSegnosToChord ( +void mxsr2msrSkeletonPopulator::attachPendingDalSegnosToChord ( const S_msrChord& chord) { // attach the pending dal segno if any to the chord @@ -22362,7 +22365,7 @@ void mxsr2msrTranslator::attachPendingDalSegnosToChord ( } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingCodasToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingCodasToCurrentNote () { // attach the pending coda to the note #ifdef MF_TRACE_IS_ENABLED @@ -22391,7 +22394,7 @@ void mxsr2msrTranslator::attachPendingCodasToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingCrescDecrescsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingCrescDecrescsToCurrentNote () { // attach the pending crescDecresc to the note #ifdef MF_TRACE_IS_ENABLED @@ -22420,7 +22423,7 @@ void mxsr2msrTranslator::attachPendingCrescDecrescsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingEyeGlassesToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingEyeGlassesToCurrentNote () { // attach the pending eyeglasses to the note #ifdef MF_TRACE_IS_ENABLED @@ -22449,7 +22452,7 @@ void mxsr2msrTranslator::attachPendingEyeGlassesToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingDampsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingDampsToCurrentNote () { // attach the pending damps to the note #ifdef MF_TRACE_IS_ENABLED @@ -22478,7 +22481,7 @@ void mxsr2msrTranslator::attachPendingDampsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingDampAllsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingDampAllsToCurrentNote () { // attach the pending damp alls to the note #ifdef MF_TRACE_IS_ENABLED @@ -22507,7 +22510,7 @@ void mxsr2msrTranslator::attachPendingDampAllsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingOctaveShiftsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingOctaveShiftsToCurrentNote () { // attach the pending octave shifts to the note #ifdef MF_TRACE_IS_ENABLED @@ -22536,7 +22539,7 @@ void mxsr2msrTranslator::attachPendingOctaveShiftsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingScordaturasToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingScordaturasToCurrentNote () { // attach the pending scordatura to the note #ifdef MF_TRACE_IS_ENABLED @@ -22565,7 +22568,7 @@ void mxsr2msrTranslator::attachPendingScordaturasToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingDynamicsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingDynamicsToCurrentNote () { // attach the pending dynamics to the note Bool delayAttachment (false); @@ -22633,7 +22636,7 @@ void mxsr2msrTranslator::attachPendingDynamicsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingOtherDynamicsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingOtherDynamicsToCurrentNote () { // attach the pending other dynamics to the note Bool delayAttachment (false); @@ -22701,7 +22704,7 @@ void mxsr2msrTranslator::attachPendingOtherDynamicsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingWordsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingWordsToCurrentNote () { // attach the pending words to the note Bool delayAttachment; @@ -22769,7 +22772,7 @@ void mxsr2msrTranslator::attachPendingWordsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingBeamsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingBeamsToCurrentNote () { // attach the pending beams to the note Bool delayAttachment (false); @@ -22837,7 +22840,7 @@ void mxsr2msrTranslator::attachPendingBeamsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingSlursToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingSlursToCurrentNote () { // attach the pending slurs to the note Bool delayAttachment (false); @@ -22901,7 +22904,7 @@ void mxsr2msrTranslator::attachPendingSlursToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingLigaturesToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingLigaturesToCurrentNote () { // attach the pending ligatures to the note #ifdef MF_TRACE_IS_ENABLED @@ -23094,7 +23097,7 @@ void mxsr2msrTranslator::attachPendingLigaturesToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingPedalsToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingPedalsToCurrentNote () { // attach the pending pedals to the note Bool delayAttachment (false); @@ -23158,7 +23161,7 @@ void mxsr2msrTranslator::attachPendingPedalsToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingSlashesToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingSlashesToCurrentNote () { // attach the pending slashes to the note Bool delayAttachment (false); @@ -23222,7 +23225,7 @@ void mxsr2msrTranslator::attachPendingSlashesToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingWedgesToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingWedgesToCurrentNote () { // attach the pending wedges to the note Bool delayAttachment (false); @@ -23286,7 +23289,7 @@ void mxsr2msrTranslator::attachPendingWedgesToCurrentNote () } // //______________________________________________________________________________ -// void mxsr2msrTranslator::attachPendingVoicesWedgesToCurrentNoteIfRelevant ( // superflous??? JMI v0.9.71 +// void mxsr2msrSkeletonPopulator::attachPendingVoicesWedgesToCurrentNoteIfRelevant ( // superflous??? JMI v0.9.71 // int theVoiceNumber) // { // // attach the pending wedges to the note @@ -23361,7 +23364,7 @@ void mxsr2msrTranslator::attachPendingWedgesToCurrentNote () // } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingGlissandosToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingGlissandosToCurrentNote () { // attach the pending glissandos to the note #ifdef MF_TRACE_IS_ENABLED @@ -23421,7 +23424,7 @@ void mxsr2msrTranslator::attachPendingGlissandosToCurrentNote () } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingSlidesToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingSlidesToCurrentNote () { // attach the pending slides to the note #ifdef MF_TRACE_IS_ENABLED @@ -23527,7 +23530,7 @@ void mxsr2msrTranslator::attachPendingSlidesToCurrentNote () } // while } -// void mxsr2msrTranslator::attachPendingVoiceLevelElementsToVoice ( +// void mxsr2msrSkeletonPopulator::attachPendingVoiceLevelElementsToVoice ( // const S_msrVoice& voice) // { // // JMI @@ -23568,7 +23571,7 @@ void mxsr2msrTranslator::attachPendingSlidesToCurrentNote () // // } // } -void mxsr2msrTranslator::attachPendingPartLevelElementsIfAnyToPart ( // JMI v0.9.63 +void mxsr2msrSkeletonPopulator::attachPendingPartLevelElementsIfAnyToPart ( // JMI v0.9.63 const S_msrPart& part) { /* JMI @@ -23601,7 +23604,7 @@ void mxsr2msrTranslator::attachPendingPartLevelElementsIfAnyToPart ( // JMI v0.9 } } -void mxsr2msrTranslator::attachPendingNoteLevelElementsIfAnyToCurrentNote () +void mxsr2msrSkeletonPopulator::attachPendingNoteLevelElementsIfAnyToCurrentNote () { // attach the pending ties, if any, to the note if (fPendingTiesList.size ()) { @@ -23711,7 +23714,7 @@ void mxsr2msrTranslator::attachPendingNoteLevelElementsIfAnyToCurrentNote () } //______________________________________________________________________________ -S_msrNote mxsr2msrTranslator::createNote ( +S_msrNote mxsr2msrSkeletonPopulator::createNote ( int inputLineNumber) { #ifdef MF_TRACE_IS_ENABLED @@ -24134,7 +24137,7 @@ S_msrNote mxsr2msrTranslator::createNote ( } //______________________________________________________________________________ -void mxsr2msrTranslator::populateCurrentNoteBeforeItIsHandled ( +void mxsr2msrSkeletonPopulator::populateCurrentNoteBeforeItIsHandled ( int inputLineNumber) { // set current note's color if relevant @@ -24206,7 +24209,7 @@ void mxsr2msrTranslator::populateCurrentNoteBeforeItIsHandled ( fCurrentNote-> setMeasureElementSoundingWholeNotes ( fCurrentNoteDisplayWholeNotesFromType, - "mxsr2msrTranslator::populateCurrentNoteBeforeItIsHandled()"); + "mxsr2msrSkeletonPopulator::populateCurrentNoteBeforeItIsHandled()"); break; case msrNoteKind::kNoteRegularInGraceNotesGroup: @@ -24307,7 +24310,7 @@ void mxsr2msrTranslator::populateCurrentNoteBeforeItIsHandled ( } } -void mxsr2msrTranslator::populateCurrentNoteAfterItHasBeenHandled ( +void mxsr2msrSkeletonPopulator::populateCurrentNoteAfterItHasBeenHandled ( int inputLineNumber) // JMI v0.9.67 { // attach the regular pending elements (not dal segnos), if any, to fCurrentNote @@ -24316,7 +24319,7 @@ void mxsr2msrTranslator::populateCurrentNoteAfterItHasBeenHandled ( } //______________________________________________________________________________ -Bool mxsr2msrTranslator::thereIsAStaffChange ( +Bool mxsr2msrSkeletonPopulator::thereIsAStaffChange ( int inputLineNumber) { Bool result (false); @@ -24415,7 +24418,7 @@ Bool mxsr2msrTranslator::thereIsAStaffChange ( } //______________________________________________________________________________ -void mxsr2msrTranslator::populateCurrentNoteAndAppendItToCurrentRecipientVoice ( +void mxsr2msrSkeletonPopulator::populateCurrentNoteAndAppendItToCurrentRecipientVoice ( int inputLineNumber) { #ifdef MF_TRACE_IS_ENABLED @@ -24534,7 +24537,7 @@ void mxsr2msrTranslator::populateCurrentNoteAndAppendItToCurrentRecipientVoice ( // } // is there a pending tuplet stop? -// if (fThereIsAPendingTupletStop) { +// if (fThereIsAPendingTupletStop) { // CHORD_TUP // // handle the tuplet stop // handleTupletStop ( // fNoteWithThePendingTupletStop, @@ -24550,7 +24553,7 @@ void mxsr2msrTranslator::populateCurrentNoteAndAppendItToCurrentRecipientVoice ( } // // is there a pending tuplet stop? -// if (false && fThereIsAPendingTupletStop) { +// if (false && fThereIsAPendingTupletStop) { // CHORD_TUP // // handle the tuplet stop // handleTupletStop ( // fNoteWithThePendingTupletStop, @@ -24603,7 +24606,7 @@ void mxsr2msrTranslator::populateCurrentNoteAndAppendItToCurrentRecipientVoice ( } //______________________________________________________________________________ -void mxsr2msrTranslator::attachPendingGraceNotesGroupToNoteIfRelevant ( +void mxsr2msrSkeletonPopulator::attachPendingGraceNotesGroupToNoteIfRelevant ( int inputLineNumber) { // is there a pending grace notes group? @@ -24696,7 +24699,7 @@ void mxsr2msrTranslator::attachPendingGraceNotesGroupToNoteIfRelevant ( } //______________________________________________________________________________ -// void mxsr2msrTranslator::handleBackup ( +// void mxsr2msrSkeletonPopulator::handleBackup ( // int inputLineNumber) // { // #ifdef MF_TRACE_IS_ENABLED @@ -24770,7 +24773,7 @@ void mxsr2msrTranslator::attachPendingGraceNotesGroupToNoteIfRelevant ( // } //______________________________________________________________________________ -// void mxsr2msrTranslator::handleForward ( +// void mxsr2msrSkeletonPopulator::handleForward ( // int inputLineNumber) // { // #ifdef MF_TRACE_IS_ENABLED @@ -24844,7 +24847,7 @@ void mxsr2msrTranslator::attachPendingGraceNotesGroupToNoteIfRelevant ( // } //______________________________________________________________________________ -void mxsr2msrTranslator::visitEnd (S_note& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_note& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -24967,7 +24970,7 @@ void mxsr2msrTranslator::visitEnd (S_note& elt) displayStaffAndVoiceInformation ( elt->getInputStartLineNumber (), - "mxsr2msrTranslator::visitEnd (S_note& elt)"); + "mxsr2msrSkeletonPopulator::visitEnd (S_note& elt)"); } #endif // MF_TRACE_IS_ENABLED @@ -25067,7 +25070,7 @@ void mxsr2msrTranslator::visitEnd (S_note& elt) displayStaffAndVoiceInformation ( elt->getInputStartLineNumber (), - "mxsr2msrTranslator::visitEnd (S_note& elt)"); + "mxsr2msrSkeletonPopulator::visitEnd (S_note& elt)"); } #endif // MF_TRACE_IS_ENABLED @@ -25233,7 +25236,7 @@ void mxsr2msrTranslator::visitEnd (S_note& elt) __FILE__, __LINE__, ss.str ()); - displayPendingHarmoniesList ("mxsr2msrTranslator::visitEnd (S_note& elt)"); + displayPendingHarmoniesList ("mxsr2msrSkeletonPopulator::visitEnd (S_note& elt)"); } #endif // MF_TRACE_IS_ENABLED } @@ -25313,7 +25316,7 @@ void mxsr2msrTranslator::visitEnd (S_note& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::handlePendingHarmonies () +void mxsr2msrSkeletonPopulator::handlePendingHarmonies () { switch (fPendingHarmoniesList.size ()) { case 0: @@ -25336,7 +25339,7 @@ void mxsr2msrTranslator::handlePendingHarmonies () fHarmoniesVoicesCounter = 0; } -void mxsr2msrTranslator::handlePendingSingleHarmony ( +void mxsr2msrSkeletonPopulator::handlePendingSingleHarmony ( const S_msrHarmony& harmony) { msrWholeNotes @@ -25504,7 +25507,7 @@ void mxsr2msrTranslator::handlePendingSingleHarmony ( } } -void mxsr2msrTranslator::handlePendingMultipleHarmonies () +void mxsr2msrSkeletonPopulator::handlePendingMultipleHarmonies () { msrWholeNotes currentNoteSoundingWholeNotes = @@ -25670,7 +25673,7 @@ void mxsr2msrTranslator::handlePendingMultipleHarmonies () previousHarmony-> setHarmonySoundingWholeNotes ( currentHarmonySoundingWholeNotes, - "mxsr2msrTranslator::handlePendingMultipleHarmonies() 3, first to next to last harmony"); + "mxsr2msrSkeletonPopulator::handlePendingMultipleHarmonies() 3, first to next to last harmony"); // remember the currentHarmony's whole notes offset as previous previousWholeNotesOffsetInTheLoop = currentHarmonyWholeNotesOffset; @@ -25680,7 +25683,7 @@ void mxsr2msrTranslator::handlePendingMultipleHarmonies () currentHarmony-> setHarmonyDisplayWholeNotes ( currentNoteDisplayWholeNotes, - "mxsr2msrTranslator::handlePendingMultipleHarmonies() 4, first to next to last harmony"); + "mxsr2msrSkeletonPopulator::handlePendingMultipleHarmonies() 4, first to next to last harmony"); // set the currentHarmony's tuplet factor // JMI v0.9.67 currentHarmony-> @@ -25766,17 +25769,17 @@ void mxsr2msrTranslator::handlePendingMultipleHarmonies () lastHarmony-> setHarmonySoundingWholeNotes ( lastHarmonySoundingWholeNotes, - "mxsr2msrTranslator::handlePendingMultipleHarmonies() 5, last harmony in the list"); + "mxsr2msrSkeletonPopulator::handlePendingMultipleHarmonies() 5, last harmony in the list"); // set the display whole notes of the last harmony in the list lastHarmony-> setHarmonyDisplayWholeNotes ( currentNoteDisplayWholeNotes, - "mxsr2msrTranslator::handlePendingMultipleHarmonies() 6, last harmony in the list"); + "mxsr2msrSkeletonPopulator::handlePendingMultipleHarmonies() 6, last harmony in the list"); #ifdef MF_TRACE_IS_ENABLED if (gTraceOahGroup->getTraceHarmonies ()) { - displayPendingHarmoniesList ("mxsr2msrTranslator::handlePendingMultipleHarmonies() 7"); + displayPendingHarmoniesList ("mxsr2msrSkeletonPopulator::handlePendingMultipleHarmonies() 7"); } #endif // MF_TRACE_IS_ENABLED @@ -25797,7 +25800,7 @@ void mxsr2msrTranslator::handlePendingMultipleHarmonies () } } -void mxsr2msrTranslator::displayPendingHarmoniesList ( +void mxsr2msrSkeletonPopulator::displayPendingHarmoniesList ( std::string context) { gLog << @@ -25826,7 +25829,7 @@ void mxsr2msrTranslator::displayPendingHarmoniesList ( } //______________________________________________________________________________ -void mxsr2msrTranslator::handlePendingFiguredBasses () +void mxsr2msrSkeletonPopulator::handlePendingFiguredBasses () { switch (fPendingFiguredBassesList.size ()) { case 0: @@ -25849,7 +25852,7 @@ void mxsr2msrTranslator::handlePendingFiguredBasses () fFiguredBassVoicesCounter = 0; } -void mxsr2msrTranslator::handlePendingSingleFiguredBass ( +void mxsr2msrSkeletonPopulator::handlePendingSingleFiguredBass ( const S_msrFiguredBass& figuredBass) { // set figuredBass's sounding whole notes @@ -25885,7 +25888,7 @@ void mxsr2msrTranslator::handlePendingSingleFiguredBass ( fCurrentNote->getMeasureElementMeasurePosition ()); } -void mxsr2msrTranslator::handlePendingMultipleFiguredBasses () +void mxsr2msrSkeletonPopulator::handlePendingMultipleFiguredBasses () { msrWholeNotes currentNoteSoundingWholeNotes = @@ -25949,7 +25952,7 @@ void mxsr2msrTranslator::handlePendingMultipleFiguredBasses () currentFiguredBass-> setFiguredBassSoundingWholeNotes ( figuredBassSoundingWholeNotes, - "mxsr2msrTranslator::handlePendingMultipleFiguredBasses() 3"); + "mxsr2msrSkeletonPopulator::handlePendingMultipleFiguredBasses() 3"); // set the currentFiguredBass's display whole notes currentFiguredBass-> @@ -25978,7 +25981,7 @@ void mxsr2msrTranslator::handlePendingMultipleFiguredBasses () #endif // MF_TRACE_IS_ENABLED } -void mxsr2msrTranslator::displayPendingFiguredBassesList ( +void mxsr2msrSkeletonPopulator::displayPendingFiguredBassesList ( std::string context) { gLog << @@ -25997,7 +26000,7 @@ void mxsr2msrTranslator::displayPendingFiguredBassesList ( } //______________________________________________________________________________ -void mxsr2msrTranslator::handleNonChordNorTupletNoteOrRest () +void mxsr2msrSkeletonPopulator::handleNonChordNorTupletNoteOrRest () { ++gIndenter; @@ -26408,7 +26411,7 @@ void mxsr2msrTranslator::handleNonChordNorTupletNoteOrRest () } //______________________________________________________________________________ -void mxsr2msrTranslator::handleLyricsForCurrentNoteAfterItHasBeenHandled () +void mxsr2msrSkeletonPopulator::handleLyricsForCurrentNoteAfterItHasBeenHandled () { int currentNoteInputLineNumber = fCurrentNote->getInputStartLineNumber (); @@ -26587,7 +26590,7 @@ void mxsr2msrTranslator::handleLyricsForCurrentNoteAfterItHasBeenHandled () } //______________________________________________________________________________ -void mxsr2msrTranslator::handleNoteBelongingToAChord ( +void mxsr2msrSkeletonPopulator::handleNoteBelongingToAChord ( const S_msrNote& newChordNote) { int newChodeNoteInputLineNumber = @@ -26780,7 +26783,7 @@ void mxsr2msrTranslator::handleNoteBelongingToAChord ( #ifdef MF_TRACE_IS_ENABLED if (gTraceOahGroup->getTraceChords ()) { gLog << - "mxsr2msrTranslator::handleNoteBelongingToAChord()" << + "mxsr2msrSkeletonPopulator::handleNoteBelongingToAChord()" << ", chordFirstNote:" << std::endl; @@ -26899,9 +26902,10 @@ void mxsr2msrTranslator::handleNoteBelongingToAChord ( std::stringstream ss; ss << - "Appending chord " << fCurrentChord << + "Appending chord " << fCurrentChord->asString () << " to voice \"" << - fCurrentPartVoicesVector [fVoiceNumberToInsertInto]->getVoiceName () << + fCurrentPartVoicesVector [ + fVoiceNumberToInsertInto]->getVoiceName () << "\""; gWaeHandler->waeTrace ( @@ -26942,7 +26946,7 @@ void mxsr2msrTranslator::handleNoteBelongingToAChord ( chord-> setMeasureElementSoundingWholeNotes ( // ??? JMI chordFirstNoteSoundingWholeNotes, - "mxsr2msrTranslator::handleNoteBelongingToAChord()"); + "mxsr2msrSkeletonPopulator::handleNoteBelongingToAChord()"); */ if (chordFirstNote->getNoteIsFirstNoteInADoubleTremolo ()) { @@ -27079,7 +27083,7 @@ void mxsr2msrTranslator::handleNoteBelongingToAChord ( #endif // MF_TRACE_IS_ENABLED } -void mxsr2msrTranslator::handleNoteBelongingToATuplet ( +void mxsr2msrSkeletonPopulator::handleNoteBelongingToATuplet ( const S_msrNote& note) { int noteInputLineNumber = @@ -27208,7 +27212,7 @@ void mxsr2msrTranslator::handleNoteBelongingToATuplet ( break; case msrTupletTypeKind::kTupletTypeStop: - fThereIsAPendingTupletStop = true; + fThereIsAPendingTupletStop = true; // CHORD_TUP fNoteWithThePendingTupletStop = note; fVoiceOfTheNoteWithThePendingTupletStop = firstNoteVoice; @@ -27293,7 +27297,7 @@ void mxsr2msrTranslator::handleNoteBelongingToATuplet ( } //______________________________________________________________________________ -void mxsr2msrTranslator::handleNoteBelongingToAChordInATuplet ( +void mxsr2msrSkeletonPopulator::handleNoteBelongingToAChordInATuplet ( const S_msrNote& newChordNote) { /* @@ -27352,7 +27356,7 @@ void mxsr2msrTranslator::handleNoteBelongingToAChordInATuplet ( } // // is there a pending tuplet stop? -// if (fThereIsAPendingTupletStop) { +// if (fThereIsAPendingTupletStop) { // CHORD_TUP // // handle the tuplet stop // handleTupletStop ( // fNoteWithThePendingTupletStop, @@ -27556,7 +27560,7 @@ void mxsr2msrTranslator::handleNoteBelongingToAChordInATuplet ( // // is this chord the last one in the tuplet? // if (currentTuplet->getTupletHasBeenFilled ()) { JMI v0.9.71 -// // fThereIsAPendingTupletStop ??? +// // fThereIsAPendingTupletStop // CHORD_TUP // // // handle the tuplet stop // reduceTupletStackTop ( @@ -27614,7 +27618,7 @@ void mxsr2msrTranslator::handleNoteBelongingToAChordInATuplet ( } //______________________________________________________________________________ -void mxsr2msrTranslator::handleNoteBelongingToAChordInAGraceNotesGroup ( +void mxsr2msrSkeletonPopulator::handleNoteBelongingToAChordInAGraceNotesGroup ( const S_msrNote& newChordNote) { /* @@ -27807,7 +27811,7 @@ void mxsr2msrTranslator::handleNoteBelongingToAChordInAGraceNotesGroup ( #endif // MF_TRACE_IS_ENABLED } -// void mxsr2msrTranslator::displayLastHandledTupletInVoiceMap (const std::string& header) +// void mxsr2msrSkeletonPopulator::displayLastHandledTupletInVoiceMap (const std::string& header) // { // gLog << // std::endl << @@ -27850,7 +27854,7 @@ void mxsr2msrTranslator::handleNoteBelongingToAChordInAGraceNotesGroup ( // } //______________________________________________________________________________ -void mxsr2msrTranslator::handleRepeatStart ( +void mxsr2msrSkeletonPopulator::handleRepeatStart ( const S_msrBarLine& barLine) { #ifdef MF_TRACE_IS_ENABLED @@ -27887,7 +27891,7 @@ void mxsr2msrTranslator::handleRepeatStart ( } //______________________________________________________________________________ -void mxsr2msrTranslator::handleRepeatEnd ( +void mxsr2msrSkeletonPopulator::handleRepeatEnd ( const S_msrBarLine& barLine) { std::string repeatStartMeasureNumber = @@ -27932,7 +27936,7 @@ void mxsr2msrTranslator::handleRepeatEnd ( } //______________________________________________________________________________ -void mxsr2msrTranslator::handleRepeatEndingStart ( +void mxsr2msrSkeletonPopulator::handleRepeatEndingStart ( const S_msrBarLine& barLine) { #ifdef MF_TRACE_IS_ENABLED @@ -27993,7 +27997,7 @@ void mxsr2msrTranslator::handleRepeatEndingStart ( } //______________________________________________________________________________ -void mxsr2msrTranslator::handleRepeatHookedEndingEnd ( +void mxsr2msrSkeletonPopulator::handleRepeatHookedEndingEnd ( const S_msrBarLine& barLine) { #ifdef MF_TRACE_IS_ENABLED @@ -28056,7 +28060,7 @@ void mxsr2msrTranslator::handleRepeatHookedEndingEnd ( } //______________________________________________________________________________ -void mxsr2msrTranslator::handleRepeatHooklessEndingEnd ( +void mxsr2msrSkeletonPopulator::handleRepeatHooklessEndingEnd ( const S_msrBarLine& barLine) { /* @@ -28128,7 +28132,7 @@ void mxsr2msrTranslator::handleRepeatHooklessEndingEnd ( } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_rehearsal& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_rehearsal& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28239,7 +28243,7 @@ void mxsr2msrTranslator::visitStart (S_rehearsal& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_harmony& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_harmony& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28291,7 +28295,7 @@ void mxsr2msrTranslator::visitStart (S_harmony& elt) fOnGoingHarmony = true; } -void mxsr2msrTranslator::visitStart (S_root& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_root& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28319,7 +28323,7 @@ void mxsr2msrTranslator::visitStart (S_root& elt) printObjectString); } -void mxsr2msrTranslator::visitStart (S_root_step& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_root_step& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28347,7 +28351,7 @@ void mxsr2msrTranslator::visitStart (S_root_step& elt) step [0]); } -void mxsr2msrTranslator::visitStart (S_root_alter& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_root_alter& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28384,7 +28388,7 @@ void mxsr2msrTranslator::visitStart (S_root_alter& elt) } } -void mxsr2msrTranslator::visitStart (S_function& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_function& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28403,7 +28407,7 @@ void mxsr2msrTranslator::visitStart (S_function& elt) std::string fCurrentHarmonyFunctionText = elt->getValue (); } -void mxsr2msrTranslator::visitStart (S_kind& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_kind& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28633,7 +28637,7 @@ void mxsr2msrTranslator::visitStart (S_kind& elt) */ } -void mxsr2msrTranslator::visitStart (S_inversion& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_inversion& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28657,7 +28661,7 @@ void mxsr2msrTranslator::visitStart (S_inversion& elt) fCurrentHarmonyInversion = (int)(*elt); } -void mxsr2msrTranslator::visitStart (S_bass& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_bass& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28674,7 +28678,7 @@ void mxsr2msrTranslator::visitStart (S_bass& elt) #endif // MF_TRACE_IS_ENABLED } -void mxsr2msrTranslator::visitStart (S_bass_step& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_bass_step& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28702,7 +28706,7 @@ void mxsr2msrTranslator::visitStart (S_bass_step& elt) step [0]); } -void mxsr2msrTranslator::visitStart (S_bass_alter& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_bass_alter& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28739,7 +28743,7 @@ void mxsr2msrTranslator::visitStart (S_bass_alter& elt) } } -void mxsr2msrTranslator::visitStart (S_degree& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_degree& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28767,7 +28771,7 @@ void mxsr2msrTranslator::visitStart (S_degree& elt) printObjectString); } -void mxsr2msrTranslator::visitStart (S_degree_value& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_degree_value& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28786,7 +28790,7 @@ void mxsr2msrTranslator::visitStart (S_degree_value& elt) fCurrentHarmonyDegreeValue = (int)(*elt); } -void mxsr2msrTranslator::visitStart (S_degree_alter& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_degree_alter& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28823,7 +28827,7 @@ void mxsr2msrTranslator::visitStart (S_degree_alter& elt) } } -void mxsr2msrTranslator::visitStart (S_degree_type& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_degree_type& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28863,7 +28867,7 @@ void mxsr2msrTranslator::visitStart (S_degree_type& elt) } } -void mxsr2msrTranslator::visitEnd (S_degree& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_degree& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -28893,7 +28897,7 @@ void mxsr2msrTranslator::visitEnd (S_degree& elt) harmonyDegree); } -void mxsr2msrTranslator::visitEnd (S_harmony& elt) +void mxsr2msrSkeletonPopulator::visitEnd (S_harmony& elt) { #ifdef MF_TRACE_IS_ENABLED if (gGlobalMxsrOahGroup->getTraceMxsrVisitors ()) { @@ -29128,7 +29132,7 @@ void mxsr2msrTranslator::visitEnd (S_harmony& elt) } //______________________________________________________________________________ -void mxsr2msrTranslator::visitStart (S_frame& elt) +void mxsr2msrSkeletonPopulator::visitStart (S_frame& elt) { /* A chord begins upon note at " << + theNoteEvent->asString (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED +} + +void mxsrScoreNotesEvents::registerChordEndEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber) +{ + S_mxsrNoteEvent + theNoteEvent = + mxsrNoteEvent::create ( + mxsrNoteEventKind::kNoteEventChordEnd, + noteSequentialNumber, + noteInputStartLineNumber, + noteInputStartLineNumber); + + fChordsEndNotesEventsMap [noteSequentialNumber] = theNoteEvent; + + fAllNotesEventsList.push_back (theNoteEvent); + +#ifdef MF_TRACE_IS_ENABLED + if (gtrue || GlobalMxsrOahGroup->getTraceChordsBasics ()) { + std::stringstream ss; + + ss << + "--> A chord ends upon note at " << + theNoteEvent->asString (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED +} + +void mxsrScoreNotesEvents::registerTupletBeginEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber) +{ + S_mxsrNoteEvent + theNoteEvent = + mxsrNoteEvent::create ( + mxsrNoteEventKind::kNoteEventTupletBegin, + noteSequentialNumber, + noteInputStartLineNumber, + noteInputStartLineNumber); + + fTupletsBeginNotesEventsMap [noteSequentialNumber] = theNoteEvent; + + fAllNotesEventsList.push_back (theNoteEvent); + +#ifdef MF_TRACE_IS_ENABLED + if (gGlobalMxsrOahGroup->getTraceTupletsBasics ()) { + std::stringstream ss; + + ss << + "--> A tuplet begins upon note at " << + theNoteEvent->asString (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED +} + +void mxsrScoreNotesEvents::registerTupletEndEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber) +{ + S_mxsrNoteEvent + theNoteEvent = + mxsrNoteEvent::create ( + mxsrNoteEventKind::kNoteEventTupletEnd, + noteSequentialNumber, + noteInputStartLineNumber, + noteInputStartLineNumber); + + fTupletsEndNotesEventsMap [noteSequentialNumber] = theNoteEvent; + + fAllNotesEventsList.push_back (theNoteEvent); + +#ifdef MF_TRACE_IS_ENABLED + if (gGlobalMxsrOahGroup->getTraceTupletsBasics ()) { + std::stringstream ss; + + ss << + "--> A tuplet ends upon note at " << + theNoteEvent->asString (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED +} + +void mxsrScoreNotesEvents::registerStaffChangeTakeOffEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber) +{ + S_mxsrNoteEvent + theNoteEvent = + mxsrNoteEvent::create ( + mxsrNoteEventKind::kNoteEventStaffChangeTakeOff, + noteSequentialNumber, + noteInputStartLineNumber, + noteInputStartLineNumber); + + fStaffChangesTakesOffsPositionsMap [noteSequentialNumber] = theNoteEvent; + + fAllNotesEventsList.push_back (theNoteEvent); + +#ifdef MF_TRACE_IS_ENABLED + if (gGlobalMxsrOahGroup->getTraceStaffChangesBasics ()) { + std::stringstream ss; + + ss << + "--> A staff change takes off upon note at " << + theNoteEvent->asString (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED +} + +void mxsrScoreNotesEvents::registerStaffChangeLandingEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber) +{ + S_mxsrNoteEvent + theNoteEvent = + mxsrNoteEvent::create ( + mxsrNoteEventKind::kNoteEventStaffChangeLanding, + noteSequentialNumber, + noteInputStartLineNumber, + noteInputStartLineNumber); + + fStaffChangesLandingsPositionsMap [noteSequentialNumber] = theNoteEvent; + + fAllNotesEventsList.push_back (theNoteEvent); + +#ifdef MF_TRACE_IS_ENABLED + if (gGlobalMxsrOahGroup->getTraceStaffChangesBasics ()) { + std::stringstream ss; + + ss << + "--> A staff change lands upon note at " << + theNoteEvent->asString (); + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED +} + +void mxsrScoreNotesEvents::sortAllNotesEventsList () +{ +#ifdef MF_TRACE_IS_ENABLED + if ( + gGlobalMxsrOahGroup->getTraceChordsBasics () + || + gGlobalMxsrOahGroup->getTraceTupletsBasics () + || + gTraceOahGroup->getTraceStaffChanges () + ) { + std::stringstream ss; + + ss << + "--> Sorting the all notes events list"; + + gWaeHandler->waeTrace ( + __FILE__, __LINE__, + ss.str ()); + } +#endif // MF_TRACE_IS_ENABLED + + fAllNotesEventsList.sort ( + compareFrameNotesByIncreasingSequentialNumber); +} + +Bool mxsrScoreNotesEvents::aChordBeginsAtNoteSequentialNumber ( + int noteSequentialNumber) const +{ + Bool result; + + std::map::const_iterator it; + + it = fChordsBeginNotesEventsMap.find (noteSequentialNumber); + + if (it != fChordsBeginNotesEventsMap.end ()) { + result = + it->second->getNoteSequentialNumber () == noteSequentialNumber; + } + else { + result = false; + } + + return result; +} + +Bool mxsrScoreNotesEvents::aChordEndsAtNoteSequentialNumber ( + int noteSequentialNumber) const +{ + Bool result; + + std::map::const_iterator it; + + it = fChordsEndNotesEventsMap.find (noteSequentialNumber); + + if (it != fChordsEndNotesEventsMap.end ()) { + result = + it->second->getNoteSequentialNumber () == noteSequentialNumber; + } + else { + result = false; + } + + return result; +} + +Bool mxsrScoreNotesEvents::aTupletBeginsAtNoteSequentialNumber ( + int noteSequentialNumber) const +{ + Bool result; + + std::map::const_iterator it; + + it = fTupletsBeginNotesEventsMap.find (noteSequentialNumber); + + if (it != fTupletsBeginNotesEventsMap.end ()) { + result = + it->second->getNoteSequentialNumber () == noteSequentialNumber; + } + else { + result = false; + } + + return result; +} + +Bool mxsrScoreNotesEvents::aTupletEndsAtNoteSequentialNumber ( + int noteSequentialNumber) const +{ + Bool result; + + std::map::const_iterator it; + + it = fTupletsEndNotesEventsMap.find (noteSequentialNumber); + + if (it != fTupletsEndNotesEventsMap.end ()) { + result = + it->second->getNoteSequentialNumber () == noteSequentialNumber; + } + else { + result = false; + } + + return result; +} + +Bool mxsrScoreNotesEvents::aStaffChangeTakesOffAtNoteSequentialNumber ( + int noteSequentialNumber) const +{ + Bool result; + + std::map::const_iterator it; + + it = fStaffChangesTakesOffsPositionsMap.find (noteSequentialNumber); + + if (it != fStaffChangesTakesOffsPositionsMap.end ()) { + result = + it->second->getNoteSequentialNumber () == noteSequentialNumber; + } + else { + result = false; + } + + return result; +} + +Bool mxsrScoreNotesEvents::aTStaffChangeLandsAtNoteSequentialNumber ( + int noteSequentialNumber) const +{ + Bool result; + + std::map::const_iterator it; + + it = fStaffChangesLandingsPositionsMap.find (noteSequentialNumber); + + if (it != fStaffChangesLandingsPositionsMap.end ()) { + result = + it->second->getNoteSequentialNumber () == noteSequentialNumber; + } + else { + result = false; + } + + return result; +} + +std::string mxsrScoreNotesEvents::asShortString () const +{ + std::stringstream ss; + + ss << + "[ScoreNotesEvents" << + ", fAllNotesEventsList: " << + mfSingularOrPlural ( + fAllNotesEventsList.size (), + "element", + "elements") << + ']'; + + return ss.str (); +} + +std::string mxsrScoreNotesEvents::asString () const +{ + return asShortString (); +} + +void mxsrScoreNotesEvents::print (std::ostream& os) const +{ + if (false) { // JMI CHORDS_TUP v0.9.71 + os << + "[ScoreNotesEvents" << + std::endl; + + ++gIndenter; + + os << + "fChordsBeginNotesEventsMap: " << + mfSingularOrPlural ( + fChordsBeginNotesEventsMap.size (), + "element", + "elements") << + std::endl; + + ++gIndenter; + + for (std::pair thePair : fChordsBeginNotesEventsMap) { + int + noteEventSeauentialNumber = thePair.first; + S_mxsrNoteEvent + noteEvent = thePair.second; + + os << + noteEventSeauentialNumber << + ':' << + std::endl; + + ++gIndenter; + os << + noteEvent << + std::endl; + --gIndenter; + } // for + + --gIndenter; + + os << std::endl << "--" << std::endl << std::endl; + + os << + "fChordsEndNotesEventsMap: " << + mfSingularOrPlural ( + fChordsEndNotesEventsMap.size (), + "element", + "elements") << + std::endl; + + ++gIndenter; + + for (std::pair thePair : fChordsEndNotesEventsMap) { + int + noteEventSeauentialNumber = thePair.first; + S_mxsrNoteEvent + noteEvent = thePair.second; + + os << + noteEventSeauentialNumber << + ':' << + std::endl; + + ++gIndenter; + os << + noteEvent << + std::endl; + --gIndenter; + } // for + + --gIndenter; + + os << std::endl << "--" << std::endl << std::endl; + + os << + "fTupletsBeginNotesEventsMap: " << + mfSingularOrPlural ( + fTupletsBeginNotesEventsMap.size (), + "element", + "elements") << + std::endl; + + ++gIndenter; + + for (std::pair thePair : fTupletsBeginNotesEventsMap) { + int + noteEventSeauentialNumber = thePair.first; + S_mxsrNoteEvent + noteEvent = thePair.second; + + os << + noteEventSeauentialNumber << + ':' << + std::endl; + + ++gIndenter; + os << + noteEvent << + std::endl; + --gIndenter; + } // for + + --gIndenter; + + os << std::endl << "--" << std::endl << std::endl; + + os << + "fTupletsEndNotesEventsMap: " << + mfSingularOrPlural ( + fTupletsEndNotesEventsMap.size (), + "element", + "elements") << + std::endl; + + ++gIndenter; + + for (std::pair thePair : fTupletsEndNotesEventsMap) { + int + noteEventSeauentialNumber = thePair.first; + S_mxsrNoteEvent + noteEvent = thePair.second; + + os << + noteEventSeauentialNumber << + ':' << + std::endl; + + ++gIndenter; + os << + noteEvent << + std::endl; + --gIndenter; + } // for + + --gIndenter; + + os << std::endl << "--" << std::endl << std::endl; + + os << + "fStaffChangesTakesOffsPositionsMap: " << + mfSingularOrPlural ( + fStaffChangesTakesOffsPositionsMap.size (), + "element", + "elements") << + std::endl; + + ++gIndenter; + + for (std::pair thePair : fStaffChangesTakesOffsPositionsMap) { + int + noteEventSeauentialNumber = thePair.first; + S_mxsrNoteEvent + noteEvent = thePair.second; + + os << + noteEventSeauentialNumber << + ':' << + std::endl; + + ++gIndenter; + os << + noteEvent << + std::endl; + --gIndenter; + } // for + + --gIndenter; + + os << std::endl << "--" << std::endl << std::endl; + + os << + "fStaffChangesLandingsPositionsMap: " << + mfSingularOrPlural ( + fStaffChangesLandingsPositionsMap.size (), + "element", + "elements") << + std::endl; + + ++gIndenter; + + for (std::pair thePair : fStaffChangesLandingsPositionsMap) { + int + noteEventSeauentialNumber = thePair.first; + S_mxsrNoteEvent + noteEvent = thePair.second; + + os << + noteEventSeauentialNumber << + ':' << + std::endl; + + ++gIndenter; + os << + noteEvent << + std::endl; + --gIndenter; + } // for + + --gIndenter; + } + + os << std::endl << "--------" << std::endl << std::endl; + + os << + "fAllNotesEventsList: " << + mfSingularOrPlural ( + fAllNotesEventsList.size (), + "element", + "elements") << + std::endl; + + ++gIndenter; + + for (S_mxsrNoteEvent noteEvent : fAllNotesEventsList) { + os << + noteEvent->getNoteSequentialNumber () << + ':' << + std::endl; + + ++gIndenter; + os << + noteEvent << + std::endl; + --gIndenter; + } // for + + --gIndenter; + + + --gIndenter; + + os << ']' << std::endl; +} + +std::ostream& operator << (std::ostream& os, const S_mxsrScoreNotesEvents& elt) +{ + if (elt) { + elt->print (os); + } + else { + os << "[NULL]" << std::endl; + } + + return os; +} + +std::ostream& operator << (std::ostream& os, const mxsrScoreNotesEvents& elt) +{ + elt.print (os); + return os; +} + + +} // namespace + diff --git a/src/representations/mxsr/mxsrNotesEvents.h b/src/representations/mxsr/mxsrNotesEvents.h new file mode 100644 index 000000000..368ed0c3d --- /dev/null +++ b/src/representations/mxsr/mxsrNotesEvents.h @@ -0,0 +1,269 @@ +/* + MusicFormats Library + Copyright (C) Jacques Menu 2016-2024 + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, you can obtain one at http://mozilla.org/MPL/2.0/. + + https://github.com/jacques-menu/musicformats +*/ + +#ifndef ___mxsrNotesEvents___ +#define ___mxsrNotesEvents___ + +#include +#include +#include +#include + +#include "smartpointer.h" + +#include "mfBool.h" +#include "mfIndentedTextOutput.h" + + +using namespace MusicXML2; + +namespace MusicFormats +{ + +//______________________________________________________________________________ +// data types + +// avoid start and stop, to avoid confusion with MusicXML concepts +// the airplane analogy is to avoid confusion with a sequence of notes +// displayed on another staff + +enum class mxsrNoteEventKind { + kNoteEventChordBegin, kNoteEventChordEnd, + kNoteEventTupletBegin, kNoteEventTupletEnd, + kNoteEventStaffChangeTakeOff, kNoteEventStaffChangeLanding +}; + +std::string mxsrNoteEventKindAsString ( + mxsrNoteEventKind noteEventKind); + +std::ostream& operator << (std::ostream& os, const mxsrNoteEventKind& elt); + +//------------------------------------------------------------------------ +class EXP mxsrNoteEvent : public smartable +{ + + public: + + // creation from MusicXML + // ------------------------------------------------------ + + static SMARTP create ( + mxsrNoteEventKind noteEventKind, + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + public: + + // constructors/destructor + // ------------------------------------------------------ + + mxsrNoteEvent ( + mxsrNoteEventKind noteEventKind, + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + virtual ~mxsrNoteEvent (); + + public: + + // set and get + // ------------------------------------------------------ + + int getNoteSequentialNumber () const + { return fNoteSequentialNumber; } + + int getNoteInputStartLineNumber () const + { return fNoteInputStartLineNumber; } + + int getNoteInputEndLineNumber () const + { return fNoteInputEndLineNumber; } + + public: + + // public services + // ------------------------------------------------------ + + + private: + + // private services + // ------------------------------------------------------ + + + public: + + // print + // ------------------------------------------------------ + + std::string asString () const; + std::string asShortString () const; + + void print (std::ostream& os) const; + + private: + + // private fields + // ------------------------------------------------------ + + mxsrNoteEventKind fNoteEventKind; + + // the input line numbers alone cannot be used as unique identifier, + // since the end of lines are not mandatory in MusicXML date, hence: + int fNoteSequentialNumber; + + int fNoteInputStartLineNumber; + int fNoteInputEndLineNumber; +}; +typedef SMARTP S_mxsrNoteEvent; +EXP std::ostream& operator << (std::ostream& os, const S_mxsrNoteEvent& elt); +EXP std::ostream& operator << (std::ostream& os, const mxsrNoteEvent& elt); + +//________________________________________________________________________ +bool compareFrameNotesByIncreasingSequentialNumber ( + S_mxsrNoteEvent& first, + S_mxsrNoteEvent& second); + +//------------------------------------------------------------------------ +class EXP mxsrScoreNotesEvents : public smartable +{ + + public: + + // creation from MusicXML + // ------------------------------------------------------ + + static SMARTP create (); + + public: + + // constructors/destructor + // ------------------------------------------------------ + + mxsrScoreNotesEvents (); + + virtual ~mxsrScoreNotesEvents (); + + public: + + // set and get + // ------------------------------------------------------ + +// int getNoteSequentialNumber () const +// { return fNoteSequentialNumber; } +// +// int getNoteInputStartLineNumber () const +// { return fNoteInputStartLineNumber; } +// +// int getNoteInputEndLineNumber () const +// { return fNoteInputEndLineNumber; } + + public: + + // public services + // ------------------------------------------------------ + + void registerChordBeginEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + void registerChordEndEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + void registerTupletBeginEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + void registerTupletEndEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + void registerStaffChangeTakeOffEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + void registerStaffChangeLandingEvent ( + int noteSequentialNumber, + int noteInputStartLineNumber, + int noteInputEndLineNumber); + + void sortAllNotesEventsList (); + + Bool aChordBeginsAtNoteSequentialNumber ( + int noteSequentialNumber) const; + Bool aChordEndsAtNoteSequentialNumber ( + int noteSequentialNumber) const; + + Bool aTupletBeginsAtNoteSequentialNumber ( + int noteSequentialNumber) const; + Bool aTupletEndsAtNoteSequentialNumber ( + int noteSequentialNumber) const; + + Bool aStaffChangeTakesOffAtNoteSequentialNumber ( + int noteSequentialNumber) const; + Bool aTStaffChangeLandsAtNoteSequentialNumber ( + int noteSequentialNumber) const; + + private: + + // private services + // ------------------------------------------------------ + + public: + + // print + // ------------------------------------------------------ + + std::string asString () const; + std::string asShortString () const; + + void print (std::ostream& os) const; + + private: + + // private fields + // ------------------------------------------------------ + + // per-event type maps + std::map + fChordsBeginNotesEventsMap; + std::map + fChordsEndNotesEventsMap; + + std::map + fTupletsBeginNotesEventsMap; + std::map + fTupletsEndNotesEventsMap; + + std::map + fStaffChangesTakesOffsPositionsMap; + std::map + fStaffChangesLandingsPositionsMap; + + // all events list + std::list + fAllNotesEventsList; +}; +typedef SMARTP S_mxsrScoreNotesEvents; +EXP std::ostream& operator << (std::ostream& os, const S_mxsrScoreNotesEvents& elt); +EXP std::ostream& operator << (std::ostream& os, const mxsrScoreNotesEvents& elt); + +} + + +#endif // ___mxsrNotesEvents___