Ignore:
Timestamp:
Mar 3, 2013, 10:27:17 PM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
7a6521d
Parents:
6a50b9e
Message:

aubiomodule.c: add unwrap2pi

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/aubiomodule.c

    r6a50b9e r6514bb6  
    3838
    3939  return result;
     40}
     41
     42static char Py_unwrap2pi_doc[] = "unwrap phase value to [-pi, pi]";
     43
     44static PyObject *
     45Py_unwrap2pi (PyObject * self, PyObject * args)
     46{
     47  smpl_t input;
     48  smpl_t output;
     49
     50  if (!PyArg_ParseTuple (args, "|f", &input)) {
     51    return NULL;
     52  }
     53
     54  output = aubio_unwrap2pi (input);
     55
     56  return (PyObject *)PyFloat_FromDouble (output);
    4057}
    4158
     
    209226
    210227static PyMethodDef aubio_methods[] = {
     228  {"unwrap2pi", Py_unwrap2pi, METH_VARARGS, Py_unwrap2pi_doc},
    211229  {"bintomidi", Py_bintomidi, METH_VARARGS, Py_bintomidi_doc},
    212230  {"miditobin", Py_miditobin, METH_VARARGS, Py_miditobin_doc},
Note: See TracChangeset for help on using the changeset viewer.