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

        str.appendContentsOf("                    </array>\n")
        return str
    }
    static public func closeLayer() -> String {
        var str = ""
        str.appendContentsOf("                </dict>\n")

        return str
    }
    
    static public func generateLayer(connections: String, envelopes: String = "", filter: String = "", lfos: String = "", zones: String = "", layer: Int = 0, numVoices: Int = 16, ignoreNoteOff: Bool = false) -> String {
        var str = ""
        str.appendContentsOf(openLayer())
        str.appendContentsOf(openConnections())
