Commit 7fa83755 authored by Florent Jacquemard's avatar Florent Jacquemard
Browse files

bug trace under Linux

parent d4661ecc
......@@ -498,9 +498,9 @@ std::string SymbLabel::to_string(label_t a)
ERROR("SymbLabel: WRONG SYMBOL STD cst: {}", a);
}
}
else if (SymbLabel::specific(a) == 1)
else if ((! undef(a)) && (SymbLabel::specific(a) == 1))
o << "T" << ar; // beamed tuple
else if (SymbLabel::specific(a) == 0)
else if ((! undef(a)) && (SymbLabel::specific(a) == 0))
o << "U" << ar; // unbeamed tuple
else
ERROR("SymbLabel: WRONG SYMBOL STD ar={}: {}", ar, a);
......@@ -522,6 +522,7 @@ std::string SymbLabel::to_string(label_t a)
case SymbLabel::REST:
assert(ar == 0);
assert(! undef(a));
assert(SymbLabel::specific(a) == 1);
o << "R";
break;
......
......@@ -84,38 +84,39 @@ private:
/// for each MIDI pitch modulo 12, there are 2 or 3 synonyms,
/// described in the following table:
/// | pitch | | | |
/// |:------:|:----|:---|:----|
/// | 0 | B# | C | Dbb |
/// | 1 | C# | Db | B## |
/// | 2 | C## | D | Ebb |
/// | 3 | D# | Eb | Fbb |
/// | 4 | D## | E | Fb |
/// | 5 | E# | F | Gbb |
/// | 6 | E## | F# | Gb |
/// | 7 | F## | G | Abb |
/// | 8 | G# | Ab | |
/// | 9 | G## | A | Bbb |
/// | 10 | A# | Bb | Cbb |
/// | 11 | A## | B | Cb |
/// | pitch | | | |
/// |:------:|:------|:---|:------|
/// | 0 | Dbb | C | B# |
/// | 1 | Db | C# | [B##] |
/// | 2 | Ebb | D | C## |
/// | 3 | [Fbb] | Eb | D# |
/// | 4 | Fb | E | D## |
/// | 5 | Gbb | F | E# |
/// | 6 | Gb | F# | [E##] |
/// | 7 | Abb | G | F## |
/// | 8 | Ab | G# | |
/// | 9 | Bbb | A | G## |
/// | 10 | [Cbb] | Bb | A# |
/// | 11 | Cb | B | A## |
///
/// the table SYNONYMS contains for each MIDI pitch in 0..11
/// The table SYNONYMS contains for each MIDI pitch in 0..11
/// three synonyms in 0..2 presented with 2 values :
/// - name in 0..6 (see table NAME) and
/// - name in 0..6 for C, D, E, F, G, A, B (see table NAME) and
/// - alteration in -2..2
/// In one case (pitch = 8) there are only 2 synonyms;
/// in this case, the third synonym has note name -1.
static const int SYNONYMS[12][3][2];
/// same as SYNONYMS with flats first
static const int SYNONYMF[12][3][2];
/// In the cases where there are only 2 synonyms (e.g. pitch = 8),
/// both components are set to SYNONYM_UNDEF.
static const int SYNONYM[12][3][2];
static const int SYNONYM_UNDEF;
// same as SYNONYMS with flats first
// static const int SYNONYMF[12][3][2];
};
/// target configuration for a pitch spelling algorithm of scope 1 bar
/// it extends the PSConfig with members for the pitch name and print flag.
class PSConfigMark : public PSConfig
{
public:
......
......@@ -46,7 +46,7 @@ LabeledRhythmTree::~LabeledRhythmTree()
for (std::vector<LabeledRhythmTree*>::iterator i = _children.begin();
i != _children.end(); ++i)
{
if (*i != NULL)
if (*i)
delete *i;
}
_children.clear(); //destroy the content
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment