Skip to main content
Glama

auto_edit_to_music

Automatically edit video clips to match music beats in Adobe Premiere Pro. Cut footage to audio rhythm using beat detection for synchronized edits.

Instructions

Automatically creates an edit by cutting video clips to the beat of a music track.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audioTrackIdYesThe ID of the audio track containing the music
videoClipIdsYesAn array of video clip IDs to use for the edit
editStyleYesThe desired editing style
sensitivityNoBeat detection sensitivity (0-100)

Implementation Reference

  • Input schema and description for the 'auto_edit_to_music' tool, defining parameters: audioTrackId (string), videoClipIds (array of strings), editStyle (enum: 'cuts_only', 'cuts_and_transitions', 'beat_sync'), sensitivity (optional number 0-100). This is part of the tool registry returned by getAvailableTools().
    name: 'auto_edit_to_music', description: 'Automatically creates an edit by cutting video clips to the beat of a music track.', inputSchema: z.object({ audioTrackId: z.string().describe('The ID of the audio track containing the music'), videoClipIds: z.array(z.string()).describe('An array of video clip IDs to use for the edit'), editStyle: z.enum(['cuts_only', 'cuts_and_transitions', 'beat_sync']).describe('The desired editing style'), sensitivity: z.number().optional().describe('Beat detection sensitivity (0-100)') }) },
  • Tool registration and dispatch in the executeTool switch statement, calling the handler with validated arguments.
    case 'auto_edit_to_music': return await this.autoEditToMusic(args.audioTrackId, args.videoClipIds, args.editStyle, args.sensitivity);
  • The core handler function for 'auto_edit_to_music'. Validates inputs, constructs and executes a Premiere Pro ExtendScript to detect beats in audio and sync video clips accordingly. Currently implements a placeholder that returns success without actual editing, noting need for advanced beat detection.
    private async autoEditToMusic(audioTrackId: string, videoClipIds: string[], editStyle: string, sensitivity = 50): Promise<any> { const script = ` try { var audioTrack = app.project.getTrackByID("${audioTrackId}"); var videoClips = [${videoClipIds.map(id => `app.project.getClipByID("${id}")`).join(', ')}]; if (!audioTrack) { JSON.stringify({ success: false, error: "Audio track not found" }); return; } var validVideoClips = videoClips.filter(function(clip) { return clip !== null; }); if (validVideoClips.length === 0) { JSON.stringify({ success: false, error: "No valid video clips found" }); return; } // This would require sophisticated beat detection and auto-editing algorithms // For now, return a placeholder response with the detected parameters JSON.stringify({ success: true, message: "Auto-edit to music analysis completed", audioTrackId: "${audioTrackId}", videoClipCount: validVideoClips.length, editStyle: "${editStyle}", sensitivity: ${sensitivity}, note: "This feature requires advanced beat detection implementation" }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }

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