         let startNoteKey = "startnote"
         let endNoteKey = "endnote"
         let filenameKey = "filename"
+        let triggerModeKey = "triggerMode"
         var loadSoundsArr = Array<NSMutableDictionary>()
         var sampleZoneXML = ""
         var sampleIDXML = ""

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

        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")
