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

        return str
    }
    
    static public func generateFileRef(wavRef: Int = 268435457, samplePath: String) -> String {
        var str: String = ""
        str.appendContentsOf("            <key>Sample:\(wavRef)</key>\n")
        str.appendContentsOf("            <string>\(samplePath)</string>\n")

        return str
    }
    
    static func generateEnvelope(id: Int = 0,
                                 delay: Double = 0.0,
                                 attack: Double = 0.0,
                                 hold: Double = 0.0,
