Beispiel #1
0
static PyObject *
Py_freqtobin (PyObject * self, PyObject * args)
{
  smpl_t input, samplerate, fftsize;
  smpl_t output;

  if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, &input, &samplerate, &fftsize)) {
    return NULL;
  }

  output = aubio_freqtobin (input, samplerate, fftsize);

  return (PyObject *)PyFloat_FromDouble (output);
}
Beispiel #2
0
/* conversion callbacks */
smpl_t
freqconvbin(smpl_t f, uint_t samplerate, uint_t bufsize)
{
  return aubio_freqtobin(f, samplerate, bufsize);
}
Beispiel #3
0
smpl_t
aubio_miditobin (smpl_t midi, smpl_t samplerate, smpl_t fftsize)
{
  smpl_t freq = aubio_miditofreq (midi);
  return aubio_freqtobin (freq, samplerate, fftsize);
}