Skip to main content
Most platforms force you to trim tracks manually or settle for awkward fade-outs. Trackyard’s smart trimming analyzes the waveform and selects the best-sounding segment automatically — no editing required.

The Problem with Manual Trimming

When you need a 30-second clip from a 3-minute track, you face several challenges:
  • Where to start? Random starting points often land mid-phrase or off-beat
  • Where to end? Abrupt endings sound amateurish
  • How to align peaks? Getting the big hit to land at the right moment requires manual editing
  • Time consuming — Multiply this by 100 videos and it’s a full workday
Trackyard solves this with waveform analysis and intelligent segment selection.

How It Works

When you request a clip with duration_seconds, Trackyard:
1

Analyzes the waveform

The algorithm scans the entire track for:
  • Musical phrases — Where melodies start and end
  • Energy peaks — Drops, hits, crescendos
  • Beat alignment — Downbeats and measure boundaries
  • Tonal consistency — Segments with clear harmonic structure
2

Scores possible segments

Every potential clip is scored based on:
  • Musical coherence — Does it feel like a complete idea?
  • Energy distribution — Is there a natural arc (build → peak → resolve)?
  • Start/end quality — Clean entry and exit points
  • Hit point placement — Dominant energy peak location (if specified)
3

Selects the best segment

The highest-scoring segment is extracted and returned as an MP3. No fade-outs, no awkward cuts — just the best-sounding 30 seconds of that track.

Usage Examples

Basic Trimming

Request a 30-second clip:
What you get:
  • The algorithm finds the best 30-second segment
  • Clean start and end (aligned to musical phrases)
  • No manual editing required

Hit Point Alignment

The killer feature: choreograph musical peaks to specific offsets.

The Use Case

You’re editing a product video:
  • The product appears on screen at 12 seconds
  • You want the music to hit its peak exactly when the product appears
  • Traditional music libraries make you do this manually
Trackyard does it automatically.

How to Use It

What happens:
  1. The algorithm finds the dominant energy peak in the track (the biggest drop/hit/crescendo)
  2. It selects a 22-second segment where that peak lands at the 12-second mark
  3. You get a clip perfectly timed to your video edit

Real-World Examples

Scenario: 15-second Reel, product appears at 8 secondsRequest:
Result: Music peaks right when the product enters the frame. Zero manual editing.
Scenario: 30-second ad, logo reveals at 22 secondsRequest:
Result: The musical peak aligns with the logo reveal for maximum impact.
Scenario: 45-second trailer, title card at 35 secondsRequest:
Result: Music builds throughout, then hits the peak right as the title appears.

When to Use Smart Trimming

Short-form content — Instagram Reels, TikToks, YouTube ShortsAds — Pre-roll, mid-roll, social media adsProduct demos — SaaS walkthrough videos, unboxing videosTrailers — App, game, or film trailersBatch processing — Auto-scoring 100+ videos with consistent durations

Tips for Best Results

Tracks with obvious drops, hits, or crescendos work best for hit point alignment.Good candidates:
  • Electronic music with drops
  • Orchestral music with crescendos
  • Hip hop with bass hits
Less ideal:
  • Ambient/drone (no clear peaks)
  • Minimalist classical (subtle dynamics)
Place the hit point where you want maximum impact:
  • Product reveals
  • Logo drops
  • Title cards
  • Character entrances
  • Scene transitions
If a 30-second clip doesn’t sound quite right, try 28 or 32 seconds. Sometimes a slightly different duration gives the algorithm more flexibility to find a better segment.
Use the preview_url from search results to audition tracks before spending a credit on /download-track.

Limitations

Hit point precision: The algorithm aligns the peak to within ±1 second of your specified offset. For frame-perfect sync, download the full track and edit manually.
Minimum duration: Smart trimming works best for clips 10+ seconds long. Very short clips (< 10s) may not have enough musical content for the algorithm to work effectively.

API Parameters


Next Steps

Download API Reference

Full API documentation for /download-track

Use Cases

See hit point alignment in action

API Quickstart

Try smart trimming yourself

Code Examples

Python and JavaScript examples