Skip to content

Commit

Permalink
Merge pull request #3865 from rism-digital/develop-humdrum
Browse files Browse the repository at this point in the history
Update develop with humdrum branch
  • Loading branch information
lpugin authored Nov 25, 2024
2 parents 745e5b7 + 881f682 commit bc4bb02
Show file tree
Hide file tree
Showing 5 changed files with 1,340 additions and 28 deletions.
61 changes: 60 additions & 1 deletion include/hum/humlib.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Programmer: Craig Stuart Sapp <[email protected]>
// Creation Date: Sat Aug 8 12:24:49 PDT 2015
// Last Modified: Sun Sep 8 23:07:16 PDT 2024
// Last Modified: Wed Nov 13 13:08:51 PST 2024
// Filename: min/humlib.h
// URL: https://github.com/craigsapp/humlib/blob/master/min/humlib.h
// Syntax: C++11
Expand Down Expand Up @@ -5647,6 +5647,40 @@ class HumdrumFileSet {



class Tool_1520ify : public HumTool {
public:
Tool_1520ify (void);
~Tool_1520ify () {};

bool run (HumdrumFileSet& infiles);
bool run (HumdrumFile& infile);
bool run (const std::string& indata, std::ostream& out);
bool run (HumdrumFile& infile, std::ostream& out);

protected:
void initialize (HumdrumFile& infile);
void processFile (HumdrumFile& infile);
void updateKeySignatures(HumdrumFile& infile, int lineindex);
void checkDataLine (HumdrumFile& infile, int lineindex);
void clearStates (void);
void addBibliographicRecords(HumdrumFile& infile);
void deleteBreaks (HumdrumFile& infile);
void fixEditorialAccidentals(HumdrumFile& infile);
void fixInstrumentAbbreviations(HumdrumFile& infile);
void addTerminalLongs (HumdrumFile& infile);
void deleteDummyTranspositions(HumdrumFile& infile);
std::string getDate (void);
int getYear (void);
void adjustSystemDecoration(HumdrumFile& infile);

private:
std::vector<std::vector<int>> m_pstates;
std::vector<std::vector<int>> m_kstates;
std::vector<std::vector<bool>> m_estates;

};


class Tool_addic : public HumTool {
public:
Tool_addic (void);
Expand Down Expand Up @@ -5923,6 +5957,31 @@ class Tool_autostem : public HumTool {
};


class Tool_bardash : public HumTool {

public:
Tool_bardash (void);
~Tool_bardash() {};

bool run (HumdrumFileSet& infiles);
bool run (HumdrumFile& infile);
bool run (const std::string& indata, std::ostream& out);
bool run (HumdrumFile& infile, std::ostream& out);

protected:
void initialize (void);
void processFile (HumdrumFile& infile);
void removeBarStylings(HumdrumFile& infile);
void removeBarStylings(HTp spine);
void applyBarStylings(HumdrumFile& infile);
void applyBarStylings(HTp spine);

private:
bool m_removeQ = false; // used with -r option

};


class Tool_binroll : public HumTool {
public:
Tool_binroll (void);
Expand Down
3 changes: 3 additions & 0 deletions src/doc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ void Doc::CalculateTimemap()

void Doc::ExportMIDI(smf::MidiFile *midiFile)
{
midiFile->absoluteTicks();

if (!this->HasTimemap()) {
// generate MIDI timemap before progressing
CalculateTimemap();
Expand Down Expand Up @@ -548,6 +550,7 @@ void Doc::ExportMIDI(smf::MidiFile *midiFile)
tempoEventTicks = generateMIDI.GetTempoEventTicks();
}
}
midiFile->sortTracks();
}

bool Doc::ExportTimemap(std::string &output, bool includeRests, bool includeMeasures, bool useFractions)
Expand Down
Loading

0 comments on commit bc4bb02

Please sign in to comment.