Skip to main content
Social media ads live or die on timing. The best ads sync music peaks to key moments — product reveals, logo drops, CTA screens. Trackyard’s hit point alignment automates this sync perfectly.

The Challenge

You’re cutting a 15-second Instagram ad:
  • Product appears at 8 seconds
  • Music should hit its peak exactly when the product enters the frame
  • Traditional libraries require manual audio editing to align the hit
Problem: Manual alignment takes 5-10 minutes per ad variant. At scale, this doesn’t work.

The Trackyard Solution

Use hit_point_seconds to choreograph the music’s climax to your reveal moment.
curl -X POST https://api.trackyard.com/api/external/v1/download-track \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "track_id": "trk_abc123",
    "duration_seconds": 15,
    "hit_point_seconds": 8
  }' \
  --output ad_music.mp3
What happens:
  1. Trackyard finds the dominant energy peak in the track (the biggest drop/hit/crescendo)
  2. It selects a 15-second segment where that peak lands at exactly 8 seconds
  3. You get a clip perfectly timed to your product reveal
Zero manual editing.

Example: Product Reveal Ad

Scenario: 15-second Instagram Reel ad for a new sneaker Storyboard:
  • 0-7s: Product shots, building anticipation
  • 8s: Sneaker reveal ← music should peak here
  • 9-15s: CTA + logo
Request:
{
  "track_id": "trk_xyz789",
  "duration_seconds": 15,
  "hit_point_seconds": 8
}
Result: Music builds for 7 seconds, hits the peak right as the sneaker appears, then resolves into the CTA.

Common Ad Formats

Typical structure:
  • 0-7s: Setup/problem
  • 8s: Product reveal
  • 9-14s: Benefits
  • 15s: CTA
Request:
{
  "duration_seconds": 15,
  "hit_point_seconds": 8
}

A/B Testing Ad Variants

Run the same ad with different music to test performance:
# Search for different vibes
tracks = [
    search("upbeat electronic music"),
    search("warm acoustic music"),
    search("epic cinematic music"),
]

# Generate variants with the same timing
for i, track in enumerate(tracks):
    audio = download(
        track_id=track["id"],
        duration_seconds=15,
        hit_point_seconds=8  # Same reveal timing across variants
    )
    save(f"ad_variant_{i}.mp3", audio)
Test which vibe drives the highest CTR while keeping the visual edit identical.

Best Practices

Electronic drops, orchestral crescendos, and hip hop hits work best.Good candidates:
  • EDM with build-ups and drops
  • Cinematic music with crescendos
  • Hip hop with bass hits
Less ideal:
  • Ambient (no clear peaks)
  • Minimalist classical (subtle dynamics)
If the alignment feels slightly off, try adjusting ±1-2 seconds:
// Original
{"hit_point_seconds": 8}

// Try earlier
{"hit_point_seconds": 7}

// Try later
{"hit_point_seconds": 9}
Generate multiple music options upfront:
  1. Search for 5 different tracks
  2. Download each with the same hit_point_seconds
  3. Swap the audio track in your video editor
  4. Test all 5 variants simultaneously
Best hit point placements:
  • Product reveals
  • Logo drops
  • Before-and-after transitions
  • CTA screens
  • Brand moments

Code Example: Multi-Platform Ad

Same video, different durations for each platform:
platforms = [
    {"name": "instagram", "duration": 15, "reveal_at": 8},
    {"name": "tiktok", "duration": 60, "reveal_at": 35},
    {"name": "youtube", "duration": 30, "reveal_at": 18},
]

# Search once
track_id = search("upbeat music for tech product")["tracks"][0]["id"]

# Generate platform-specific clips
for platform in platforms:
    audio = download(
        track_id=track_id,
        duration_seconds=platform["duration"],
        hit_point_seconds=platform["reveal_at"]
    )
    save(f"ad_{platform['name']}.mp3", audio)

Next Steps

Smart Clip Trimming

Learn how hit point alignment works

Download API

Full endpoint reference

Code Examples

See Python and JavaScript examples

Product Demos

Similar use case for demo videos