Abstract
Music resizing is a critical task in multimedia production, often requiring audio tracks to be shortened to fit specific visual durations. Traditional homogeneous time-stretching methods apply a uniform compression rate across the entire track, which frequently introduces audible artifacts, particularly in vocal-heavy sections. This paper presents a structure-aware approach that leverages synchronized lyrics (LRC files) to estimate compression resistance. By prioritizing the compression of instrumental sections over dense vocal parts, the proposed method achieves higher perceived audio quality. Experimental results show an average acceptable compression rate of approximately 30%, a significant improvement over standard techniques.
Introduction
In web development and multimedia, a "time-scale mismatch" often occurs between visual content and background music. For instance, a 240-second song might need to be compressed to fit a 200-second animation. Standard techniques apply a uniform speed-up across the entire track, leading to "chipmunk" effects or rhythmic distortions. Observations suggest that human perception is more sensitive to these artifacts in fast-paced vocal sections than in instrumental breaks. This research proposes a method to distribute compression non-uniformly based on the semantic structure of the music, using lyrics as a proxy for complexity.
Methodology
The proposed framework consists of three primary stages designed to intelligently schedule compression rates based on the content of the audio file.
1. Compression Resistance Estimation
The system utilizes LRC files—a standard format for synchronized lyrics—to calculate Lyrics Density ($d_i$). This metric is defined as the number of words in a specific segment divided by its duration. High density indicates complex vocal parts that are highly "compression-resistant," while zero density identifies purely instrumental segments.
2. Compression Rates Scheduling
Rather than applying a flat compression rate, the algorithm strategically allocates the required reduction:
- Instrumental Priority: Instrumental segments (zero density) are assigned the majority of the compression task, typically handling approximately 80% of the total time reduction.
- Iterative Vocal Compression: If further reduction is required, the system employs a heuristic iterative process to assign time slices to vocal segments with the lowest "lyrics density growth rate." This ensures that the most complex vocal sections remain largely untouched.
3. Physical Compression
After calculating specific rates for each segment, the audio is processed using the Waveform Similarity-based Overlap-Add (WSOLA) algorithm, a standard technique for high-quality time-scale modification.
Experimental Evaluation
The approach was evaluated using a set of 8 diverse songs and a user study involving 10 skilled listeners (e.g., music students and audio engineers). The study aimed to determine the "maximal acceptable compression rate"—the point at which listeners began to find the audio quality objectionable.
Key Results
- Perceptual Threshold: The average maximal acceptable compression rate across the test suite was 30.13%. This represents a significant improvement over uniform stretching, which often becomes noticeably degraded at rates as low as 15%.
- Waveform Consistency: Analysis of the resulting waveforms indicated that the non-uniform approach produces a more balanced audio profile. By "squeezing" sparse instrumental regions more aggressively, the overall energy distribution of the track remains more consistent with the original intent.
Conclusion
By using synchronized lyrics as a computationally efficient "map" of musical structure, this method allows for significant time-scale compression while preserving the integrity of vocal performances. While currently dependent on the availability of LRC files, the heuristic approach demonstrates that structure-aware processing is superior to homogeneous methods for music resizing. Future work may explore automated vocal detection to remove the dependency on external metadata and extend the logic to time-scale expansion.
Summary updated