             stingPlayer.prepareToPlay()
         }
     }
+    var numberOfLoops = 0 { didSet { stingPlayer.numberOfLoops = numberOfLoops } }
     
     var normalisedCuePoint: Double {
         get { return cuePoint / stingPlayer.duration }

        let name = try? container.decode(String.self, forKey: .name)
        let color = (try? container.decode(Color.self, forKey: .color)) ?? .default;    #warning("Replace ?? after implementing file picker")
        let cuePoint = try container.decode(Double.self, forKey: .cuePoint)
        
        if let stingPlayer = try? AVAudioPlayer(contentsOf: url) {
            self.url = url
            self.name = name
            self.color = color
            self.cuePoint = cuePoint
            self.songTitle = url.songTitle() ?? "Unknown"
            self.songArtist = url.songArtist() ?? "Unknown"
            self.stingPlayer = stingPlayer
        } else {    #warning("Test this as a fallthrough case")
            self.url = Sting.defaultURL
            self.color = .default
            self.cuePoint = 0

        case name
        case color
        case cuePoint
        case numberOfLoops
    }
    
    required init(from decoder: Decoder) throws {
