<!--
{
  "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/InstrumentActivityResult",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Music Understanding"
    ],
    "preciseIdentifier" : "s:18MusicUnderstanding24InstrumentActivityResultV"
  },
  "title" : "InstrumentActivityResult"
}
-->

# InstrumentActivityResult

A structure containing the activity levels and detected time ranges for instruments in a song.

```
struct InstrumentActivityResult
```

## Overview

The [`activity`](/documentation/MusicUnderstanding/InstrumentActivityResult/activity) property provides a continuous signal for each instrument. The values range from `0.0`, which indicates the instrument isn’t  present, to `1.0`, which indicates the instrument is fully active. The [`ranges`](/documentation/MusicUnderstanding/InstrumentActivityResult/ranges) property provides discrete time windows during which the framework detected each instrument. Use both properties together to determine when an instrument is present and how prominently it features at each moment.

## Topics

### Structures

[`struct Instrument`](/documentation/MusicUnderstanding/InstrumentActivityResult/Instrument)

A type that identifies a specific instrument category.

### Instance Properties

[`let activity: [InstrumentActivityResult.Instrument : [MusicUnderstandingSession.TimedValue<Float>]]`](/documentation/MusicUnderstanding/InstrumentActivityResult/activity)

The activity level of each instrument over time, as values from 0.0 to 1.0.

[`let ranges: [InstrumentActivityResult.Instrument : [CMTimeRange]]`](/documentation/MusicUnderstanding/InstrumentActivityResult/ranges)

The time ranges during which the framework detects each instrument.

## Relationships

### Conforms To

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

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

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

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

---

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)