| 1 |
<?xml version="1.0"?> |
| 2 |
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
| 3 |
targetNamespace="http://www.hydrogen-music.org/drumkit_pattern" |
| 4 |
xmlns:h2="http://www.hydrogen-music.org/drumkit_pattern" |
| 5 |
elementFormDefault="qualified"> |
| 6 |
|
| 7 |
<!-- BOOL --> |
| 8 |
<xsd:simpleType name="bool"> |
| 9 |
<xsd:restriction base="xsd:string"> |
| 10 |
<xsd:enumeration value="true"/> |
| 11 |
<xsd:enumeration value="false"/> |
| 12 |
</xsd:restriction> |
| 13 |
</xsd:simpleType> |
| 14 |
|
| 15 |
<!-- PSFLOAT - positive small float [0.0; 1.0] --> |
| 16 |
<xsd:simpleType name='psfloat'> |
| 17 |
<xsd:restriction base='xsd:float'> |
| 18 |
<xsd:minInclusive value='0.0'/> |
| 19 |
<xsd:maxInclusive value='1.0'/> |
| 20 |
</xsd:restriction> |
| 21 |
</xsd:simpleType> |
| 22 |
|
| 23 |
<!-- PSFLOAT - positive small float [0.0; 0.5] --> |
| 24 |
<xsd:simpleType name='psfloat5'> |
| 25 |
<xsd:restriction base='xsd:float'> |
| 26 |
<xsd:minInclusive value='0.0'/> |
| 27 |
<xsd:maxInclusive value='0.5'/> |
| 28 |
</xsd:restriction> |
| 29 |
</xsd:simpleType> |
| 30 |
|
| 31 |
<!-- NOTE --> |
| 32 |
<xsd:element name="note"> |
| 33 |
<xsd:complexType> |
| 34 |
<xsd:sequence> |
| 35 |
<xsd:element name="position" type="xsd:nonNegativeInteger" default="0"/> |
| 36 |
<xsd:element name="leadlag" type="xsd:float" default="0.0"/> |
| 37 |
<xsd:element name="velocity" type="h2:psfloat" default="0.8"/> |
| 38 |
<xsd:element name="pan_L" type="h2:psfloat5" default="0.5"/> |
| 39 |
<xsd:element name="pan_R" type="h2:psfloat5" default="0.5"/> |
| 40 |
<xsd:element name="pitch" type="xsd:float" default="0.0"/> |
| 41 |
<xsd:element name="key" type="xsd:string" default="C0"/> |
| 42 |
<xsd:element name="length" type="xsd:integer" default="-1"/> |
| 43 |
<xsd:element name="instrument" type="xsd:integer"/> |
| 44 |
<xsd:element name="note_off" type="h2:bool" default="false"/> |
| 45 |
<xsd:element name="probability" type="xsd:float" default="1.0"/> |
| 46 |
</xsd:sequence> |
| 47 |
</xsd:complexType> |
| 48 |
</xsd:element> |
| 49 |
|
| 50 |
<xsd:element name="pattern"> |
| 51 |
<xsd:complexType> |
| 52 |
<xsd:sequence> |
| 53 |
<xsd:element name="name" type="xsd:string" default="unknown"/> |
| 54 |
<xsd:element name="info" type="xsd:string"/> |
| 55 |
<xsd:element name="category" type="xsd:string" default="unknown"/> |
| 56 |
<xsd:element name="size" type="xsd:nonNegativeInteger"/> |
| 57 |
<xsd:element name="noteList"> |
| 58 |
<xsd:complexType> |
| 59 |
<xsd:sequence> |
| 60 |
<xsd:element ref="h2:note" minOccurs="0" maxOccurs="1000"/> |
| 61 |
</xsd:sequence> |
| 62 |
</xsd:complexType> |
| 63 |
</xsd:element> |
| 64 |
</xsd:sequence> |
| 65 |
</xsd:complexType> |
| 66 |
</xsd:element> |
| 67 |
|
| 68 |
<!-- DRUMKIT PATTERN --> |
| 69 |
<xsd:element name="drumkit_pattern"> |
| 70 |
<xsd:complexType> |
| 71 |
<xsd:sequence> |
| 72 |
<xsd:element name="drumkit_name" type="xsd:string"/> |
| 73 |
<xsd:element name="author" type="xsd:string"/> |
| 74 |
<xsd:element name="license" type="xsd:string"/> |
| 75 |
<xsd:element ref="h2:pattern" minOccurs="1" maxOccurs="1"/> |
| 76 |
</xsd:sequence> |
| 77 |
</xsd:complexType> |
| 78 |
</xsd:element> |
| 79 |
|
| 80 |
</xsd:schema> |