<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

<!-- 
TODOS OS ELEMENTOS QUE POSSAM SER CONECTADOS A ALGUMA AUTOMAÇÃO
NÃO PODEM TER SEUS ATRIBUTOS COMO OBRIGATÓRIOS. 
POIS A AUTOMAÇÃO LEVA OS CONTROLES DOS ATRIBUTOS PARA A <AUTOMATIONPATTERN>
-->

    <!-- Raiz do projeto -->
    <xs:element name="lmms-project">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="head" type="HeadType" />
                <xs:element name="song" type="SongType" />
                <xs:element name="fxmixer" type="FxMixerType" minOccurs="0" />
                <xs:element name="ControllerRackView" type="SimplePanelType" minOccurs="0" />
                <xs:element name="pianoroll" type="SimplePanelType" minOccurs="0" />
                <xs:element name="automationeditor" type="SimplePanelType" minOccurs="0" />
                <xs:element name="projectnotes" type="SimplePanelType" minOccurs="0" />
                <xs:element name="timeline" type="TimelineType" minOccurs="0" />
                <xs:element name="controllers" type="ControllersType" minOccurs="0" />
            </xs:sequence>
            <xs:attribute name="version" type="xs:string" use="required" />
            <xs:attribute name="type" type="xs:string" use="required" />
            <xs:attribute name="creator" type="xs:string" use="required" />
            <xs:attribute name="creatorversion" type="xs:string" use="required" />
        </xs:complexType>
    </xs:element>

    <!-- Cabeçalho do projeto -->
    <xs:complexType name="HeadType">
        <xs:attribute name="bpm" type="xs:decimal" use="required" />
        <xs:attribute name="timesig_numerator" type="xs:integer" use="required" />
        <xs:attribute name="timesig_denominator" type="xs:integer" use="required" />
        <xs:attribute name="mastervol" type="xs:integer" use="required" />
        <xs:attribute name="masterpitch" type="xs:integer" use="required" />
    </xs:complexType>

    <!-- SongType (RAÍZ) -->
    <xs:complexType name="SongType">
        <xs:sequence>
            <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" />
        </xs:sequence>
    </xs:complexType>

    <!-- Container de trilhas -->
    <xs:element name="trackcontainer">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="track" type="TrackType" maxOccurs="unbounded" />
            </xs:sequence>
            <xs:attribute name="type" type="xs:string" use="required" />
            <xs:attribute name="x" type="xs:integer" use="required" />
            <xs:attribute name="y" type="xs:integer" use="required" />
            <xs:attribute name="width" type="xs:integer" use="required" />
            <xs:attribute name="height" type="xs:integer" use="required" />
            <xs:attribute name="visible" type="xs:boolean" use="required" />
            <xs:attribute name="minimized" type="xs:boolean" use="required" />
            <xs:attribute name="maximized" type="xs:boolean" use="required" />
        </xs:complexType>
    </xs:element>

    <!-- Trilhas -->
    <xs:complexType name="TrackType">
        <xs:sequence>
            <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" />
        </xs:sequence>
        <xs:attribute name="x" type="xs:integer" />
        <xs:attribute name="y" type="xs:integer" />
        <xs:attribute name="type" type="xs:integer" use="required" />
        <xs:attribute name="name" type="xs:string" use="required" />
        <xs:attribute name="muted" type="xs:boolean" use="required" />
        <xs:attribute name="solo" type="xs:boolean" use="required" />
    </xs:complexType>

    <!-- FxMixerType -->
    <xs:complexType name="FxMixerType">
        <xs:sequence>
            <xs:element name="fxchannel" type="FxChannelType" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
        <xs:attribute name="minimized" type="xs:boolean" />
        <xs:attribute name="maximized" type="xs:boolean" />
        <xs:attribute name="height" type="xs:integer" />
        <xs:attribute name="y" type="xs:integer" />
        <xs:attribute name="x" type="xs:integer" />
        <xs:attribute name="visible" type="xs:boolean" />
        <xs:attribute name="width" type="xs:integer" />
    </xs:complexType>

    <!-- FxChannelType -->
    <xs:complexType name="FxChannelType">
        <xs:sequence>
            <xs:element name="fxchain" type="FxChainType" minOccurs="0" maxOccurs="1" />
            <xs:element name="send" type="SendType" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
        <xs:attribute name="muted" type="xs:boolean" />
        <xs:attribute name="num" type="xs:integer" />
        <xs:attribute name="volume" type="xs:decimal" />
        <xs:attribute name="soloed" type="xs:boolean" />
        <xs:attribute name="name" type="xs:string" />
    </xs:complexType>

    <!-- FxChainType -->
    <xs:complexType name="FxChainType">
        <xs:attribute name="enabled" type="xs:boolean" />
        <xs:attribute name="numofeffects" type="xs:integer" />
    </xs:complexType>

    <!-- SendType -->
    <xs:complexType name="SendType">
        <xs:attribute name="channel" type="xs:integer" />
        <xs:attribute name="amount" type="xs:decimal" />
    </xs:complexType>

    <!-- Trilha de instrumento -->
    <xs:element name="instrumenttrack">
        <xs:complexType>
            <xs:sequence>
                <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
            </xs:sequence>
            <xs:attribute name="vol" type="xs:decimal" /> <!-- deve ser decimal, pois se automatizar, não é inteiro mais -->
            <xs:attribute name="pan" type="xs:decimal" /> <!-- deve ser decimal, pois se automatizar, não é inteiro mais -->
            <xs:attribute name="pitch" type="xs:integer" />
            <xs:attribute name="fxch" type="xs:integer" />
            <xs:attribute name="basenote" type="xs:integer" />
            <xs:attribute name="usemasterpitch" type="xs:boolean" />
            <xs:attribute name="pitchrange" type="xs:integer" />
        </xs:complexType>
    </xs:element>

    <!-- Pattern -->
    <xs:element name="pattern">
        <xs:complexType>
        <xs:sequence>
            <xs:element name="note" minOccurs="0" maxOccurs="unbounded">
            <xs:complexType>
                <xs:attribute name="pan" type="xs:integer" use="required"/>
                <xs:attribute name="pos" type="xs:integer" use="required"/>
                <xs:attribute name="key" type="xs:integer" use="required"/>
                <xs:attribute name="vol" type="xs:integer" use="required"/>
                <xs:attribute name="len" type="xs:integer" use="required"/>
            </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="muted" type="xs:integer" use="required"/>
        <xs:attribute name="steps" type="xs:integer" use="required"/>
        <xs:attribute name="type" type="xs:integer" use="required"/>
        <xs:attribute name="pos" type="xs:integer" use="required"/>
        <xs:attribute name="name" type="xs:string" use="required"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="automationpattern">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="time" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:attribute name="value" type="xs:decimal" use="required"/>
                        <xs:attribute name="pos" type="xs:integer" use="required"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="object" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:attribute name="id" type="xs:integer" use="required"/>                        
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
            <xs:attribute name="mute" type="xs:integer" use="required"/>
            <xs:attribute name="prog" type="xs:integer" use="required"/>
            <xs:attribute name="pos" type="xs:integer" use="required"/>
            <xs:attribute name="name" type="xs:string" use="required"/>
            <xs:attribute name="tens" type="xs:integer" use="required"/>
            <xs:attribute name="len" type="xs:integer" use="required"/>
        </xs:complexType>
    </xs:element>


    <!-- sampletrack -->    
    <xs:element name="sampletrack">
        <xs:complexType>
        <xs:sequence>
            <xs:element name="fxchain" minOccurs="1" maxOccurs="1">
            <xs:complexType>
                <xs:attribute name="enabled" type="xs:int" use="required"/>
                <xs:attribute name="numofeffects" type="xs:int" use="required"/>
            </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="pan" type="xs:int" use="required"/>
        <xs:attribute name="vol" type="xs:int" use="required"/>
        </xs:complexType>
    </xs:element>

    <!-- Instrumento TEM QUE VERIFICAR --> 
    <xs:element name="name">
        <xs:complexType>
            <xs:choice>
                <xs:element name="audiofileprocessor">
                    <xs:complexType>
                        <xs:attribute name="eframe" type="xs:integer" use="required" />
                        <xs:attribute name="stutter" type="xs:boolean" use="required" />
                        <xs:attribute name="looped" type="xs:boolean" use="required" />
                        <xs:attribute name="interp" type="xs:boolean" use="required" />
                        <xs:attribute name="reversed" type="xs:boolean" use="required" />
                        <xs:attribute name="lframe" type="xs:integer" use="required" />
                        <xs:attribute name="src" type="xs:string" use="required" />
                        <xs:attribute name="amp" type="xs:integer" use="required" />
                        <xs:attribute name="sframe" type="xs:integer" use="required" />
                    </xs:complexType>
                </xs:element>

                <xs:element name="kicker">
                    <xs:complexType>
                        <xs:attribute name="decay" type="xs:decimal" use="required" />
                        <xs:attribute name="gain" type="xs:decimal" use="required" />
                        <xs:attribute name="slope" type="xs:decimal" use="required" />
                        <xs:attribute name="endfreq" type="xs:decimal" use="required" />
                        <xs:attribute name="startfreq" type="xs:decimal" use="required" />
                        <xs:attribute name="version" type="xs:integer" use="required" />
                        <xs:attribute name="dist" type="xs:decimal" use="required" />
                        <xs:attribute name="click" type="xs:decimal" use="required" />
                        <xs:attribute name="distend" type="xs:decimal" use="required" />
                        <xs:attribute name="env" type="xs:decimal" use="required" />
                        <xs:attribute name="endnote" type="xs:integer" use="required" />
                        <xs:attribute name="startnote" type="xs:integer" use="required" />
                        <xs:attribute name="decay_numerator" type="xs:integer" use="required" />
                        <xs:attribute name="decay_syncmode" type="xs:integer" use="required" />
                        <xs:attribute name="decay_denominator" type="xs:integer" use="required" />
                        <xs:attribute name="noise" type="xs:decimal" use="required" />
                    </xs:complexType>
                </xs:element>

                <xs:element name="tripleoscillator">
                    <xs:complexType>
                        <xs:attribute name="pan0" type="xs:decimal" use="required" />
                        <xs:attribute name="phoffset1" type="xs:decimal" use="required" />
                        <xs:attribute name="modalgo2" type="xs:integer" use="required" />
                        <xs:attribute name="vol0" type="xs:integer" use="required" />
                        <xs:attribute name="wavetype1" type="xs:integer" use="required" />
                        <xs:attribute name="userwavefile2" type="xs:string" use="required" />
                        <xs:attribute name="phoffset2" type="xs:decimal" use="required" />
                        <xs:attribute name="modalgo1" type="xs:integer" use="required" />
                        <xs:attribute name="finer0" type="xs:integer" use="required" />
                        <xs:attribute name="finer1" type="xs:integer" use="required" />
                        <xs:attribute name="finer2" type="xs:integer" use="required" />
                        <xs:attribute name="coarse1" type="xs:integer" use="required" />
                        <xs:attribute name="stphdetun0" type="xs:decimal" use="required" />
                        <xs:attribute name="stphdetun1" type="xs:decimal" use="required" />
                        <xs:attribute name="modalgo3" type="xs:integer" use="required" />
                        <xs:attribute name="pan1" type="xs:decimal" use="required" />
                        <xs:attribute name="finel2" type="xs:integer" use="required" />
                        <xs:attribute name="coarse0" type="xs:integer" use="required" />
                        <xs:attribute name="userwavefile0" type="xs:string" use="required" />
                        <xs:attribute name="userwavefile1" type="xs:string" use="required" />
                        <xs:attribute name="stphdetun2" type="xs:decimal" use="required" />
                        <xs:attribute name="finel1" type="xs:integer" use="required" />
                        <xs:attribute name="vol2" type="xs:integer" use="required" />
                        <xs:attribute name="pan2" type="xs:decimal" use="required" />
                        <xs:attribute name="finel0" type="xs:integer" use="required" />
                        <xs:attribute name="vol1" type="xs:integer" use="required" />
                        <xs:attribute name="phoffset0" type="xs:decimal" use="required" />
                        <xs:attribute name="coarse2" type="xs:integer" use="required" />
                        <xs:attribute name="wavetype0" type="xs:integer" use="required" />
                        <xs:attribute name="wavetype2" type="xs:integer" use="required" />
                    </xs:complexType>
                </xs:element>

                <xs:element name="BitinvaderType">
                    <xs:complexType>
                        <xs:attribute name="sampleLength" type="xs:integer" use="required" />
                        <xs:attribute name="version" type="xs:string" use="required" />
                        <xs:attribute name="sampleShape" type="xs:string" use="required" />
                        <xs:attribute name="interpolation" type="xs:integer" use="optional" />
                        <xs:attribute name="normalize" type="xs:integer" use="optional" />
                    </xs:complexType>
                </xs:element>

                <xs:element name="PapuType">
                    <xs:complexType>
                        <xs:attribute name="ch4vsd" type="xs:integer" use="optional" />
                        <xs:attribute name="ch1wpd" type="xs:integer" use="optional" />
                        <xs:attribute name="ch1so2" type="xs:integer" use="optional" />
                        <xs:attribute name="ch1ssl" type="xs:integer" use="optional" />
                        <xs:attribute name="Treble" type="xs:integer" use="optional" />
                        <xs:attribute name="sd" type="xs:integer" use="optional" />
                        <xs:attribute name="ch2wpd" type="xs:integer" use="optional" />
                        <xs:attribute name="ch3so2" type="xs:integer" use="optional" />
                        <xs:attribute name="srs" type="xs:integer" use="optional" />
                        <xs:attribute name="ch2vol" type="xs:integer" use="optional" />
                        <xs:attribute name="ch1vsd" type="xs:integer" use="optional" />
                        <xs:attribute name="ch4so2" type="xs:integer" use="optional" />
                        <xs:attribute name="ch1so1" type="xs:integer" use="optional" />
                        <xs:attribute name="srw" type="xs:integer" use="optional" />
                        <xs:attribute name="ch2vsd" type="xs:integer" use="optional" />
                        <xs:attribute name="ch3so1" type="xs:integer" use="optional" />
                        <xs:attribute name="ch4ssl" type="xs:integer" use="optional" />
                        <xs:attribute name="st" type="xs:integer" use="optional" />
                        <xs:attribute name="ch1vol" type="xs:integer" use="optional" />
                        <xs:attribute name="ch2so1" type="xs:integer" use="optional" />
                        <xs:attribute name="ch4so1" type="xs:integer" use="optional" />
                        <xs:attribute name="sampleShape" type="xs:string" use="optional" />
                        <xs:attribute name="ch2so2" type="xs:integer" use="optional" />
                        <xs:attribute name="Bass" type="xs:integer" use="optional" />
                        <xs:attribute name="ch3vol" type="xs:integer" use="optional" />
                        <xs:attribute name="ch2ssl" type="xs:integer" use="optional" />
                        <xs:attribute name="so1vol" type="xs:integer" use="optional" />
                        <xs:attribute name="ch4vol" type="xs:integer" use="optional" />
                        <xs:attribute name="so2vol" type="xs:integer" use="optional" />
                    </xs:complexType>
                </xs:element>

                <xs:element name="GigplayerType">
                    <xs:complexType>
                        <xs:attribute name="patch" type="xs:integer" use="optional" />
                        <xs:attribute name="src" type="xs:string" use="optional" />
                        <xs:attribute name="gain" type="xs:decimal" use="optional" />
                        <xs:attribute name="bank" type="xs:integer" use="optional" />
                    </xs:complexType>
                </xs:element>

                <xs:element name="Lb302Type">
                    <xs:complexType>
                        <xs:attribute name="vcf_dec" type="xs:decimal" use="optional" />
                        <xs:attribute name="vcf_mod" type="xs:decimal" use="optional" />
                        <xs:attribute name="slide" type="xs:integer" use="optional" />
                        <xs:attribute name="dist" type="xs:integer" use="optional" />
                        <xs:attribute name="slide_dec" type="xs:decimal" use="optional" />
                        <xs:attribute name="dead" type="xs:integer" use="optional" />
                        <xs:attribute name="vcf_cut" type="xs:decimal" use="optional" />
                        <xs:attribute name="vcf_res" type="xs:decimal" use="optional" />
                        <xs:attribute name="shape" type="xs:integer" use="optional" />
                        <xs:attribute name="db24" type="xs:integer" use="optional" />
                    </xs:complexType>
                </xs:element>

                <xs:element name="MalletsstkType">
                    <xs:complexType>
                        <xs:attribute name="vib_freq" type="xs:integer" use="optional" />
                        <xs:attribute name="preset" type="xs:integer" use="optional" />
                        <xs:attribute name="velocity" type="xs:integer" use="optional" />
                        <xs:attribute name="vib_gain" type="xs:integer" use="optional" />
                        <xs:attribute name="spread" type="xs:integer" use="optional" />
                        <xs:attribute name="lfo_speed" type="xs:integer" use="optional" />
                        <xs:attribute name="version" type="xs:integer" use="optional" />
                        <xs:attribute name="stick_mix" type="xs:integer" use="optional" />
                        <xs:attribute name="adsr" type="xs:integer" use="optional" />
                        <xs:attribute name="hardness" type="xs:integer" use="optional" />
                        <xs:attribute name="oldversion" type="xs:integer" use="optional" />
                        <xs:attribute name="modulator" type="xs:integer" use="optional" />
                        <xs:attribute name="lfo_depth" type="xs:integer" use="optional" />
                        <xs:attribute name="pressure" type="xs:integer" use="optional" />
                        <xs:attribute name="strike" type="xs:integer" use="optional" />
                        <xs:attribute name="crossfade" type="xs:integer" use="optional" />
                        <xs:attribute name="position" type="xs:integer" use="optional" />
                    </xs:complexType>
                </xs:element>

                <xs:element name="watsyn">
                    <xs:complexType>
                        <xs:attribute name="a1_pan" type="xs:int" use="required" />
                        <xs:attribute name="envDec" type="xs:int" use="required" />
                        <xs:attribute name="a2_rtune" type="xs:int" use="required" />
                        <xs:attribute name="amod" type="xs:int" use="required" />
                        <xs:attribute name="b1_vol" type="xs:int" use="required" />
                        <xs:attribute name="b2_pan" type="xs:int" use="required" />
                        <xs:attribute name="abmix" type="xs:int" use="required" />
                        <xs:attribute name="xtalk" type="xs:int" use="required" />
                        <xs:attribute name="a1_wave" type="xs:string" use="required" />
                        <xs:attribute name="a1_rtune" type="xs:int" use="required" />
                        <xs:attribute name="envHold" type="xs:int" use="required" />
                        <xs:attribute name="b2_vol" type="xs:int" use="required" />
                        <xs:attribute name="b2_mult" type="xs:int" use="required" />
                        <xs:attribute name="a1_vol" type="xs:int" use="required" />
                        <xs:attribute name="a2_ltune" type="xs:int" use="required" />
                        <xs:attribute name="bmod" type="xs:int" use="required" />
                        <xs:attribute name="b1_mult" type="xs:int" use="required" />
                        <xs:attribute name="envAtt" type="xs:int" use="required" />
                        <xs:attribute name="envAtt_denominator" type="xs:int" use="required" />
                        <xs:attribute name="envHold_numerator" type="xs:int" use="required" />
                        <xs:attribute name="b2_ltune" type="xs:int" use="required" />
                        <xs:attribute name="b1_rtune" type="xs:int" use="required" />
                        <xs:attribute name="a1_mult" type="xs:int" use="required" />
                        <xs:attribute name="a2_vol" type="xs:int" use="required" />
                        <xs:attribute name="a2_pan" type="xs:int" use="required" />
                        <xs:attribute name="envDec_numerator" type="xs:int" use="required" />
                        <xs:attribute name="envDec_syncmode" type="xs:int" use="required" />
                        <xs:attribute name="envDec_denominator" type="xs:int" use="required" />
                        <xs:attribute name="envAmt" type="xs:int" use="required" />
                        <xs:attribute name="b2_wave" type="xs:string" use="required" />
                        <xs:attribute name="envHold_syncmode" type="xs:int" use="required" />
                        <xs:attribute name="a2_mult" type="xs:int" use="required" />
                        <xs:attribute name="b2_rtune" type="xs:int" use="required" />
                        <xs:attribute name="a2_wave" type="xs:string" use="required" />
                        <xs:attribute name="envAtt_syncmode" type="xs:int" use="required" />
                        <xs:attribute name="envAtt_numerator" type="xs:int" use="required" />
                        <xs:attribute name="b1_ltune" type="xs:int" use="required" />
                        <xs:attribute name="envHold_denominator" type="xs:int" use="required" />
                        <xs:attribute name="a1_ltune" type="xs:int" use="required" />
                        <xs:attribute name="b1_pan" type="xs:int" use="required" />
                        <xs:attribute name="b1_wave" type="xs:string" use="required" />
                    </xs:complexType>
                </xs:element>

                <xs:element name="vibedstrings">
                    <xs:complexType>
                        <xs:attribute name="pick0" type="xs:int" use="required" />
                        <xs:attribute name="active6" type="xs:int" use="required" />
                        <xs:attribute name="active7" type="xs:int" use="required" />
                        <xs:attribute name="octave0" type="xs:int" use="required" />
                        <xs:attribute name="active1" type="xs:int" use="required" />
                        <xs:attribute name="impulse0" type="xs:int" use="required" />
                        <xs:attribute name="active4" type="xs:int" use="required" />
                        <xs:attribute name="version" type="xs:string" use="required" />
                        <xs:attribute name="active5" type="xs:int" use="required" />
                        <xs:attribute name="detune0" type="xs:int" use="required" />
                        <xs:attribute name="slap0" type="xs:int" use="required" />
                        <xs:attribute name="volume0" type="xs:int" use="required" />
                        <xs:attribute name="pickup0" type="xs:decimal" use="required" />
                        <xs:attribute name="active8" type="xs:int" use="required" />
                        <xs:attribute name="active2" type="xs:int" use="required" />
                        <xs:attribute name="active0" type="xs:int" use="required" />
                        <xs:attribute name="stiffness0" type="xs:int" use="required" />
                        <xs:attribute name="pan0" type="xs:int" use="required" />
                        <xs:attribute name="graph0" type="xs:string" use="required" />
                        <xs:attribute name="length0" type="xs:int" use="required" />
                        <xs:attribute name="active3" type="xs:int" use="required" />
                    </xs:complexType>
                </xs:element>

                <xs:element name="vestige">
                    <xs:complexType>
                        <xs:attribute name="plugin" type="xs:string" use="required" />
                    </xs:complexType>
                </xs:element>

                <xs:element name="sid">
                    <xs:complexType>
                        <xs:attribute name="pulsewidth2" type="xs:int" use="required" />
                        <xs:attribute name="release0" type="xs:int" use="required" />
                        <xs:attribute name="ringmod2" type="xs:int" use="required" />
                        <xs:attribute name="filterResonance" type="xs:int" use="required" />
                        <xs:attribute name="attack0" type="xs:int" use="required" />
                        <xs:attribute name="filtered0" type="xs:int" use="required" />
                        <xs:attribute name="chipModel" type="xs:int" use="required" />
                        <xs:attribute name="waveform0" type="xs:int" use="required" />
                        <xs:attribute name="sustain0" type="xs:int" use="required" />
                        <xs:attribute name="attack2" type="xs:int" use="required" />
                        <xs:attribute name="ringmod1" type="xs:int" use="required" />
                        <xs:attribute name="sync1" type="xs:int" use="required" />
                        <xs:attribute name="release2" type="xs:int" use="required" />
                        <xs:attribute name="filtered1" type="xs:int" use="required" />
                        <xs:attribute name="release1" type="xs:int" use="required" />
                        <xs:attribute name="waveform2" type="xs:int" use="required" />
                        <xs:attribute name="voice3Off" type="xs:int" use="required" />
                        <xs:attribute name="pulsewidth1" type="xs:int" use="required" />
                        <xs:attribute name="sustain1" type="xs:int" use="required" />
                        <xs:attribute name="test0" type="xs:int" use="required" />
                        <xs:attribute name="sync0" type="xs:int" use="required" />
                        <xs:attribute name="sync2" type="xs:int" use="required" />
                        <xs:attribute name="sustain2" type="xs:int" use="required" />
                        <xs:attribute name="coarse2" type="xs:int" use="required" />
                        <xs:attribute name="decay2" type="xs:int" use="required" />
                        <xs:attribute name="coarse0" type="xs:int" use="required" />
                        <xs:attribute name="ringmod0" type="xs:int" use="required" />
                        <xs:attribute name="volume" type="xs:int" use="required" />
                        <xs:attribute name="filtered2" type="xs:int" use="required" />
                        <xs:attribute name="filterMode" type="xs:int" use="required" />
                        <xs:attribute name="waveform1" type="xs:int" use="required" />
                        <xs:attribute name="decay0" type="xs:int" use="required" />
                        <xs:attribute name="decay1" type="xs:int" use="required" />
                        <xs:attribute name="pulsewidth0" type="xs:int" use="required" />
                        <xs:attribute name="voice1Off" type="xs:int" use="required" />
                        <xs:attribute name="coarse1" type="xs:int" use="required" />
                        <xs:attribute name="voice2Off" type="xs:int" use="required" />
                        <xs:attribute name="attack1" type="xs:int" use="required" />
                    </xs:complexType>
                </xs:element>

                <xs:element name="analo4">
                    <xs:complexType>
                        <xs:attribute name="freq" type="xs:int" use="required" />
                        <xs:attribute name="sweep" type="xs:int" use="required" />
                        <xs:attribute name="envAmt" type="xs:int" use="required" />
                        <xs:attribute name="cutoff" type="xs:int" use="required" />
                        <xs:attribute name="mod" type="xs:int" use="required" />
                        <xs:attribute name="envDec" type="xs:int" use="required" />
                        <xs:attribute name="res" type="xs:int" use="required" />
                        <xs:attribute name="decay" type="xs:int" use="required" />
                        <xs:attribute name="envAtt" type="xs:int" use="required" />
                        <xs:attribute name="attack" type="xs:int" use="required" />
                        <xs:attribute name="sweepDepth" type="xs:int" use="required" />
                        <xs:attribute name="sustain" type="xs:int" use="required" />
                        <xs:attribute name="vol" type="xs:int" use="required" />
                        <xs:attribute name="envHold" type="xs:int" use="required" />
                    </xs:complexType>
                </xs:element>
            </xs:choice>
        </xs:complexType>
    </xs:element>

    <!-- Tipos simples para painéis -->
    <xs:complexType name="SimplePanelType">
        <xs:attribute name="height" type="xs:integer" />
        <xs:attribute name="y" type="xs:integer" />
        <xs:attribute name="x" type="xs:integer" />
        <xs:attribute name="visible" type="xs:boolean" />
        <xs:attribute name="width" type="xs:integer" />
    </xs:complexType>

    <xs:complexType name="TimelineType">
        <xs:attribute name="height" type="xs:integer" />
        <xs:attribute name="y" type="xs:integer" />
        <xs:attribute name="x" type="xs:integer" />
        <xs:attribute name="visible" type="xs:boolean" />
        <xs:attribute name="width" type="xs:integer" />
    </xs:complexType>

    <xs:complexType name="ControllersType">
        <xs:attribute name="height" type="xs:integer" />
        <xs:attribute name="y" type="xs:integer" />
        <xs:attribute name="x" type="xs:integer" />
        <xs:attribute name="visible" type="xs:boolean" />
        <xs:attribute name="width" type="xs:integer" />
    </xs:complexType>

</xs:schema>