A Track wraps an audio file or an array of raw PCM data.
Represents a wrapped .wav file.
Create a Track object
Parameters: |
|
---|
Get the entire track as 1 combined channel
Returns: | Track frames as 1 combined track |
---|---|
Return type: | 1d numpy array |
Get and set the current frame of the track
Get the duration of total frames in the track
Get the duration of the track in seconds
Find the loudest time in the window given by start and duration Returns frame number in context of entire track, not just the window.
Parameters: |
|
---|---|
Returns: | Frame number of loudest frame |
Return type: | integer |
Get a range of frames as 1 combined channel
Parameters: |
|
---|---|
Returns: | Track frames in range as 1 combined channel |
Return type: | 1d numpy array of length end_sample - start_sample |
Read n frames from the track, starting with the current frame
Parameters: |
|
---|---|
Returns: | Next n frames from the track, starting with current_frame |
Return type: | numpy array |
Get the number of frames remaining in the track
Sets current frame to 0
Get the sample rate of the track
Find nearest zero crossing in waveform after frame n
Find nearest zero crossing in waveform before frame n
A radiotool.composer.Track subclass that wraps a speech .wav file
A radiotool.composer.Track subclass that wraps a music .wav file. Allows access to a musical analysis of the song.
Get musical anaylsis of the song using the librosa library
A radiotool.composer.Track subclass that wraps raw PCM data (as a numpy array).
Create a track with raw PCM data in array frames
Parameters: |
|
---|