scoreFromSemantic function
Parses a TrOMR semantic token stream into a single-staff Score.
Throws FormatException if no music tokens are present.
Implementation
Score scoreFromSemantic(String semantic) {
final tokens = semantic
.split('+')
.map((t) => t.trim())
.where((t) => !_specials.contains(t))
.toList();
if (tokens.isEmpty) throw const FormatException('empty semantic stream');
return _SemanticReader(tokens).read();
}