Samples

Samples#

class iqm.models.playlist.waveforms.Samples(samples)#

Bases: Waveform

Custom pre-sampled waveform.

This class can be used to represent an arbitrary waveform that is not supported with the predefined shapes of waveforms.

Module: iqm.models.playlist.waveforms

Attributes

samples

n_samples

Requested number of samples for the waveform.

Methods

sample

Sample the waveform.

Parameters:

samples (ndarray)

sample()#

Sample the waveform.

Contains the boilerplate code for determining the sample coordinates, the actual sampling happens in _sample().

Returns:

self sampled in the window [-1/2, 1/2]

Return type:

ndarray