<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MusicUnderstanding",
  "identifier" : "/documentation/MusicUnderstanding/MusicUnderstandingSession/RangedValue",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Music Understanding",
      "MusicUnderstanding"
    ],
    "preciseIdentifier" : "s:18MusicUnderstanding0aB7SessionC11RangedValueV"
  },
  "title" : "MusicUnderstandingSession.RangedValue"
}
-->

# MusicUnderstandingSession.RangedValue

A structure that pairs a value over a time range.

```
struct RangedValue<Value> where Value : Decodable, Value : Encodable, Value : Equatable, Value : Sendable
```

## Overview

The `RangedValue` is a container pairing an analysis value with a CMTimeRange segment of media time. Music properties like key and pace change over a track. The results are expressed as a sequence of contiguous segments covering the full timeline.

## Topics

### Getting the time range

[`let range: CMTimeRange`](/documentation/MusicUnderstanding/MusicUnderstandingSession/RangedValue/range)

The time range over which the value applies.

### Getting the value

[`let value: Value`](/documentation/MusicUnderstanding/MusicUnderstandingSession/RangedValue/value)

The value associated with the time range.

### Initializers

[`init(from: any Decoder) throws`](/documentation/MusicUnderstanding/MusicUnderstandingSession/RangedValue/init(from:))

Creates a ranged value by decoding from the given decoder.

### Instance Methods

[`func encode(to: any Encoder) throws`](/documentation/MusicUnderstanding/MusicUnderstandingSession/RangedValue/encode(to:))

Encodes the ranged value into the given encoder.

## Relationships

### Conforms To

[`Decodable`](/documentation/Swift/Decodable)

[`Encodable`](/documentation/Swift/Encodable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)