@@ -86,13 +86,6 @@ auto vamp_zero::parse_notation_document(std::string_view json, std::string sourc
|
||||
return invalid(std::string{part.error().message()});
|
||||
}
|
||||
document.part = std::move(*part);
|
||||
if (metadata->if_contains("authored_key_signature")) {
|
||||
auto key = string_field(*metadata, "authored_key_signature");
|
||||
if (!key || key->empty()) {
|
||||
return invalid("authored_key_signature must be a nonempty string");
|
||||
}
|
||||
document.authored_key_signature = std::move(*key);
|
||||
}
|
||||
if (staff.if_contains("arrangement_part_type")) {
|
||||
auto type = string_field(staff, "arrangement_part_type");
|
||||
if (!type) {
|
||||
@@ -100,13 +93,6 @@ auto vamp_zero::parse_notation_document(std::string_view json, std::string sourc
|
||||
}
|
||||
document.arrangement_part_type = std::move(*type);
|
||||
}
|
||||
if (document.arrangement_part_type == "practice" && document.key_signature == "No key" && metadata->if_contains("variant_tonic")) {
|
||||
auto tonic = string_field(*metadata, "variant_tonic");
|
||||
if (!tonic) {
|
||||
return invalid(std::string{tonic.error().message()});
|
||||
}
|
||||
document.key_signature = *tonic + " (no key)";
|
||||
}
|
||||
for (auto const &item : *pages) {
|
||||
if (!item.is_object()) {
|
||||
return invalid("page must be an object");
|
||||
|
||||
Reference in New Issue
Block a user