feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5sampler
Last change
on this file since b762f8d was
883b499,
checked in by Paul Brossier <piem@piem.org>, 8 years ago
|
python/ext/aubiomodule.c: add aubio._aubio.version, import as aubio.version
|
-
Property mode set to
100644
|
File size:
600 bytes
|
Line | |
---|
1 | #! /usr/bin/env python |
---|
2 | |
---|
3 | import numpy |
---|
4 | from ._aubio import __version__ as version |
---|
5 | from ._aubio import float_type |
---|
6 | from ._aubio import * |
---|
7 | from .midiconv import * |
---|
8 | from .slicing import * |
---|
9 | |
---|
10 | class fvec(numpy.ndarray): |
---|
11 | """a numpy vector holding audio samples""" |
---|
12 | |
---|
13 | def __new__(cls, input_arg=1024, **kwargs): |
---|
14 | if isinstance(input_arg, int): |
---|
15 | if input_arg == 0: |
---|
16 | raise ValueError("vector length of 1 or more expected") |
---|
17 | return numpy.zeros(input_arg, dtype=float_type, **kwargs) |
---|
18 | else: |
---|
19 | return numpy.array(input_arg, dtype=float_type, **kwargs) |
---|
Note: See
TracBrowser
for help on using the repository browser.