---
url: https://flat.io/developers/docs/embed/api/parts.md
description: Manage individual parts, instruments, and their audio settings
---

# Parts & Instruments

Manage individual parts, instruments, and their audio settings

## Methods

### getPartVolume() {#getpartvolume}

Get the volume of a specific part

Retrieves the current volume level for a specific instrument part in the score.

```typescript
getPartVolume(parameters: { partUuid: string; }): Promise<number>
```

**Parameters:**

* `parameters.partUuid` - `string`

**Returns:** `Promise<number>`

**Throws:**

* `Error` - If the part UUID is invalid or volume cannot be retrieved

**Example:**

```typescript
const embed = new Embed('container', config);
const partVolume = await embed.getPartVolume({ partUuid: '00000000-0000-0000-0000-000000000001' });
console.log(partVolume);
```

**See also:**

* [`setPartVolume()`](#setpartvolume) - Set the volume for a part
* [`getParts()`](#getparts) - Get all parts information

***

### setPartVolume() {#setpartvolume}

Set the volume of a specific part

Sets the volume level for a specific instrument part in the score. Part volumes are independent but affected by the master volume.

```typescript
setPartVolume(parameters: { partUuid: string; volume: number; }): Promise<void>
```

**Parameters:**

* `parameters.partUuid` - `string`
* `parameters.volume` - `number`

**Returns:** `Promise<void>`

**Throws:**

* `Error` - If the part UUID or volume value is invalid

**Examples:**

```typescript
// Set violin part to 75% volume
const parts = await embed.getParts();
await embed.setPartVolume({
  partUuid: parts[0].uuid,
  volume: 75
});
```

**See also:**

* [`getPartVolume()`](#getpartvolume) - Get the volume for a part
* [`mutePart()`](#mutepart) - Mute a part

***

### mutePart() {#mutepart}

Mute a specific part

Mutes the audio output for a specific instrument part. The part's volume setting is preserved and can be restored using `unmutePart()`.

```typescript
mutePart(parameters: { partUuid: string; }): Promise<void>
```

**Parameters:**

* `parameters.partUuid` - `string`

**Returns:** `Promise<void>`

**Throws:**

* `Error` - If the part UUID is invalid or muting fails

**Example:**

```typescript
const embed = new Embed('container', config);
await embed.mutePart({ partUuid: '00000000-0000-0000-0000-000000000001' });
```

**See also:**

* [`unmutePart()`](#unmutepart) - Unmute a part
* [`setPartVolume()`](#setpartvolume) - Set part volume to 0 (alternative)

***

### unmutePart() {#unmutepart}

Unmute a specific part

Restores the audio output for a previously muted part. The part returns to its previous volume level before it was muted.

```typescript
unmutePart(parameters: { partUuid: string; }): Promise<void>
```

**Parameters:**

* `parameters.partUuid` - `string`

**Returns:** `Promise<void>`

**Throws:**

* `Error` - If the part UUID is invalid or unmuting fails

**Example:**

```typescript
const embed = new Embed('container', config);
await embed.unmutePart({ partUuid: '00000000-0000-0000-0000-000000000001' });
```

**See also:**

* [`mutePart()`](#mutepart) - Mute a part

***

### setPartSoloMode() {#setpartsolomode}

Enable solo mode for a part

Enables solo mode for a specific part, which mutes all other parts while keeping the selected part audible. Multiple parts can be in solo mode simultaneously.

```typescript
setPartSoloMode(parameters: { partUuid: string; }): Promise<void>
```

**Parameters:**

* `parameters.partUuid` - `string`

**Returns:** `Promise<void>`

**Throws:**

* `Error` - If the part UUID is invalid or solo mode cannot be set

**Examples:**

```typescript
// Solo the violin part
const parts = await embed.getParts();
const violinPart = parts.find(p => p.instrument === 'violin');
await embed.setPartSoloMode({ partUuid: violinPart.uuid });
```

**See also:**

* [`unsetPartSoloMode()`](#unsetpartsolomode) - Disable solo mode
* [`getPartSoloMode()`](#getpartsolomode) - Check solo mode status

***

### unsetPartSoloMode() {#unsetpartsolomode}

Disable solo mode for a part

Disables solo mode for a specific part. If this was the only part in solo mode, all parts return to their normal volume/mute states. If other parts remain in solo mode, this part will be muted.

```typescript
unsetPartSoloMode(parameters: { partUuid: string; }): Promise<void>
```

**Parameters:**

* `parameters.partUuid` - `string`

**Returns:** `Promise<void>`

**Throws:**

* `Error` - If the part UUID is invalid or solo mode cannot be unset

**Example:**

```typescript
const embed = new Embed('container', config);
await embed.unsetPartSoloMode({ partUuid: '00000000-0000-0000-0000-000000000001' });
```

**See also:**

* [`setPartSoloMode()`](#setpartsolomode) - Enable solo mode
* [`getPartSoloMode()`](#getpartsolomode) - Check solo mode status

***

### getPartSoloMode() {#getpartsolomode}

Get the solo mode status of a part

Checks whether a specific part is currently in solo mode.

```typescript
getPartSoloMode(parameters: { partUuid: string; }): Promise<boolean>
```

**Parameters:**

* `parameters.partUuid` - `string`

**Returns:** `Promise<boolean>`

**Throws:**

* `Error` - If the part UUID is invalid

**Example:**

```typescript
const embed = new Embed('container', config);
const partSoloMode = await embed.getPartSoloMode({ partUuid: '00000000-0000-0000-0000-000000000001' });
console.log(partSoloMode);
```

**See also:**

* [`setPartSoloMode()`](#setpartsolomode) - Enable solo mode
* [`unsetPartSoloMode()`](#unsetpartsolomode) - Disable solo mode

***

### getPartReverb() {#getpartreverb}

Get the reverb level of a part

Retrieves the current reverb (reverberation) effect level for a specific instrument part. Reverb adds spatial depth and ambience to the sound.

```typescript
getPartReverb(parameters: { partUuid: string; }): Promise<number>
```

**Parameters:**

* `parameters.partUuid` - `string`

**Returns:** `Promise<number>`

**Throws:**

* `Error` - If the part UUID is invalid or reverb cannot be retrieved

**Example:**

```typescript
const embed = new Embed('container', config);
const partReverb = await embed.getPartReverb({ partUuid: '00000000-0000-0000-0000-000000000001' });
console.log(partReverb);
```

**See also:**

* [`setPartReverb()`](#setpartreverb) - Set the reverb level

***

### setPartReverb() {#setpartreverb}

Set the reverb level of a part

Sets the reverb (reverberation) effect level for a specific instrument part. Higher values create more spacious, ambient sound.

```typescript
setPartReverb(parameters: { partUuid: string; reverberation: number; }): Promise<void>
```

**Parameters:**

* `parameters.partUuid` - `string`
* `parameters.reverberation` - `number`

**Returns:** `Promise<void>`

**Throws:**

* `Error` - If the part UUID or reverb value is invalid

**Examples:**

```typescript
// Add subtle reverb to piano
await embed.setPartReverb({
  partUuid: pianoPart.uuid,
  reverberation: 30
});
```

**See also:**

* [`getPartReverb()`](#getpartreverb) - Get the current reverb level

***

### getParts() {#getparts}

Get information about all parts

Retrieves detailed information about all instrument parts in the score, including their names, instruments, and unique identifiers.

```typescript
getParts(): Promise<PartConfiguration[]>
```

**Returns:** `Promise<PartConfiguration[]>`

**Throws:**

* `Error` - If no score is loaded or parts cannot be retrieved

**Examples:**

```typescript
// Get all parts
const parts = await embed.getParts();
parts.forEach(part => {
  console.log(`${part.name}: ${part.uuid}`);
});
```

**See also:**

* [`getDisplayedParts()`](#getdisplayedparts) - Get currently visible parts
* [`setDisplayedParts()`](#setdisplayedparts) - Choose which parts to display

***

### getDisplayedParts() {#getdisplayedparts}

Get the currently displayed parts

Retrieves information about which parts are currently visible in the score. Some parts may be hidden for focused practice or simplified viewing.

```typescript
getDisplayedParts(): Promise<PartConfiguration[]>
```

**Returns:** `Promise<PartConfiguration[]>`

**Throws:**

* `Error` - If displayed parts cannot be retrieved

**Example:**

```typescript
const embed = new Embed('container', config);
const displayedParts = await embed.getDisplayedParts();
console.log(displayedParts);
```

**See also:**

* [`getParts()`](#getparts) - Get all parts in the score
* [`setDisplayedParts()`](#setdisplayedparts) - Change which parts are visible

***

### setDisplayedParts() {#setdisplayedparts}

Set which parts to display

Controls which instrument parts are visible in the score. Parts can be identified by their UUID, index, name, or abbreviation. Hidden parts are not displayed but still play during playback unless muted.

```typescript
setDisplayedParts(parts: string[]): Promise<void>
```

**Parameters:**

* `parts` - `string[]`

**Returns:** `Promise<void>`

**Throws:**

* `Error` - If part identifiers are invalid

**Examples:**

```typescript
// Show only violin and piano parts by UUID
const parts = await embed.getParts();
const violin = parts.find(p => p.instrument === 'violin');
const piano = parts.find(p => p.instrument === 'piano');
await embed.setDisplayedParts([violin.uuid, piano.uuid]);
```

```typescript
// Show parts by index
await embed.setDisplayedParts(['0', '2', '3']);
```

**See also:**

* [`getParts()`](#getparts) - Get all available parts
* [`getDisplayedParts()`](#getdisplayedparts) - Check which parts are visible

***
