1 |
ssuominen 11/10/01 10:22:11 |
2 |
|
3 |
Modified: aubio-0.3.2-multilib.patch |
4 |
Added: aubio-0.3.2-numarray-gnuplot.patch |
5 |
Log: |
6 |
Import Fedora patch for byte-compiling errors wrt #312915 by artin Mokrejš and Sebastian Pipping |
7 |
|
8 |
(Portage version: 2.2.0_alpha59/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.2 media-libs/aubio/files/aubio-0.3.2-multilib.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/aubio/files/aubio-0.3.2-multilib.patch?rev=1.2&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/aubio/files/aubio-0.3.2-multilib.patch?rev=1.2&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/aubio/files/aubio-0.3.2-multilib.patch?r1=1.1&r2=1.2 |
16 |
|
17 |
Index: aubio-0.3.2-multilib.patch |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/media-libs/aubio/files/aubio-0.3.2-multilib.patch,v |
20 |
retrieving revision 1.1 |
21 |
retrieving revision 1.2 |
22 |
diff -u -r1.1 -r1.2 |
23 |
--- aubio-0.3.2-multilib.patch 11 Feb 2008 00:02:26 -0000 1.1 |
24 |
+++ aubio-0.3.2-multilib.patch 1 Oct 2011 10:22:11 -0000 1.2 |
25 |
@@ -1,5 +1,5 @@ |
26 |
---- python/aubio/Makefile.am.orig 2008-02-10 18:32:03.000000000 -0500 |
27 |
-+++ python/aubio/Makefile.am 2008-02-10 18:33:48.000000000 -0500 |
28 |
+--- python/aubio/Makefile.am |
29 |
++++ python/aubio/Makefile.am |
30 |
@@ -68,7 +68,7 @@ |
31 |
-L$(top_builddir)/ext -laubioext \ |
32 |
-L$(top_builddir)/src -laubio |
33 |
|
34 |
|
35 |
|
36 |
1.1 media-libs/aubio/files/aubio-0.3.2-numarray-gnuplot.patch |
37 |
|
38 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/aubio/files/aubio-0.3.2-numarray-gnuplot.patch?rev=1.1&view=markup |
39 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/aubio/files/aubio-0.3.2-numarray-gnuplot.patch?rev=1.1&content-type=text/plain |
40 |
|
41 |
Index: aubio-0.3.2-numarray-gnuplot.patch |
42 |
=================================================================== |
43 |
--- python/aubio/aubioclass.py |
44 |
+++ python/aubio/aubioclass.py |
45 |
@@ -42,8 +42,10 @@ |
46 |
self.file = new_aubio_sndfile_wo(model.file,filename) |
47 |
else: |
48 |
self.file = new_aubio_sndfile_ro(filename) |
49 |
+ if self.file == None: |
50 |
+ raise(ValueError, "failed opening file %s" % filename) |
51 |
def __del__(self): |
52 |
- del_aubio_sndfile(self.file) |
53 |
+ if self.file != None: del_aubio_sndfile(self.file) |
54 |
def info(self): |
55 |
aubio_sndfile_info(self.file) |
56 |
def samplerate(self): |
57 |
@@ -126,7 +128,7 @@ |
58 |
channels=1,samplerate=44100.,omode=aubio_pitchm_freq,yinthresh=0.1): |
59 |
self.pitchp = new_aubio_pitchdetection(bufsize,hopsize,channels, |
60 |
samplerate,mode,omode) |
61 |
- aubio_pitchdetection_set_yinthresh(self.pitchp,yinthresh) |
62 |
+ aubio_pitchdetection_set_yinthresh(self.pitchp,yinthresh) |
63 |
#self.filt = filter(srate,"adsgn") |
64 |
def __del__(self): |
65 |
del_aubio_pitchdetection(self.pitchp) |
66 |
--- python/aubio/bench/onset.py |
67 |
+++ python/aubio/bench/onset.py |
68 |
@@ -111,7 +111,7 @@ |
69 |
for i in self.vlist: |
70 |
gd.append(i['GD']) |
71 |
fp.append(i['FP']) |
72 |
- d.append(Gnuplot.Data(fp, gd, with='linespoints', |
73 |
+ d.append(Gnuplot.Data(fp, gd, with_='linespoints', |
74 |
title="%s %s" % (plottitle,i['mode']) )) |
75 |
|
76 |
def plotplotroc(self,d,outplot=0,extension='ps'): |
77 |
@@ -147,7 +147,7 @@ |
78 |
for i in self.vlist: |
79 |
x.append(i['prec']) |
80 |
y.append(i['recl']) |
81 |
- d.append(Gnuplot.Data(x, y, with='linespoints', |
82 |
+ d.append(Gnuplot.Data(x, y, with_='linespoints', |
83 |
title="%s %s" % (plottitle,i['mode']) )) |
84 |
|
85 |
def plotplotpr(self,d,outplot=0,extension='ps'): |
86 |
@@ -172,7 +172,7 @@ |
87 |
for i in self.vlist: |
88 |
x.append(i['thres']) |
89 |
y.append(i['dist']) |
90 |
- d.append(Gnuplot.Data(x, y, with='linespoints', |
91 |
+ d.append(Gnuplot.Data(x, y, with_='linespoints', |
92 |
title="%s %s" % (plottitle,i['mode']) )) |
93 |
|
94 |
def plotplotfmeas(self,d,outplot="",extension='ps', title="F-measure"): |
95 |
@@ -205,7 +205,7 @@ |
96 |
for i in self.vlist: |
97 |
x.append(i[var]) |
98 |
y.append(i['dist']) |
99 |
- d.append(Gnuplot.Data(x, y, with='linespoints', |
100 |
+ d.append(Gnuplot.Data(x, y, with_='linespoints', |
101 |
title="%s %s" % (plottitle,i['mode']) )) |
102 |
|
103 |
def plotplotfmeasvar(self,d,var,outplot="",extension='ps', title="F-measure"): |
104 |
@@ -244,7 +244,7 @@ |
105 |
total = v['Torig'] |
106 |
for i in range(len(per)): per[i] /= total/100. |
107 |
|
108 |
- d.append(Gnuplot.Data(val, per, with='fsteps', |
109 |
+ d.append(Gnuplot.Data(val, per, with_='fsteps', |
110 |
title="%s %s" % (plottitle,v['mode']) )) |
111 |
#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (mean,smean)) |
112 |
#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (amean,samean)) |
113 |
@@ -275,7 +275,7 @@ |
114 |
total = v['Torig'] |
115 |
for i in range(len(per)): per[i] /= total/100. |
116 |
|
117 |
- d.append(Gnuplot.Data(val, per, with='fsteps', |
118 |
+ d.append(Gnuplot.Data(val, per, with_='fsteps', |
119 |
title="%s %s" % (plottitle,v['mode']) )) |
120 |
#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (mean,smean)) |
121 |
#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (amean,samean)) |
122 |
--- python/aubio/gnuplot.py |
123 |
+++ python/aubio/gnuplot.py |
124 |
@@ -23,7 +23,7 @@ |
125 |
|
126 |
def audio_to_array(filename): |
127 |
import aubio.aubioclass |
128 |
- import numarray |
129 |
+ from numpy import arange |
130 |
hopsize = 2048 |
131 |
filei = aubio.aubioclass.sndfile(filename) |
132 |
framestep = 1/(filei.samplerate()+0.) |
133 |
@@ -39,7 +39,7 @@ |
134 |
while (curpos < readsize): |
135 |
data.append(myvec.get(curpos,i)) |
136 |
curpos+=1 |
137 |
- time = numarray.arange(len(data))*framestep |
138 |
+ time = arange(len(data))*framestep |
139 |
return time,data |
140 |
|
141 |
def plot_audio(filenames, g, options): |
142 |
@@ -143,29 +143,29 @@ |
143 |
|
144 |
def downsample_audio(time,data,maxpoints=10000): |
145 |
""" resample audio data to last only maxpoints """ |
146 |
- import numarray |
147 |
+ from numpy import array, resize |
148 |
length = len(time) |
149 |
downsample = length/maxpoints |
150 |
if downsample == 0: downsample = 1 |
151 |
- x = numarray.array(time).resize(length)[0:-1:downsample] |
152 |
- y = numarray.array(data).resize(length)[0:-1:downsample] |
153 |
+ x = resize(array(time),length)[0:-1:downsample] |
154 |
+ y = resize(array(data),length)[0:-1:downsample] |
155 |
return x,y |
156 |
|
157 |
def make_audio_plot(time,data,maxpoints=10000): |
158 |
""" create gnuplot plot from an audio file """ |
159 |
import Gnuplot, Gnuplot.funcutils |
160 |
x,y = downsample_audio(time,data,maxpoints=maxpoints) |
161 |
- return Gnuplot.Data(x,y,with='lines') |
162 |
+ return Gnuplot.Data(x,y,with_='lines') |
163 |
|
164 |
def make_audio_envelope(time,data,maxpoints=10000): |
165 |
""" create gnuplot plot from an audio file """ |
166 |
- import numarray |
167 |
+ from numpy import array |
168 |
import Gnuplot, Gnuplot.funcutils |
169 |
bufsize = 500 |
170 |
- x = [i.mean() for i in numarray.array(time).resize(len(time)/bufsize,bufsize)] |
171 |
- y = [i.mean() for i in numarray.array(data).resize(len(time)/bufsize,bufsize)] |
172 |
+ x = [i.mean() for i in resize(array(time), (len(time)/bufsize,bufsize))] |
173 |
+ y = [i.mean() for i in resize(array(data), (len(time)/bufsize,bufsize))] |
174 |
x,y = downsample_audio(x,y,maxpoints=maxpoints) |
175 |
- return Gnuplot.Data(x,y,with='lines') |
176 |
+ return Gnuplot.Data(x,y,with_='lines') |
177 |
|
178 |
def gnuplot_addargs(parser): |
179 |
""" add common gnuplot argument to OptParser object """ |
180 |
--- python/aubio/onsetcompare.py |
181 |
+++ python/aubio/onsetcompare.py |
182 |
@@ -106,7 +106,7 @@ |
183 |
return orig, missed, merged, expc, bad, doubled, l, labs |
184 |
|
185 |
def notes_roc (la, lb, eps): |
186 |
- from numarray import transpose, add, resize |
187 |
+ from numpy import transpose, add, resize |
188 |
""" creates a matrix of size len(la)*len(lb) then look for hit and miss |
189 |
in it within eps tolerance windows """ |
190 |
gdn,fpw,fpg,fpa,fdo,fdp = 0,0,0,0,0,0 |
191 |
--- python/aubio/task/beat.py |
192 |
+++ python/aubio/task/beat.py |
193 |
@@ -247,7 +247,7 @@ |
194 |
|
195 |
def plot(self,oplots,results): |
196 |
import Gnuplot |
197 |
- oplots.append(Gnuplot.Data(results,with='linespoints',title="auto")) |
198 |
+ oplots.append(Gnuplot.Data(results,with_='linespoints',title="auto")) |
199 |
|
200 |
def plotplot(self,wplot,oplots,outplot=None,extension=None,xsize=1.,ysize=1.,spectro=False): |
201 |
import Gnuplot |
202 |
@@ -258,5 +258,5 @@ |
203 |
#f = make_audio_plot(time,data) |
204 |
|
205 |
g = gnuplot_create(outplot=outplot, extension=extension) |
206 |
- oplots = [Gnuplot.Data(self.gettruth(),with='linespoints',title="orig")] + oplots |
207 |
+ oplots = [Gnuplot.Data(self.gettruth(),with_='linespoints',title="orig")] + oplots |
208 |
g.plot(*oplots) |
209 |
--- python/aubio/task/notes.py |
210 |
+++ python/aubio/task/notes.py |
211 |
@@ -92,18 +92,17 @@ |
212 |
return now, onset, freq, ifreq |
213 |
|
214 |
def plot(self,now,onset,freq,ifreq,oplots): |
215 |
- import numarray |
216 |
import Gnuplot |
217 |
|
218 |
- oplots.append(Gnuplot.Data(now,freq,with='lines', |
219 |
+ oplots.append(Gnuplot.Data(now,freq,with_='lines', |
220 |
title=self.params.pitchmode)) |
221 |
- oplots.append(Gnuplot.Data(now,ifreq,with='lines', |
222 |
+ oplots.append(Gnuplot.Data(now,ifreq,with_='lines', |
223 |
title=self.params.pitchmode)) |
224 |
|
225 |
temponsets = [] |
226 |
for i in onset: |
227 |
temponsets.append(i*1000) |
228 |
- oplots.append(Gnuplot.Data(now,temponsets,with='impulses', |
229 |
+ oplots.append(Gnuplot.Data(now,temponsets,with_='impulses', |
230 |
title=self.params.pitchmode)) |
231 |
|
232 |
def plotplot(self,wplot,oplots,outplot=None,multiplot = 0): |
233 |
@@ -117,10 +116,10 @@ |
234 |
# check if ground truth exists |
235 |
#timet,pitcht = self.gettruth() |
236 |
#if timet and pitcht: |
237 |
- # oplots = [Gnuplot.Data(timet,pitcht,with='lines', |
238 |
+ # oplots = [Gnuplot.Data(timet,pitcht,with_='lines', |
239 |
# title='ground truth')] + oplots |
240 |
|
241 |
- t = Gnuplot.Data(0,0,with='impulses') |
242 |
+ t = Gnuplot.Data(0,0,with_='impulses') |
243 |
|
244 |
g = gnuplot_init(outplot) |
245 |
g('set title \'%s\'' % (re.sub('.*/','',self.input))) |
246 |
--- python/aubio/task/onset.py |
247 |
+++ python/aubio/task/onset.py |
248 |
@@ -92,7 +92,7 @@ |
249 |
import Gnuplot, Gnuplot.funcutils |
250 |
import aubio.txtfile |
251 |
import os.path |
252 |
- import numarray |
253 |
+ from numpy import arange, array, ones |
254 |
from aubio.onsetcompare import onset_roc |
255 |
|
256 |
x1,y1,y1p = [],[],[] |
257 |
@@ -102,8 +102,8 @@ |
258 |
self.lenofunc = len(ofunc) |
259 |
self.maxofunc = max(ofunc) |
260 |
# onset detection function |
261 |
- downtime = numarray.arange(len(ofunc))*self.params.step |
262 |
- oplot.append(Gnuplot.Data(downtime,ofunc,with='lines',title=self.params.onsetmode)) |
263 |
+ downtime = arange(len(ofunc))*self.params.step |
264 |
+ oplot.append(Gnuplot.Data(downtime,ofunc,with_='lines',title=self.params.onsetmode)) |
265 |
|
266 |
# detected onsets |
267 |
if not nplot: |
268 |
@@ -111,11 +111,11 @@ |
269 |
x1.append(i[0]*self.params.step) |
270 |
y1.append(self.maxofunc) |
271 |
y1p.append(-self.maxofunc) |
272 |
- #x1 = numarray.array(onsets)*self.params.step |
273 |
- #y1 = self.maxofunc*numarray.ones(len(onsets)) |
274 |
+ #x1 = array(onsets)*self.params.step |
275 |
+ #y1 = self.maxofunc*ones(len(onsets)) |
276 |
if x1: |
277 |
- oplot.append(Gnuplot.Data(x1,y1,with='impulses')) |
278 |
- wplot.append(Gnuplot.Data(x1,y1p,with='impulses')) |
279 |
+ oplot.append(Gnuplot.Data(x1,y1,with_='impulses')) |
280 |
+ wplot.append(Gnuplot.Data(x1,y1p,with_='impulses')) |
281 |
|
282 |
oplots.append((oplot,self.params.onsetmode,self.maxofunc)) |
283 |
|
284 |
@@ -126,9 +126,9 @@ |
285 |
self.title = "" #"(no ground truth)" |
286 |
else: |
287 |
t_onsets = aubio.txtfile.read_datafile(datafile) |
288 |
- x2 = numarray.array(t_onsets).resize(len(t_onsets)) |
289 |
- y2 = self.maxofunc*numarray.ones(len(t_onsets)) |
290 |
- wplot.append(Gnuplot.Data(x2,y2,with='impulses')) |
291 |
+ x2 = array(t_onsets).resize(len(t_onsets)) |
292 |
+ y2 = self.maxofunc*ones(len(t_onsets)) |
293 |
+ wplot.append(Gnuplot.Data(x2,y2,with_='impulses')) |
294 |
|
295 |
tol = 0.050 |
296 |
|
297 |
--- python/aubio/task/pitch.py |
298 |
+++ python/aubio/task/pitch.py |
299 |
@@ -156,7 +156,7 @@ |
300 |
|
301 |
time = [ (i+self.params.pitchdelay)*self.params.step for i in range(len(pitch)) ] |
302 |
pitch = [aubio_freqtomidi(i) for i in pitch] |
303 |
- oplots.append(Gnuplot.Data(time,pitch,with='lines', |
304 |
+ oplots.append(Gnuplot.Data(time,pitch,with_='lines', |
305 |
title=self.params.pitchmode)) |
306 |
titles.append(self.params.pitchmode) |
307 |
|
308 |
@@ -170,7 +170,7 @@ |
309 |
if truth: |
310 |
timet,pitcht = self.gettruth() |
311 |
if timet and pitcht: |
312 |
- oplots = [Gnuplot.Data(timet,pitcht,with='lines', |
313 |
+ oplots = [Gnuplot.Data(timet,pitcht,with_='lines', |
314 |
title='ground truth')] + oplots |
315 |
|
316 |
g = gnuplot_create(outplot=outplot, extension=extension) |
317 |
--- python/aubiofilter-notes |
318 |
+++ python/aubiofilter-notes |
319 |
@@ -78,7 +78,7 @@ |
320 |
|
321 |
from aubio import notefilter,txtfile,gnuplot |
322 |
""" load midi and raw data """ |
323 |
- from numarray import array |
324 |
+ from numpy import array |
325 |
notelist = array(txtfile.read_datafile(input)) |
326 |
""" filter it out """ |
327 |
notelist_filtered = notefilter.segraw_onsets4(notelist,winlength,eps) |
328 |
--- python/aubionotes |
329 |
+++ python/aubionotes |
330 |
@@ -4,7 +4,6 @@ |
331 |
|
332 |
import aubio.aubioclass |
333 |
import aubio.median |
334 |
- #from numarray import around |
335 |
from math import floor |
336 |
hopsize = 512 |
337 |
bufsize = 4096 |
338 |
--- python/aubioplot-notes |
339 |
+++ python/aubioplot-notes |
340 |
@@ -18,7 +18,7 @@ |
341 |
def main (sysargs) : |
342 |
from aubio.txtfile import read_datafile |
343 |
from aubio.gnuplot import plotnote,plotnote_do |
344 |
- from numarray import array |
345 |
+ from numpy import array |
346 |
filein,fileout = parse_args(sysargs) |
347 |
#print 'checking', fileerr, 'against', fileorg |
348 |
""" load midi and raw data """ |
349 |
--- python/aubioweb.py |
350 |
+++ python/aubioweb.py |
351 |
@@ -11,7 +11,7 @@ |
352 |
sndfile-programs (sndfile-info) |
353 |
vorbis-tools (oggenc) |
354 |
python-gnuplot |
355 |
-python-numarray |
356 |
+python-numpy |
357 |
|
358 |
Try the command line tools in aubio/python to test your installation. |
359 |
|
360 |
--- python/aubio/plot/keyboard.py |
361 |
+++ python/aubio/plot/keyboard.py |
362 |
@@ -30,8 +30,8 @@ |
363 |
yb = [y0+(y1-y0)*2/3. for i in range(len(xb))] |
364 |
ybdelta = [(y1-y0)*1/3. for i in range(len(xb))] |
365 |
|
366 |
- whites = Gnuplot.Data(xw,yw,xwdelta,ywdelta,with = 'boxxyerrorbars') |
367 |
- blacks = Gnuplot.Data(xb,yb,xbdelta,ybdelta,with = 'boxxyerrorbars fill solid') |
368 |
+ whites = Gnuplot.Data(xw,yw,xwdelta,ywdelta,with_ = 'boxxyerrorbars') |
369 |
+ blacks = Gnuplot.Data(xb,yb,xbdelta,ybdelta,with_ = 'boxxyerrorbars fill solid') |
370 |
|
371 |
return blacks,whites |