Skip to content

Commit

Permalink
Update the timemap output
Browse files Browse the repository at this point in the history
* Tempo as number
* qfrac for fractions
  • Loading branch information
lpugin committed Oct 8, 2024
1 parent 2f14d3f commit 1e60747
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/timemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void Timemap::ToJson(std::string &output, bool includeRests, bool includeMeasure
for (auto &[qstamp, entry] : m_map) {
jsonxx::Object o;
if (useFractions) {
o << "qstamp" << Timemap::ToArray(qstamp);
o << "qfrac" << Timemap::ToArray(qstamp);
}
else {
o << "qstamp" << qstamp.ToDouble();
Expand Down Expand Up @@ -85,7 +85,7 @@ void Timemap::ToJson(std::string &output, bool includeRests, bool includeMeasure
newTempo = entry.tempo;
if (newTempo != currentTempo) {
currentTempo = newTempo;
o << "tempo" << std::to_string(currentTempo);
o << "tempo" << currentTempo;
}
}

Expand Down

0 comments on commit 1e60747

Please sign in to comment.