constants.py

A repository containing all of the constants frequently used in this wacky, mixed up source separation stuff.

nussl.core.constants.DEFAULT_SAMPLE_RATE = 44100

Default sample rate. 44.1 kHz, CD-quality

Type:(int)
nussl.core.constants.DEFAULT_WIN_LEN_PARAM = 0.04

Default window length. 40ms

Type:(float)
nussl.core.constants.DEFAULT_BIT_DEPTH = 16

Default bit depth. 16-bits, CD-quality

Type:(int)
nussl.core.constants.DEFAULT_MAX_VAL = 65536

Max value of 16-bit audio file (unsigned)

Type:(int)
nussl.core.constants.EPSILON = 1e-16

epsilon for determining small values

Type:(float)
nussl.core.constants.MAX_FREQUENCY = 22050

Maximum frequency representable. 22050 Hz

Type:(int)
nussl.core.constants.WINDOW_HAMMING = 'hamming'

Name for calling Hamming window. ‘hamming’

Type:(str)
nussl.core.constants.WINDOW_RECTANGULAR = 'rectangular'

Name for calling Rectangular window. ‘rectangular’

Type:(str)
nussl.core.constants.WINDOW_HANN = 'hann'

Name for calling Hann window. ‘hann’

Type:(str)
nussl.core.constants.WINDOW_BLACKMAN = 'blackman'

Name for calling Blackman window. ‘blackman’

Type:(str)
nussl.core.constants.WINDOW_TRIANGULAR = 'triangular'

Name for calling Triangular window. ‘triangular’

Type:(str)
nussl.core.constants.WINDOW_DEFAULT = 'hamming'

Default window, Hamming.

Type:(str)
nussl.core.constants.ALL_WINDOWS = ['hamming', 'rectangular', 'hann', 'blackman', 'triangular']

list of all available windows in nussl

Type:list(str)
nussl.core.constants.NUMPY_JSON_KEY = 'py/numpy.ndarray'

key used when turning numpy arrays into json

Type:(str)
nussl.core.constants.LEN_INDEX = 1

Index of the number of samples in an audio signal. Used in AudioSignal Class

Type:(int)
nussl.core.constants.CHAN_INDEX = 0

Index of the number of channels in an audio signal. Used in AudioSignal Class

Type:(int)
nussl.core.constants.STFT_VERT_INDEX = 0

(int) Index of the number of frequency (vertical) values in a time-frequency representation. Used in AudioSignal Class and in MaskBase.

nussl.core.constants.STFT_LEN_INDEX = 1

(int) Index of the number of time (horizontal) hops in a time-frequency representation. Used in AudioSignal Class and in MaskBase.

nussl.core.constants.STFT_CHAN_INDEX = 2

(int) Index of the number of channels in a time-frequency representation. Used in AudioSignal Class and in MaskBase.