diff --git a/include/humlib.h b/include/humlib.h index e87ba87f..4322a752 100644 --- a/include/humlib.h +++ b/include/humlib.h @@ -1,7 +1,7 @@ // // Programmer: Craig Stuart Sapp // Creation Date: Sat Aug 8 12:24:49 PDT 2015 -// Last Modified: Sa 21 Jan 2023 09:48:51 CET +// Last Modified: Mo 23 Jan 2023 17:20:50 CET // Filename: humlib.h // URL: https://github.com/craigsapp/humlib/blob/master/include/humlib.h // Syntax: C++11 @@ -7302,13 +7302,13 @@ class Tool_fb : public HumTool { bool m_sortQ = false; bool m_lowestQ = false; bool m_normalizeQ = false; - bool m_abbrQ = false; + bool m_abbreviateQ = false; bool m_attackQ = false; bool m_figuredbassQ = false; bool m_hideThreeQ = false; bool m_showNegativeQ = false; bool m_aboveQ = false; - string m_recipQ = ""; + string m_rateQ = ""; string m_spineTracks = ""; // used with -s option string m_kernTracks = ""; // used with -k option diff --git a/include/tool-fb.h b/include/tool-fb.h index ac10913f..08069cc3 100644 --- a/include/tool-fb.h +++ b/include/tool-fb.h @@ -91,13 +91,13 @@ class Tool_fb : public HumTool { bool m_sortQ = false; bool m_lowestQ = false; bool m_normalizeQ = false; - bool m_abbrQ = false; + bool m_abbreviateQ = false; bool m_attackQ = false; bool m_figuredbassQ = false; bool m_hideThreeQ = false; bool m_showNegativeQ = false; bool m_aboveQ = false; - string m_recipQ = ""; + string m_rateQ = ""; string m_spineTracks = ""; // used with -s option string m_kernTracks = ""; // used with -k option diff --git a/src/humlib.cpp b/src/humlib.cpp index 1972b55c..2c7ec271 100644 --- a/src/humlib.cpp +++ b/src/humlib.cpp @@ -1,7 +1,7 @@ // // Programmer: Craig Stuart Sapp // Creation Date: Sat Aug 8 12:24:49 PDT 2015 -// Last Modified: Sa 21 Jan 2023 09:48:51 CET +// Last Modified: Mo 23 Jan 2023 17:20:50 CET // Filename: /include/humlib.cpp // URL: https://github.com/craigsapp/humlib/blob/master/src/humlib.cpp // Syntax: C++11 @@ -78038,13 +78038,13 @@ Tool_fb::Tool_fb(void) { define("o|sort|order=b", "sort figured bass numbers by interval size and not by voice index"); define("l|lowest=b", "use lowest note as base note; -b flag will be ignored"); define("n|normalize=b", "remove octave and doubled intervals; adds: --compound --sort"); - define("r|abbr=b", "use abbreviated figures; adds: --normalize --compound --sort"); + define("r|abbreviate=b", "use abbreviated figures; adds: --normalize --compound --sort"); define("t|ties=b", "hide repeated numbers for sustained notes when base does not change"); define("f|figuredbass=b", "shortcut for -c -a -o -n -r -3"); define("3|hide-three=b", "hide number 3 if it has an accidental (e.g.: #3 => #)"); define("m|negative=b", "show negative numbers"); define("above=b", "place figured bass numbers above staff (**fba)"); - define("frequency|recip=s:", "frequency to display the numbers (set a **recip value, e.g. 2, 4, 8, 4.)"); + define("rate=s:", "rate to display the numbers (set a **recip value, e.g. 2, 4, 8, 4.)"); define("k|kern-tracks=s", "Process only the specified kern spines"); define("s|spine-tracks|spine|spines|track|tracks=s", "Process only the specified spines"); } @@ -78106,13 +78106,13 @@ void Tool_fb::initialize(void) { m_sortQ = getBoolean("sort"); m_lowestQ = getBoolean("lowest"); m_normalizeQ = getBoolean("normalize"); - m_abbrQ = getBoolean("abbr"); + m_abbreviateQ = getBoolean("abbreviate"); m_attackQ = getBoolean("ties"); m_figuredbassQ = getBoolean("figuredbass"); m_hideThreeQ = getBoolean("hide-three"); m_showNegativeQ = getBoolean("negative"); m_aboveQ = getBoolean("above"); - m_recipQ = getString("frequency"); + m_rateQ = getString("rate"); if (getBoolean("spine-tracks")) { m_spineTracks = getString("spine-tracks"); @@ -78125,14 +78125,14 @@ void Tool_fb::initialize(void) { m_sortQ = true; } - if (m_abbrQ) { + if (m_abbreviateQ) { m_normalizeQ = true; m_compoundQ = true; m_sortQ = true; } if (m_figuredbassQ) { - m_abbrQ = true; + m_abbreviateQ = true; m_normalizeQ = true; m_compoundQ = true; m_sortQ = true; @@ -78236,8 +78236,8 @@ void Tool_fb::processFile(HumdrumFile& infile) { string keySignature = getKeySignature(infile, baseCell->getLineIndex()); - // Hide numbers if they do not match rhythmic position of --recip - if (!m_recipQ.empty()) { + // Hide numbers if they do not match rhythmic position of --rate + if (!m_rateQ.empty()) { // Get time signatures vector> timeSigs; infile.getTimeSigs(timeSigs, baseCell->getToken()->getTrack()); @@ -78380,9 +78380,9 @@ void Tool_fb::processFile(HumdrumFile& infile) { // bool Tool_fb::hideNumbersForTokenLine(HTp token, pair timeSig) { - // Get note duration from --recip option - HumNum recip = Convert::recipToDuration(m_recipQ); - if (recip.toFloat() != 0) { + // Get note duration from --rate option + HumNum rateDuration = Convert::recipToDuration(m_rateQ); + if (rateDuration.toFloat() != 0) { float timeSigBarDuration = timeSig.first * Convert::recipToDuration(to_string(timeSig.second.getInteger())).toFloat(); float durationFromBarline = token->getDurationFromBarline().toFloat(); // Handle upbeats @@ -78391,8 +78391,8 @@ bool Tool_fb::hideNumbersForTokenLine(HTp token, pair timeSig) { // the bar duration of the time signature durationFromBarline = timeSigBarDuration - token->getDurationToBarline().toFloat(); } - // Checks if rhythmic position is divisible by recip duration - return fmod(durationFromBarline, recip.toFloat()) != 0; + // Checks if rhythmic position is divisible by rateDuration + return fmod(durationFromBarline, rateDuration.toFloat()) != 0; } return false; } @@ -78634,7 +78634,7 @@ string Tool_fb::formatFiguredBassNumbers(const vector& numbe }); } - if (m_abbrQ) { + if (m_abbreviateQ) { // Overwrite formattedNumbers with abbreviated numbers formattedNumbers = getAbbreviatedNumbers(formattedNumbers); } diff --git a/src/tool-fb.cpp b/src/tool-fb.cpp index 3a96e5c5..c6e214f0 100644 --- a/src/tool-fb.cpp +++ b/src/tool-fb.cpp @@ -34,13 +34,13 @@ Tool_fb::Tool_fb(void) { define("o|sort|order=b", "sort figured bass numbers by interval size and not by voice index"); define("l|lowest=b", "use lowest note as base note; -b flag will be ignored"); define("n|normalize=b", "remove octave and doubled intervals; adds: --compound --sort"); - define("r|abbr=b", "use abbreviated figures; adds: --normalize --compound --sort"); + define("r|abbreviate=b", "use abbreviated figures; adds: --normalize --compound --sort"); define("t|ties=b", "hide repeated numbers for sustained notes when base does not change"); define("f|figuredbass=b", "shortcut for -c -a -o -n -r -3"); define("3|hide-three=b", "hide number 3 if it has an accidental (e.g.: #3 => #)"); define("m|negative=b", "show negative numbers"); define("above=b", "place figured bass numbers above staff (**fba)"); - define("frequency|recip=s:", "frequency to display the numbers (set a **recip value, e.g. 2, 4, 8, 4.)"); + define("rate=s:", "rate to display the numbers (set a **recip value, e.g. 2, 4, 8, 4.)"); define("k|kern-tracks=s", "Process only the specified kern spines"); define("s|spine-tracks|spine|spines|track|tracks=s", "Process only the specified spines"); } @@ -102,13 +102,13 @@ void Tool_fb::initialize(void) { m_sortQ = getBoolean("sort"); m_lowestQ = getBoolean("lowest"); m_normalizeQ = getBoolean("normalize"); - m_abbrQ = getBoolean("abbr"); + m_abbreviateQ = getBoolean("abbreviate"); m_attackQ = getBoolean("ties"); m_figuredbassQ = getBoolean("figuredbass"); m_hideThreeQ = getBoolean("hide-three"); m_showNegativeQ = getBoolean("negative"); m_aboveQ = getBoolean("above"); - m_recipQ = getString("frequency"); + m_rateQ = getString("rate"); if (getBoolean("spine-tracks")) { m_spineTracks = getString("spine-tracks"); @@ -121,14 +121,14 @@ void Tool_fb::initialize(void) { m_sortQ = true; } - if (m_abbrQ) { + if (m_abbreviateQ) { m_normalizeQ = true; m_compoundQ = true; m_sortQ = true; } if (m_figuredbassQ) { - m_abbrQ = true; + m_abbreviateQ = true; m_normalizeQ = true; m_compoundQ = true; m_sortQ = true; @@ -232,8 +232,8 @@ void Tool_fb::processFile(HumdrumFile& infile) { string keySignature = getKeySignature(infile, baseCell->getLineIndex()); - // Hide numbers if they do not match rhythmic position of --recip - if (!m_recipQ.empty()) { + // Hide numbers if they do not match rhythmic position of --rate + if (!m_rateQ.empty()) { // Get time signatures vector> timeSigs; infile.getTimeSigs(timeSigs, baseCell->getToken()->getTrack()); @@ -376,9 +376,9 @@ void Tool_fb::processFile(HumdrumFile& infile) { // bool Tool_fb::hideNumbersForTokenLine(HTp token, pair timeSig) { - // Get note duration from --recip option - HumNum recip = Convert::recipToDuration(m_recipQ); - if (recip.toFloat() != 0) { + // Get note duration from --rate option + HumNum rateDuration = Convert::recipToDuration(m_rateQ); + if (rateDuration.toFloat() != 0) { float timeSigBarDuration = timeSig.first * Convert::recipToDuration(to_string(timeSig.second.getInteger())).toFloat(); float durationFromBarline = token->getDurationFromBarline().toFloat(); // Handle upbeats @@ -387,8 +387,8 @@ bool Tool_fb::hideNumbersForTokenLine(HTp token, pair timeSig) { // the bar duration of the time signature durationFromBarline = timeSigBarDuration - token->getDurationToBarline().toFloat(); } - // Checks if rhythmic position is divisible by recip duration - return fmod(durationFromBarline, recip.toFloat()) != 0; + // Checks if rhythmic position is divisible by rateDuration + return fmod(durationFromBarline, rateDuration.toFloat()) != 0; } return false; } @@ -630,7 +630,7 @@ string Tool_fb::formatFiguredBassNumbers(const vector& numbe }); } - if (m_abbrQ) { + if (m_abbreviateQ) { // Overwrite formattedNumbers with abbreviated numbers formattedNumbers = getAbbreviatedNumbers(formattedNumbers); }