Showing the changes to python/ext (1 of 1 file). Show all
Unified · Split
| @@ -76,24 +76,58 @@ static char Py_miditobin_doc[] = "" · 75 unmodified lines | ||
| 76 | 76 | ""; |
| 77 | 77 | |
| 78 | 78 | static char Py_bintofreq_doc[] = "" |
| 79 | −"bintofreq(float, samplerate = integer, fftsize = integer) -> float\n" | |
| 79 | +"bintofreq(fftbin, samplerate, fftsize)\n" | |
| 80 | 80 | "\n" |
| 81 | −"Convert bin number (float) in frequency (Hz), given the sampling rate and the FFT size\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" | |
| 82 | 97 | "\n" |
| 83 | 98 | "Example\n" |
| 84 | 99 | "-------\n" |
| 85 | 100 | "\n" |
| 86 | −">>> freq = bintofreq(bin, samplerate = 44100, fftsize = 1024)"; | |
| 101 | +">>> aubio.bintofreq(10, 44100, 1024)\n" | |
| 102 | +"430.6640625\n" | |
| 103 | +""; | |
| 87 | 104 | |
| 88 | 105 | static char Py_freqtobin_doc[] = "" |
| 89 | −"freqtobin(float, samplerate = integer, fftsize = integer) -> float\n" | |
| 106 | +"freqtobin(freq, samplerate, fftsize)\n" | |
| 90 | 107 | "\n" |
| 91 | −"Convert frequency (Hz) in bin number (float), given the sampling rate and the FFT size\n" | |
| 108 | +"Convert frequency in Hz to FFT bin, given the sampling rate\n" | |
| 109 | +"and the size of the FFT.\n" | |
| 92 | 110 | "\n" |
| 93 | −"Example\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" | |
| 94 | 121 | "-------\n" |
| 122 | +"float\n" | |
| 123 | +" Frequency converted to FFT bin.\n" | |
| 124 | +"\n" | |
| 125 | +"Examples\n" | |
| 126 | +"--------\n" | |
| 95 | 127 | "\n" |
| 96 | −">>> bin = freqtobin(freq, samplerate = 44100, fftsize = 1024)"; | |
| 128 | +">>> aubio.freqtobin(440, 44100, 1024)\n" | |
| 129 | +"10.216779708862305\n" | |
| 130 | +""; | |
| 97 | 131 | |
| 98 | 132 | static char Py_zero_crossing_rate_doc[] = "" |
| 99 | 133 | "zero_crossing_rate(fvec) -> float\n" |