AbletonParsing
Parse an Ableton ASD clip file (warp markers and more) in Python
Install / Use
/learn @DBraun/AbletonParsingREADME
AbletonParsing
Parse an Ableton ASD clip file and its warp markers in Python. This module has been tested with .asd files saved with Ableton 9 and Ableton 10.
Note: Ableton Live 12 uses a different binary format that is not yet supported by this library.
Install
pip install abletonparsing
Development Dependencies
To run the tests, you'll need to install additional dependencies:
# On macOS
brew install rubberband
# On Ubuntu/Debian
sudo apt-get install -y rubberband-cli
# Install Python test dependencies
pip install abletonparsing[test]
# or
pip install -e ".[test]" # for development
API
Clip class:
- .loop_on - ( bool , READ/WRITE ) - Loop toggle is on
- .start_marker - ( float , READ/WRITE ) - Start marker in beats relative to 1.1.1
- .end_marker - ( float , READ/WRITE ) - End marker in beats relative to 1.1.1
- .loop_start - ( float , READ/WRITE ) - Loop start in beats relative to 1.1.1
- .loop_end - ( float , READ/WRITE ) - Loop end in beats relative to 1.1.1
- .hidden_loop_start - ( float , READ/WRITE ) - Hidden loop start in beats relative to 1.1.1
- .hidden_loop_end - ( float , READ/WRITE ) - Hidden loop end in beats relative to 1.1.1
- .warp_markers - ( list[WarpMarker] , READ/WRITE ) - List of warp markers
- .warp_on - ( bool , READ/WRITE ) - Warping is on
- .sr - ( float , READ/WRITE ) - Sample rate of audio data
WarpMarker class:
- .seconds - ( float , READ/WRITE ) - Position in seconds in the audio data.
- .beats - ( float , READ/WRITE ) - Position in "beats" (typically quarter note) relative to 1.1.1
If loop_on is false, then loop_start will equal the start_marker, and loop_end will equal the end_marker.
Example
import abletonparsing
import librosa
import soundfile as sf
import pyrubberband as pyrb
bpm = 130.
audio_path = 'drums.wav'
clip_path = audio_path + '.asd'
audio_data, sr = librosa.load(audio_path, sr=None, mono=False)
num_samples = audio_data.shape[1]
clip = abletonparsing.Clip(clip_path, sr, num_samples)
time_map = clip.get_time_map(bpm)
# Time-stretch the audio to the requested bpm.
output_audio = pyrb.timemap_stretch(audio_data.transpose(), sr, time_map)
with sf.SoundFile('output.wav', 'w', sr, 2, 'PCM_24') as f:
f.write(output_audio)
Related Skills
qqbot-channel
347.0kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
claude-opus-4-5-migration
107.8kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
docs-writer
100.1k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
347.0kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
