Opcode normalizations for cutoff and resonance

This commit is contained in:
Jean Pierre Cimalando 2020-05-05 03:29:07 +02:00
parent 4063d0e35f
commit 1985108574
3 changed files with 866 additions and 706 deletions

File diff suppressed because it is too large Load diff

View file

@ -128,16 +128,24 @@ end_generic:
goto end_region;
}
"fil_" (any) END {
opcode = absl::StrCat("fil1_", group(1));
goto end_region;
}
"on_" ("hi"|"lo") "cc" (number) END {
opcode = absl::StrCat("start_", group(1), "cc", group(2));
goto end_region;
}
"fil_" (any) END {
opcode = absl::StrCat("fil1_", group(1));
goto end_region;
}
"cutoff" ("_" any)? END {
opcode = absl::StrCat("cutoff1", group(1));
goto end_region;
}
"resonance" ("_" any)? END {
opcode = absl::StrCat("resonance1", group(1));
goto end_region;
}
* {
goto end_region;
}

View file

@ -205,6 +205,12 @@ TEST_CASE("[Opcode] Normalization")
// SFZv2 aliases
{"on_hicc22", "start_hicc22"},
{"on_locc23", "start_locc23"},
// Filter SFZv1
{"fil_foobar", "fil1_foobar"},
{"cutoff", "cutoff1"},
{"cutoff_foobar", "cutoff1_foobar"},
{"resonance", "resonance1"},
{"resonance_foobar", "resonance1_foobar"},
};
for (auto pair : regionSpecific) {