         str.appendContentsOf(openZones())
         str.appendContentsOf(zones)
         str.appendContentsOf(closeZones())
+        str.appendContentsOf(layerIgnoreNoteOff(ignoreNoteOff))
+        str.appendContentsOf(layerSetVoiceCount(numVoices))
         str.appendContentsOf(closeLayer())
         return str
     }

        str.appendContentsOf("                        <key>enabled</key>\n")
        str.appendContentsOf("                        <true/>\n")
        str.appendContentsOf("                        <key>loop enabled</key>\n")
        str.appendContentsOf("                        <false/>\n")
        str.appendContentsOf("                        <key>max key</key>\n")
        str.appendContentsOf("                        <integer>\(endNote)</integer>\n")
        str.appendContentsOf("                        <key>min key</key>\n")

        str.appendContentsOf("                    <array>\n")
        return str
    }
    static public func generateZone(id: Int, rootNote: Int, startNote: Int, endNote: Int, wavRef: Int = 268435457, offset: Int = 0, loopEnabled:Bool = false) -> String {
        let wavRefNum = wavRef+offset
        var str = ""
        str.appendContentsOf("                    <dict>\n")
