source: python/bench-onset @ 4cc9fe5

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 4cc9fe5 was 4cc9fe5, checked in by Paul Brossier <piem@altern.org>, 19 years ago

added bench tools

  • Property mode set to 100755
File size: 1.0 KB
RevLine 
[4cc9fe5]1#! /usr/bin/python
2
3from aubio.bench.config import *
4from aubio.bench.node import *
5
6datapath = "%s%s" % (DATADIR,'/onset/DB')
7respath = '/var/tmp/DB-testings'
8
9MODES = 'hfc', 'complexdomain', 'energy', 'phase', 'specdiff', 'kl', 'mkl'
10THRESHOLD = range(1,14,1)
11
12#        prepareresultpath
13act_on_results(mkdir,datapath,respath,filter='d')
14
15def compute_data(input,output):
16        aubiocmd = "%s%s %s%s" % \
17                ("LD_LIBRARY_PATH=",LD_LIBRARY_PATH,AUBIOHOME,"/examples/aubioonset")
18        for m in MODES:
19                for k in THRESHOLD:
20                        cmd = "%s --input \"%s\" --onset %s --threshold %s > \"%s--%s--%s.txt\"" \
21                                % (aubiocmd,input,m,k/10.,output,m,k/10.)
22                        runcommand(cmd,debug=1)
23
24
25#        computedata
26act_on_data(compute_data,datapath,respath,suffix='',filter='f -name \'*.wav\'')
27
28#        gatherdata
29#act_on_data(my_print,datapath,respath,suffix='.txt',filter='f -name \'*.wav\'')
30#        gatherthreshold
31#        gathermodes
32#        comparediffs
33#        gatherdiffs
34
35
Note: See TracBrowser for help on using the repository browser.