adjust_audio_levels
Modify audio clip volume levels in Adobe Premiere Pro by setting specific decibel values to balance sound in video projects.
Instructions
Adjusts the volume (gain) of an audio clip on the timeline.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clipId | Yes | The ID of the audio clip to adjust | |
| level | Yes | The new audio level in decibels (dB). Can be positive or negative. |
Implementation Reference
- src/tools/index.ts:1377-1417 (handler)The handler function for 'adjust_audio_levels' tool. It constructs and executes an ExtendScript that finds the clip by ID, accesses its first audio component's Volume property, and sets it to the specified level in dB.private async adjustAudioLevels(clipId: string, level: number): Promise<any> { const script = ` try { var clip = app.project.getClipByID("${clipId}"); if (!clip) { JSON.stringify({ success: false, error: "Clip not found" }); return; } var audioComponent = clip.components[0]; if (!audioComponent || !audioComponent.properties["Volume"]) { JSON.stringify({ success: false, error: "Audio component not found or clip has no audio" }); return; } var oldLevel = audioComponent.properties["Volume"].getValue(); audioComponent.properties["Volume"].setValue(${level}); JSON.stringify({ success: true, message: "Audio level adjusted successfully", clipId: "${clipId}", oldLevel: oldLevel, newLevel: ${level} }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
- src/tools/index.ts:231-237 (schema)The input schema definition and tool metadata for 'adjust_audio_levels' in the getAvailableTools() method.name: 'adjust_audio_levels', description: 'Adjusts the volume (gain) of an audio clip on the timeline.', inputSchema: z.object({ clipId: z.string().describe('The ID of the audio clip to adjust'), level: z.number().describe('The new audio level in decibels (dB). Can be positive or negative.') }) },
- src/tools/index.ts:484-485 (registration)The switch case in executeTool() that registers and dispatches to the adjustAudioLevels handler.case 'adjust_audio_levels': return await this.adjustAudioLevels(args.clipId, args.level);