Skip to main content
Glama

add_audio_keyframes

Adds keyframes to audio levels for dynamic volume changes in Adobe Premiere Pro clips, enabling precise control over audio transitions.

Instructions

Adds keyframes to audio levels for dynamic volume changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clipIdYesThe ID of the audio clip
keyframesYesArray of keyframe data

Implementation Reference

  • Handler function that implements the tool logic by constructing an ExtendScript to add keyframes to the Volume property of an audio clip's component in Premiere Pro.
    private async addAudioKeyframes(clipId: string, keyframes: Array<{time: number, 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 volumeProperty = audioComponent.properties["Volume"]; var addedKeyframes = []; ${keyframes.map(kf => ` try { volumeProperty.addKey(new Time("${kf.time}s")); volumeProperty.setValueAtKey(new Time("${kf.time}s"), ${kf.level}); addedKeyframes.push({ time: ${kf.time}, level: ${kf.level} }); } catch (e) { // Keyframe already exists or invalid time } `).join('\n')} JSON.stringify({ success: true, message: "Audio keyframes added successfully", clipId: "${clipId}", addedKeyframes: addedKeyframes, totalKeyframes: addedKeyframes.length }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
  • Input schema using Zod for validating the tool's parameters: clipId and keyframes array.
    name: 'add_audio_keyframes', description: 'Adds keyframes to audio levels for dynamic volume changes.', inputSchema: z.object({ clipId: z.string().describe('The ID of the audio clip'), keyframes: z.array(z.object({ time: z.number().describe('Time in seconds'), level: z.number().describe('Audio level in dB') })).describe('Array of keyframe data') }) },
  • Registration in the executeTool method's switch statement, dispatching to the handler.
    case 'add_audio_keyframes': return await this.addAudioKeyframes(args.clipId, args.keyframes);
  • TypeScript declaration of the handler method.
    private addAudioKeyframes;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hetpatel-11/Adobe_Premiere_Pro_MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server