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 6a9bf795a..000000000 Binary files a/musicxmlfiles/staffchanges/NotesStaffChange.mscz and /dev/null differ 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 07484b2e7..000000000 Binary files a/musicxmlfiles/staffchanges/Notes_Staff_Change.mscz and /dev/null differ 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___