Skip to main content

Tools for constructing and retargeting audio

Project description

Radiotool is a python library that aims to make it easy to create audio by piecing together bits of other audio files. This library was originally written to enable my research in audio editing user interfaces, but perhaps someone else might find it useful.

Read the full documentation.

To perform the actual audio rendering, radiotool relies on scikits.audiolab, a python wrapper for libsndfile.

Installation

Either pip install radiotool or clone the repository and run python setup.py install.

Composition

The heart of radiotool is the Composition. A Composition is built out of Segments, which represent segments of audio Tracks (or raw PCM data, in the case of RawTracks). You can also add Dynamics to adjust the volume of segments in certain ways.

Simple example

from radiotool.composer import *
comp = Composition()

# create a track with a pre-existing wav file
track = Track("test.wav")

# create a segment of a track that:
# 1. starts at the 0.0 mark of the composition
# 2. begins playing at the 0.5 second mark of the track
# 3. plays for 1.0 seconds
segment = Segment(track, 0.0, 0.5, 1.0)

# add segment to the composition
comp.add_segment(segment)

# output your composition as a numpy array
arr_out = comp.build()

# or export your composition as an audio file, composition.wav
comp.export(filename="composition")

Retargeting

Music retargeting is the idea of taking a song and remixing it from its own existing beats/structure to fit the music to certain constraints.

See http://ucbvislab.github.io/radiotool/algorithms/retarget.html for applications of music retargeting, and details about how to retarget music using raditool.

See the documentation for more detail.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

radiotool-0.3.1.tar.gz (24.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page