diff --git a/test/syntax/default_path.json b/test/syntax/default_path.json new file mode 100644 index 0000000..b812646 --- /dev/null +++ b/test/syntax/default_path.json @@ -0,0 +1,92 @@ +{ + "elements": [ + { + "type": "element", + "name": "region", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "sample", + "value": "DefaultPath/SubPath1/sample1.wav" + } + } + ] + }, + { + "type": "element", + "name": "control", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "default_path", + "value": "DefaultPath\\SubPath2\\" + } + } + ] + }, + { + "type": "element", + "name": "region", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "sample", + "value": "sample2.wav" + } + } + ] + }, + { + "type": "element", + "name": "control", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "default_path", + "value": "DefaultPath/SubPath1/sample" + } + } + ] + }, + { + "type": "element", + "name": "region", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "sample", + "value": "1.wav" + } + } + ] + }, + { + "type": "element", + "name": "control" + }, + { + "type": "element", + "name": "region", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "sample", + "value": "DefaultPath/SubPath2/sample2.wav" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/test/syntax/default_path.sfz b/test/syntax/default_path.sfz new file mode 100644 index 0000000..da15889 --- /dev/null +++ b/test/syntax/default_path.sfz @@ -0,0 +1,10 @@ + sample=DefaultPath/SubPath1/sample1.wav + + default_path=DefaultPath\SubPath2\ + sample=sample2.wav + + default_path=DefaultPath/SubPath1/sample + sample=1.wav + + // New control headers reset the default path + sample=DefaultPath/SubPath2/sample2.wav diff --git a/test/syntax/default_path.xml b/test/syntax/default_path.xml new file mode 100644 index 0000000..5d6e480 --- /dev/null +++ b/test/syntax/default_path.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/test/syntax/default_path.yaml b/test/syntax/default_path.yaml new file mode 100644 index 0000000..bded577 --- /dev/null +++ b/test/syntax/default_path.yaml @@ -0,0 +1,52 @@ +elements: + - type: element + name: region + elements: + - type: element + name: opcode + attributes: + name: sample + value: DefaultPath/SubPath1/sample1.wav + - type: element + name: control + elements: + - type: element + name: opcode + attributes: + name: default_path + value: DefaultPath\SubPath2\ + - type: element + name: region + elements: + - type: element + name: opcode + attributes: + name: sample + value: sample2.wav + - type: element + name: control + elements: + - type: element + name: opcode + attributes: + name: default_path + value: DefaultPath/SubPath1/sample + - type: element + name: region + elements: + - type: element + name: opcode + attributes: + name: sample + value: 1.wav + - type: element + name: control + - type: element + name: region + elements: + - type: element + name: opcode + attributes: + name: sample + value: DefaultPath/SubPath2/sample2.wav + diff --git a/test/syntax/default_path_generator.json b/test/syntax/default_path_generator.json new file mode 100644 index 0000000..50dc6c6 --- /dev/null +++ b/test/syntax/default_path_generator.json @@ -0,0 +1,32 @@ +{ + "elements": [ + { + "type": "element", + "name": "control", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "default_path", + "value": "DefaultPath/SubPath1" + } + } + ] + }, + { + "type": "element", + "name": "region", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "sample", + "value": "*sine" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/test/syntax/default_path_generator.sfz b/test/syntax/default_path_generator.sfz new file mode 100644 index 0000000..8b7b652 --- /dev/null +++ b/test/syntax/default_path_generator.sfz @@ -0,0 +1,2 @@ + default_path=DefaultPath/SubPath1 + sample=*sine \ No newline at end of file diff --git a/test/syntax/default_path_generator.xml b/test/syntax/default_path_generator.xml new file mode 100644 index 0000000..6e127bf --- /dev/null +++ b/test/syntax/default_path_generator.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/test/syntax/default_path_generator.yaml b/test/syntax/default_path_generator.yaml new file mode 100644 index 0000000..cb76343 --- /dev/null +++ b/test/syntax/default_path_generator.yaml @@ -0,0 +1,18 @@ +elements: + - type: element + name: control + elements: + - type: element + name: opcode + attributes: + name: default_path + value: DefaultPath/SubPath1 + - type: element + name: region + elements: + - type: element + name: opcode + attributes: + name: sample + value: '*sine' + diff --git a/test/syntax/default_path_include.json b/test/syntax/default_path_include.json new file mode 100644 index 0000000..9985094 --- /dev/null +++ b/test/syntax/default_path_include.json @@ -0,0 +1,204 @@ +{ + "elements": [ + { + "type": "element", + "name": "control" + }, + { + "type": "element", + "name": "master", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "ampeg_release", + "value": "1" + } + } + ] + }, + { + "type": "element", + "name": "control", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "default_path", + "value": "../../test/syntax//path-a" + } + } + ] + }, + { + "type": "element", + "name": "region", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "sample", + "value": "piano.wav" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "pitch_keycenter", + "value": "60" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "lokey", + "value": "58" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "hikey", + "value": "62" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "lovel", + "value": "1" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "hivel", + "value": "20" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "locc64", + "value": "64" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "hicc64", + "value": "127" + } + } + ] + }, + { + "type": "element", + "name": "master", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "ampeg_release", + "value": "3" + } + } + ] + }, + { + "type": "element", + "name": "control", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "default_path", + "value": "../../test/syntax//path-b" + } + } + ] + }, + { + "type": "element", + "name": "region", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "sample", + "value": "piano.wav" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "pitch_keycenter", + "value": "60" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "lokey", + "value": "58" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "hikey", + "value": "62" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "lovel", + "value": "1" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "hivel", + "value": "20" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "locc64", + "value": "64" + } + }, + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "hicc64", + "value": "127" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/test/syntax/default_path_include.sfz b/test/syntax/default_path_include.sfz new file mode 100644 index 0000000..b3e748a --- /dev/null +++ b/test/syntax/default_path_include.sfz @@ -0,0 +1,16 @@ + +#define $USERPATH ../../test/syntax/ + + +ampeg_release=1 + + +default_path=$USERPATH/path-a +#include "$USERPATH/basic.sfz" + + +ampeg_release=3 + + +default_path=$USERPATH/path-b +#include "$USERPATH/basic.sfz" diff --git a/test/syntax/default_path_include.xml b/test/syntax/default_path_include.xml new file mode 100644 index 0000000..eaa6cd8 --- /dev/null +++ b/test/syntax/default_path_include.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/syntax/default_path_include.yaml b/test/syntax/default_path_include.yaml new file mode 100644 index 0000000..271ccfd --- /dev/null +++ b/test/syntax/default_path_include.yaml @@ -0,0 +1,122 @@ +elements: + - type: element + name: control + - type: element + name: master + elements: + - type: element + name: opcode + attributes: + name: ampeg_release + value: '1' + - type: element + name: control + elements: + - type: element + name: opcode + attributes: + name: default_path + value: ../../test/syntax//path-a + - type: element + name: region + elements: + - type: element + name: opcode + attributes: + name: sample + value: piano.wav + - type: element + name: opcode + attributes: + name: pitch_keycenter + value: '60' + - type: element + name: opcode + attributes: + name: lokey + value: '58' + - type: element + name: opcode + attributes: + name: hikey + value: '62' + - type: element + name: opcode + attributes: + name: lovel + value: '1' + - type: element + name: opcode + attributes: + name: hivel + value: '20' + - type: element + name: opcode + attributes: + name: locc64 + value: '64' + - type: element + name: opcode + attributes: + name: hicc64 + value: '127' + - type: element + name: master + elements: + - type: element + name: opcode + attributes: + name: ampeg_release + value: '3' + - type: element + name: control + elements: + - type: element + name: opcode + attributes: + name: default_path + value: ../../test/syntax//path-b + - type: element + name: region + elements: + - type: element + name: opcode + attributes: + name: sample + value: piano.wav + - type: element + name: opcode + attributes: + name: pitch_keycenter + value: '60' + - type: element + name: opcode + attributes: + name: lokey + value: '58' + - type: element + name: opcode + attributes: + name: hikey + value: '62' + - type: element + name: opcode + attributes: + name: lovel + value: '1' + - type: element + name: opcode + attributes: + name: hivel + value: '20' + - type: element + name: opcode + attributes: + name: locc64 + value: '64' + - type: element + name: opcode + attributes: + name: hicc64 + value: '127' + diff --git a/test/syntax/default_path_reset.json b/test/syntax/default_path_reset.json new file mode 100644 index 0000000..509189f --- /dev/null +++ b/test/syntax/default_path_reset.json @@ -0,0 +1,18 @@ +{ + "elements": [ + { + "type": "element", + "name": "region", + "elements": [ + { + "type": "element", + "name": "opcode", + "attributes": { + "name": "sample", + "value": "DefaultPath/SubPath2/sample2.wav" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/test/syntax/default_path_reset.sfz b/test/syntax/default_path_reset.sfz new file mode 100644 index 0000000..55a4bea --- /dev/null +++ b/test/syntax/default_path_reset.sfz @@ -0,0 +1 @@ + sample=DefaultPath/SubPath2/sample2.wav \ No newline at end of file diff --git a/test/syntax/default_path_reset.xml b/test/syntax/default_path_reset.xml new file mode 100644 index 0000000..bd9b3d0 --- /dev/null +++ b/test/syntax/default_path_reset.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/syntax/default_path_reset.yaml b/test/syntax/default_path_reset.yaml new file mode 100644 index 0000000..0a92e7b --- /dev/null +++ b/test/syntax/default_path_reset.yaml @@ -0,0 +1,10 @@ +elements: + - type: element + name: region + elements: + - type: element + name: opcode + attributes: + name: sample + value: DefaultPath/SubPath2/sample2.wav +