         templateStr.appendContentsOf((envelopes == "" ? generateEnvelope() : envelopes))
         templateStr.appendContentsOf(closeEnvelopes())
         templateStr.appendContentsOf((filter == "" ? generateFilter() : filter))
+        templateStr.appendContentsOf(generateID(layer))
         templateStr.appendContentsOf(openLFOs())
         templateStr.appendContentsOf((lfos == "" ? generateLFO() : lfos))
         templateStr.appendContentsOf(closeLFOs())

        templateStr.appendContentsOf("                    <array>\n")
        return templateStr
    }
    static public func generateZone(id:Int, rootNote:Int, startNote:Int, endNote:Int, wavRef:Int = 268435457)->String{
        var templateStr = ""
        templateStr.appendContentsOf("                    <dict>\n")
        templateStr.appendContentsOf("                        <key>ID</key>\n")

 300 = keynumber
 301 = keyvelocity
 536870912 = layer1envelope
 536871168 = layer2envelope (+256)536871424
 268435456 = layer1LFO1
 268435457 = layer1LFO2
 
