Package echonest :: Package remix :: Module audio :: Class AudioData32
[hide private]
[frames] | no frames]

Class AudioData32

source code


A 32-bit variant of AudioData, intended for data collection on audio rendering with headroom.
Instance Methods [hide private]
 
__init__(self, filename=None, ndarray=None, shape=None, sampleRate=None, numChannels=None, defer=False, verbose=True)
Special form of AudioData to allow for headroom when collecting samples.
source code
 
load(self) source code
 
encode(self, filename=None, mp3=None)
Outputs an MP3 or WAVE file to filename. Format is determined by mp3 parameter.
source code
 
normalize(self)
Return to 16-bit for encoding.
source code
 
pad_with_zeros(self, num_samples) source code

Inherited from AudioData: __add__, __getitem__, __len__, add_at, append, getsample, getslice, render, sum, unload

Inherited from AudioRenderable: resolve_source, sources

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from AudioRenderable: init_audio_data

Properties [hide private]

Inherited from AudioData: duration, source

Inherited from object: __class__

Method Details [hide private]

__init__(self, filename=None, ndarray=None, shape=None, sampleRate=None, numChannels=None, defer=False, verbose=True)
(Constructor)

source code 
Special form of AudioData to allow for headroom when collecting samples.
Parameters:
  • filename - a path to an audio file for loading its sample data into the AudioData.data
  • ndarray - a numpy.array instance with sample data
  • shape - a tuple of array dimensions
  • sampleRate - sample rate, in Hz
  • numChannels - number of channels
Overrides: object.__init__

load(self)

source code 
Overrides: AudioData.load

encode(self, filename=None, mp3=None)

source code 
Outputs an MP3 or WAVE file to filename. Format is determined by mp3 parameter.
Overrides: AudioRenderable.encode

pad_with_zeros(self, num_samples)

source code 
Overrides: AudioData.pad_with_zeros