adjust_audio_levels
Modify audio clip volume levels in Adobe Premiere Pro by specifying clip ID and desired dB level. Ideal for precise audio adjustments during editing workflows.
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:231-237 (schema)Defines the input schema and metadata for the 'adjust_audio_levels' tool, including name, description, and Zod validation schema for clipId (string) and level (number in dB).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:485-486 (registration)Registers and dispatches the 'adjust_audio_levels' tool in the executeTool switch statement, calling the handler with clipId and level arguments.return await this.adjustAudioLevels(args.clipId, args.level); case 'add_audio_keyframes':
- src/tools/index.ts:1377-1417 (handler)The main handler function for 'adjust_audio_levels'. It constructs and executes an ExtendScript via PremiereProBridge to locate the clip by ID, access its audio component's Volume property, set the new level in dB, and return success/error details including old and new levels.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); }