- Timestamp:
- Dec 18, 2013, 8:07:27 AM (11 years ago)
- 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:
- 6465d7f
- Parents:
- 1573b16 (diff), c3c6305 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- python
- Files:
-
- 1 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
python/demos/demo_bpm_extract.py
-
Property
mode
changed from
100644
to100755
-
Property
mode
changed from
-
python/demos/demo_mel-energy.py
r1573b16 r21234ee 62 62 ax.yaxis.set_visible(False) 63 63 ax.axis(xmax = all_desc_times[-1], xmin = all_desc_times[0]) 64 ax.annotate('band %d' % i, xy=(-10, 10), xycoords='axes points',64 ax.annotate('band %d' % i, xy=(-10, 0), xycoords='axes points', 65 65 horizontalalignment='right', verticalalignment='bottom', 66 size = 'xx-small', 66 67 ) 67 68 set_xlabels_sample2time( ax, all_desc_times[-1], samplerate) -
python/demos/demo_pitch.py
r1573b16 r21234ee 57 57 58 58 fig = plt.figure() 59 59 60 ax1 = fig.add_subplot(311) 60 61 ax1 = get_waveform_plot(filename, samplerate = samplerate, block_size = hop_s, ax = ax1) 61 ax1.set_xticklabels([]) 62 plt.setp(ax1.get_xticklabels(), visible = False) 63 ax1.set_xlabel('') 62 64 63 65 def array_from_text_file(filename, dtype = 'float'): … … 88 90 #ax2.axis( ymin = 0.9 * cleaned_pitches.min(), ymax = 1.1 * cleaned_pitches.max() ) 89 91 #ax2.axis( ymin = 55, ymax = 70 ) 90 ax2.set_xticklabels([]) 92 plt.setp(ax2.get_xticklabels(), visible = False) 93 ax2.set_ylabel('f0 (Hz)') 91 94 92 95 # plot confidence … … 97 100 ax3.plot(times, [tolerance]*len(confidences)) 98 101 ax3.axis( xmin = times[0], xmax = times[-1]) 102 ax3.set_ylabel('condidence') 103 set_xlabels_sample2time(ax3, times[-1], samplerate) 99 104 plt.show() 100 set_xlabels_sample2time(ax3, times[-1], samplerate) 101 #plt.savefig(os.path.basename(filename) + '.png', dpi=200) 105 #plt.savefig(os.path.basename(filename) + '.svg') -
python/demos/demo_specdesc.py
r1573b16 r21234ee 72 72 ax.yaxis.set_visible(False) 73 73 ax.axis(xmax = all_desc_times[-1], xmin = all_desc_times[0]) 74 ax.annotate(method, xy=(-10, 10), xycoords='axes points',74 ax.annotate(method, xy=(-10, 0), xycoords='axes points', 75 75 horizontalalignment='right', verticalalignment='bottom', 76 76 ) -
python/ext/aubio-types.h
r1573b16 r21234ee 69 69 extern PyTypeObject Py_pvocType; 70 70 71 extern PyTypeObject Py_sourceType; 72 -
python/ext/aubiomodule.c
r1573b16 r21234ee 199 199 || (PyType_Ready (&Py_fftType) < 0) 200 200 || (PyType_Ready (&Py_pvocType) < 0) 201 || (PyType_Ready (&Py_sourceType) < 0) 201 202 // generated objects 202 203 || (generated_types_ready() < 0 ) … … 227 228 Py_INCREF (&Py_pvocType); 228 229 PyModule_AddObject (m, "pvoc", (PyObject *) & Py_pvocType); 230 Py_INCREF (&Py_sourceType); 231 PyModule_AddObject (m, "source", (PyObject *) & Py_sourceType); 229 232 230 233 // add generated objects -
python/ext/aubioproxy.c
r1573b16 r21234ee 36 36 // no need to really allocate fvec, just its struct member 37 37 vec = (fvec_t *)malloc(sizeof(fvec_t)); 38 vec->length = PyArray_SIZE ((PyArrayObject *)array); 38 long length = PyArray_SIZE ((PyArrayObject *)array); 39 if (length > 0) { 40 vec->length = (uint_t)length; 41 } else { 42 PyErr_SetString (PyExc_ValueError, "input array size should be greater than 0"); 43 goto fail; 44 } 39 45 vec->data = (smpl_t *) PyArray_GETPTR1 ((PyArrayObject *)array, 0); 40 46 … … 131 137 // no need to really allocate fvec, just its struct member 132 138 mat = (fmat_t *)malloc(sizeof(fmat_t)); 133 mat->length = PyArray_DIM ((PyArrayObject *)array, 1); 134 mat->height = PyArray_DIM ((PyArrayObject *)array, 0); 139 long length = PyArray_DIM ((PyArrayObject *)array, 1); 140 if (length > 0) { 141 mat->length = (uint_t)length; 142 } else { 143 PyErr_SetString (PyExc_ValueError, "input array dimension 1 should be greater than 0"); 144 goto fail; 145 } 146 long height = PyArray_DIM ((PyArrayObject *)array, 0); 147 if (height > 0) { 148 mat->height = (uint_t)height; 149 } else { 150 PyErr_SetString (PyExc_ValueError, "input array dimension 0 should be greater than 0"); 151 goto fail; 152 } 135 153 mat->data = (smpl_t **)malloc(sizeof(smpl_t*) * mat->height); 136 154 for (i=0; i< mat->height; i++) { -
python/ext/py-fft.c
r1573b16 r21234ee 25 25 26 26 self->win_s = Py_default_vector_length; 27 28 if (self == NULL) {29 return NULL;30 }31 27 32 28 if (win_s > 0) { -
python/lib/gen_pyobject.py
r1573b16 r21234ee 240 240 241 241 self->%(pname)s = %(defval)s; 242 if ( %(pname)s > 0) {242 if ((sint_t)%(pname)s > 0) { 243 243 self->%(pname)s = %(pname)s; 244 } else if ( %(pname)s < 0) {244 } else if ((sint_t)%(pname)s < 0) { 245 245 PyErr_SetString (PyExc_ValueError, 246 246 "can not use negative value for %(pname)s"); -
python/lib/generator.py
r1573b16 r21234ee 57 57 'sink_apple_audio', 58 58 'sink_sndfile', 59 'source', 59 60 'source_apple_audio', 60 61 'source_sndfile', -
python/setup.py
r1573b16 r21234ee 54 54 "ext/py-fft.c", 55 55 "ext/py-phasevoc.c", 56 "ext/py-source.c", 56 57 # generated files 57 58 ] + generated_object_files,
Note: See TracChangeset
for help on using the changeset viewer.