Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Parse an Ableton ASD clip file (warp markers and more) in Python

License

NotificationsYou must be signed in to change notification settings

DBraun/AbletonParsing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Install

pip install abletonparsing

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

Ifloop_on is false, thenloop_start will equal thestart_marker, andloop_end will equal theend_marker.

Example

importabletonparsingimportlibrosaimportsoundfileassfimportpyrubberbandaspyrbbpm=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)withsf.SoundFile('output.wav','w',sr,2,'PCM_24')asf:f.write(output_audio)

About

Parse an Ableton ASD clip file (warp markers and more) in Python

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp