     // Assume number field is set and valid:  Process and update tuning table.
     private func updateTuningTable() {
         AKLog("Updating tuning table from numberField: \(numberField)")
-        for i in 0..<AKTuningTable.numberOfMidiNotes {
+        for i in 0 ..< AKTuningTable.numberOfMidiNotes {
             let ff = Element(i - Int(noteNumberAtMiddleC)) / Element(numberField.count)
             var ttOctaveFactor = Element(trunc(ff))
             if ff < 0 {


@objc open class AKTuningTable: NSObject {
   
    private static let NYQUIST:Element = 22050

    public typealias Element = Double
    

        guard let string = inputString else {return nil}
        
        let leadingTrailingWhiteSpacesPattern = "(?:^\\s+)|(?:\\s+$)"
        var regex: NSRegularExpression?
        
        do {
            try regex = NSRegularExpression.init(pattern: leadingTrailingWhiteSpacesPattern,
                                                 options: NSRegularExpression.Options.caseInsensitive)
        } catch let error as NSError {
            AKLog("ERROR: create regex: \(error)")
            return nil
        }
        
        let stringRange = NSMakeRange(0, string.characters.count)
        let trimmedString = regex?.stringByReplacingMatches(in: string,
                                                            options: NSRegularExpression.MatchingOptions.reportProgress,
                                                            range: stringRange,
                                                            withTemplate: "$1")
        
        return trimmedString
    }
