Add a test for key switch MIDNAM
This commit is contained in:
parent
8fcafa7b67
commit
2de8fe237f
2 changed files with 14 additions and 0 deletions
|
|
@ -586,3 +586,13 @@ TEST_CASE("[Files] Labels")
|
||||||
REQUIRE(xmlMidnam.find("<Control Type=\"7bit\" Number=\"54\" Name=\"Gain\" />") != xmlMidnam.npos);
|
REQUIRE(xmlMidnam.find("<Control Type=\"7bit\" Number=\"54\" Name=\"Gain\" />") != xmlMidnam.npos);
|
||||||
REQUIRE(xmlMidnam.find("<Control Type=\"7bit\" Number=\"2\" Name=\"Other\" />") != xmlMidnam.npos);
|
REQUIRE(xmlMidnam.find("<Control Type=\"7bit\" Number=\"2\" Name=\"Other\" />") != xmlMidnam.npos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("[Files] Switch labels")
|
||||||
|
{
|
||||||
|
sfz::Synth synth;
|
||||||
|
synth.loadSfzFile(fs::current_path() / "tests/TestFiles/labels_sw.sfz");
|
||||||
|
const std::string xmlMidnam = synth.exportMidnam();
|
||||||
|
REQUIRE(xmlMidnam.find("<Note Number=\"36\" Name=\"Sine\" />") != xmlMidnam.npos);
|
||||||
|
REQUIRE(xmlMidnam.find("<Note Number=\"38\" Name=\"Triangle\" />") != xmlMidnam.npos);
|
||||||
|
REQUIRE(xmlMidnam.find("<Note Number=\"40\" Name=\"Saw\" />") != xmlMidnam.npos);
|
||||||
|
}
|
||||||
|
|
|
||||||
4
tests/TestFiles/labels_sw.sfz
Normal file
4
tests/TestFiles/labels_sw.sfz
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<global> sw_lokey=36 sw_hikey=40 sw_default=36
|
||||||
|
<region> sw_last=36 sw_label=Sine lokey=41 sample=*sine
|
||||||
|
<region> sw_last=38 sw_label=Triangle lokey=41 sample=*triangle
|
||||||
|
<region> sw_last=40 sw_label=Saw lokey=41 sample=*saw
|
||||||
Loading…
Add table
Reference in a new issue