Changeset 7df8df7


Ignore:
Timestamp:
Oct 26, 2018, 6:11:36 PM (6 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
Children:
55b6260
Parents:
57ce9b2
Message:

[python] add docstrings to bintofreq and freqtobin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/ext/aubiomodule.c

    r57ce9b2 r7df8df7  
    7777
    7878static char Py_bintofreq_doc[] = ""
    79 "bintofreq(float, samplerate = integer, fftsize = integer) -> float\n"
    80 "\n"
    81 "Convert bin number (float) in frequency (Hz), given the sampling rate and the FFT size\n"
     79"bintofreq(fftbin, samplerate, fftsize)\n"
     80"\n"
     81"Convert FFT bin to frequency in Hz, given the sampling rate\n"
     82"and the size of the FFT.\n"
     83"\n"
     84"Parameters\n"
     85"----------\n"
     86"fftbin : float\n"
     87"   input frequency bin\n"
     88"samplerate : float\n"
     89"   sampling rate of the signal\n"
     90"fftsize : float\n"
     91"   size of the FFT\n"
     92"\n"
     93"Returns\n"
     94"-------\n"
     95"float\n"
     96"   Frequency converted to Hz.\n"
    8297"\n"
    8398"Example\n"
    8499"-------\n"
    85100"\n"
    86 ">>> freq = bintofreq(bin, samplerate = 44100, fftsize = 1024)";
     101">>> aubio.bintofreq(10, 44100, 1024)\n"
     102"430.6640625\n"
     103"";
    87104
    88105static char Py_freqtobin_doc[] = ""
    89 "freqtobin(float, samplerate = integer, fftsize = integer) -> float\n"
    90 "\n"
    91 "Convert frequency (Hz) in bin number (float), given the sampling rate and the FFT size\n"
    92 "\n"
    93 "Example\n"
    94 "-------\n"
    95 "\n"
    96 ">>> bin = freqtobin(freq, samplerate = 44100, fftsize = 1024)";
     106"freqtobin(freq, samplerate, fftsize)\n"
     107"\n"
     108"Convert frequency in Hz to FFT bin, given the sampling rate\n"
     109"and the size of the FFT.\n"
     110"\n"
     111"Parameters\n"
     112"----------\n"
     113"midi : float\n"
     114"   input frequency, in midi note\n"
     115"samplerate : float\n"
     116"   sampling rate of the signal\n"
     117"fftsize : float\n"
     118"   size of the FFT\n"
     119"\n"
     120"Returns\n"
     121"-------\n"
     122"float\n"
     123"   Frequency converted to FFT bin.\n"
     124"\n"
     125"Examples\n"
     126"--------\n"
     127"\n"
     128">>> aubio.freqtobin(440, 44100, 1024)\n"
     129"10.216779708862305\n"
     130"";
    97131
    98132static char Py_zero_crossing_rate_doc[] = ""
Note: See TracChangeset for help on using the changeset viewer.