Showing the changes to python (7 of 7 files). Show all
Unified · Split
| @@ -106,7 +106,7 @@ def onset_rocloc(ltru, lexp, eps): · 105 unmodified lines | |||
| 106 | return orig, missed, merged, expc, bad, doubled, l, labs | 106 | return orig, missed, merged, expc, bad, doubled, l, labs |
| 107 | 107 | ||
| 108 | def notes_roc (la, lb, eps): | 108 | def notes_roc (la, lb, eps): |
| 109 | from numarray import transpose, add, resize | 109 | from numpy import transpose, add, resize |
| 110 | """ creates a matrix of size len(la)*len(lb) then look for hit and miss | 110 | """ creates a matrix of size len(la)*len(lb) then look for hit and miss |
| 111 | in it within eps tolerance windows """ | 111 | in it within eps tolerance windows """ |
| 112 | gdn,fpw,fpg,fpa,fdo,fdp = 0,0,0,0,0,0 | 112 | gdn,fpw,fpg,fpa,fdo,fdp = 0,0,0,0,0,0 |
| @@ -42,10 +42,10 @@ def plotnote_multi(lalist,title=None,fileout=None) : · 41 unmodified lines | |||
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | def plotnote_withends(la,plot_title=None) : | 44 | def plotnote_withends(la,plot_title=None) : |
| 45 | import numarray | 45 | from numpy import array |
| 46 | import Gnuplot, Gnuplot.funcutils | 46 | import Gnuplot, Gnuplot.funcutils |
| 47 | d=[] | 47 | d=[] |
| 48 | x_widths = numarray.array(la[:,1]-la[:,0])/2. | 48 | x_widths = array(la[:,1]-la[:,0])/2. |
| 49 | d.append(Gnuplot.Data( | 49 | d.append(Gnuplot.Data( |
| 50 | la[:,0]+x_widths, # x centers | 50 | la[:,0]+x_widths, # x centers |
| 51 | la[:,2], # y centers | 51 | la[:,2], # y centers |
| @@ -57,10 +57,10 @@ def plotnote_withends(la,plot_title=None) : · 5 unmodified lines | |||
| 57 | 57 | ||
| 58 | def plotnote_withoutends(la,plot_title=None) : | 58 | def plotnote_withoutends(la,plot_title=None) : |
| 59 | """ bug: fails drawing last note """ | 59 | """ bug: fails drawing last note """ |
| 60 | import numarray | 60 | from numpy import array |
| 61 | import Gnuplot, Gnuplot.funcutils | 61 | import Gnuplot, Gnuplot.funcutils |
| 62 | d=[] | 62 | d=[] |
| 63 | x_widths = numarray.array(la[1:,0]-la[:-1,0])/2; | 63 | x_widths = array(la[1:,0]-la[:-1,0])/2; |
| 64 | d.append(Gnuplot.Data( | 64 | d.append(Gnuplot.Data( |
| 65 | la[:-1,0]+x_widths, # x centers | 65 | la[:-1,0]+x_widths, # x centers |
| 66 | la[:-1,1], # y centers | 66 | la[:-1,1], # y centers |
| @@ -3,8 +3,6 @@ · 2 unmodified lines | |||
| 3 | """Copyright (C) 2004 Paul Brossier <piem@altern.org> | 3 | """Copyright (C) 2004 Paul Brossier <piem@altern.org> |
| 4 | 4 | ||
| 5 | print aubio.__LICENSE__ for the terms of use | 5 | print aubio.__LICENSE__ for the terms of use |
| 6 | |||
| 7 | or see LICENSE.txt in the numarray installation directory. | ||
| 8 | """ | 6 | """ |
| 9 | __LICENSE__ = """\ | 7 | __LICENSE__ = """\ |
| 10 | Copyright (C) 2004 Paul Brossier <piem@altern.org> | 8 | Copyright (C) 2004 Paul Brossier <piem@altern.org> |
| @@ -78,7 +78,7 @@ def main(): · 77 unmodified lines | |||
| 78 | 78 | ||
| 79 | from aubio import notefilter,txtfile,gnuplot | 79 | from aubio import notefilter,txtfile,gnuplot |
| 80 | """ load midi and raw data """ | 80 | """ load midi and raw data """ |
| 81 | from numarray import array | 81 | from numpy import array |
| 82 | notelist = array(txtfile.read_datafile(input)) | 82 | notelist = array(txtfile.read_datafile(input)) |
| 83 | """ filter it out """ | 83 | """ filter it out """ |
| 84 | notelist_filtered = notefilter.segraw_onsets4(notelist,winlength,eps) | 84 | notelist_filtered = notefilter.segraw_onsets4(notelist,winlength,eps) |
| @@ -4,7 +4,6 @@ def do(filein,threshold): · 3 unmodified lines | |||
| 4 | 4 | ||
| 5 | import aubio.aubioclass | 5 | import aubio.aubioclass |
| 6 | import aubio.median | 6 | import aubio.median |
| 7 | #from numarray import around | ||
| 8 | from math import floor | 7 | from math import floor |
| 9 | hopsize = 512 | 8 | hopsize = 512 |
| 10 | bufsize = 4096 | 9 | bufsize = 4096 |
| @@ -18,7 +18,7 @@ def parse_args (sysargs): · 17 unmodified lines | |||
| 18 | def main (sysargs) : | 18 | def main (sysargs) : |
| 19 | from aubio.txtfile import read_datafile | 19 | from aubio.txtfile import read_datafile |
| 20 | from aubio.gnuplot import plotnote,plotnote_do | 20 | from aubio.gnuplot import plotnote,plotnote_do |
| 21 | from numarray import array | 21 | from numpy import array |
| 22 | filein,fileout = parse_args(sysargs) | 22 | filein,fileout = parse_args(sysargs) |
| 23 | #print 'checking', fileerr, 'against', fileorg | 23 | #print 'checking', fileerr, 'against', fileorg |
| 24 | """ load midi and raw data """ | 24 | """ load midi and raw data """ |
| @@ -11,7 +11,7 @@ libapache-mod-python (apache2 prefered) · 10 unmodified lines | |||
| 11 | sndfile-programs (sndfile-info) | 11 | sndfile-programs (sndfile-info) |
| 12 | vorbis-tools (oggenc) | 12 | vorbis-tools (oggenc) |
| 13 | python-gnuplot | 13 | python-gnuplot |
| 14 | python-numarray | 14 | python-numpy |
| 15 | 15 | ||
| 16 | Try the command line tools in aubio/python to test your installation. | 16 | Try the command line tools in aubio/python to test your installation. |
| 17 | 17 | ||