Changeset b257b60


Ignore:
Timestamp:
Aug 12, 2015, 7:21:38 PM (9 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
60fc05b
Parents:
3a1a5d6 (diff), 7b2d740 (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.
Message:

Merge branch 'develop' into notes

Files:
12 added
129 deleted
54 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    r3a1a5d6 rb257b60  
    2424.lock-waf*
    2525.waf-*
     26waf
     27waflib
    2628build/
    2729
  • ChangeLog

    r3a1a5d6 rb257b60  
     12015-08-01 Paul Brossier <piem@aubio.org>
     2
     3        [ Interface ]
     4        * src/onset/onset.h: add aubio_onset_get_silence(), fix description of
     5        aubio_onset_get/set_delay functions
     6        * src/tempo/tempo.h: add aubio_tempo_get_silence and aubio_tempo_get_threshold
     7
     8        [ Library ]
     9        * src/io/audio_unit.c: fix deprecation warning (closes #16)
     10        * src/io/sink_apple_audio.c: avoid opening null path
     11        * src/io/sink_sndfile.c: improve error messages, set nsamples after write
     12        * src/io/sink_wavwrite.c: fail if samplerate is way too large, assume
     13        windows is little endian to build with mingw32
     14        * src/io/source_apple_audio.c: check out of bounds _seek, set s->path, quiet
     15        * src/io/source_avcodec.c: update to libav10, libavcodec 55.34.1
     16        * src/io/source_sndfile.c: cast to uint_t for now, clarify some variables
     17        names, fix crash, zero-pad output vector when upsampling, improve seek errors and strings
     18        * src/io/source_wavread.c: avoid orphan parenthesis , cast size_t to int to
     19        avoid warning on win64 , improve seek errors processing , sync error message
     20        * src/onset/onset.c: avoid doubled onset at start, check parameters
     21        * src/pitch/pitch.c: add Hertz as valid unit string, check parameters
     22        * src/pitch/pitchyin.c, src/pitch/pitchyinfft.c: avoid producing NaN on silence (closes #7)
     23        * src/pitch/pitchyin.{c,h}: fix typo, developed
     24        * src/spectral/phasevoc.c: fix argument checks, improve error messages
     25        * src/synth/sampler.c: make sure blocksize > 0
     26        * src/tempo/beattracking.c: avoid segfault on silence (closes #24)
     27        * src/tempo/tempo.c: add silence detection (closes #23), add old behavior in
     28        examples/aubiotrack.c, check parameters
     29        * src/*.c: fix some useless float conversion
     30
     31        [ Python ]
     32        * python/ext/aubiomodule.c: improve documentation
     33        * python/ext/py-musicutils.c: add silence_detection (closes #21),
     34        level_detection, db_spl, level_lin, complete window implementation
     35        * python/ext/py-source.c: add channels, add seek (closes #9)
     36        * python/demos/demo_a_weighting.py: add simple demo for a_weighting
     37        * python/demos/demo_sink_multi.py: add multi channel version
     38        * python/demos/, python/demos/: minor improvements, improve syntax (closes #19)
     39        * python/setup.py: use setuptools, add numpy to install_requires
     40
     41        [ Build ]
     42        * waf: removed, now automatically downloaded with make, updated to 1.8.12
     43        * Makefile: add target to fetch waf and basic instructions
     44        * .travis.yml: added template for travis continuous integration
     45        * {examples,src,tests}/wscript_build: add external libs and uselib to targets
     46        * src/wscript_build: do not hardocode install path
     47        * wscript, src/io/*.c: use custom defines instead of __APPLE__
     48        * wscript: make fat build optional, remove iOS sdk versioning
     49
     50        [ General ]
     51        * examples/: use outmsg to print notes (fixes #8)
     52        * examples/parse_args.h: improve short documentation (closes #12)
     53        * doc/*.cfg: remove html timestamps to make build reproducible (see debian bug #779216)
     54        * doc/aubiocut.txt: improve documentation
     55        * doc/*.rst: add sphinx documentation basis with Makefile and conf.py
     56        * README.md: minor updates
     57        * python.old: removed old code
     58        * tests/: minor bug fixing
     59
    1602014-01-31 Paul Brossier <piem@aubio.org>
    261
  • README.md

    r3a1a5d6 rb257b60  
    4646 - `aubioquiet` extracts quiet and loud regions
    4747
    48 Additionaly, the python module comes with the following script:
     48Additionally, the python module comes with the following script:
    4949
    5050 - `aubiocut` slices sound files at onset or beat timestamps
     
    7878page](http://aubio.org/download).
    7979
    80 aubio uses [waf](https://code.google.com/p/waf/) to configure, compile, and
    81 test the source:
     80aubio uses [waf](https://waf.io/) to configure, compile, and test the source:
    8281
    8382    ./waf configure
     
    8584    sudo ./waf install
    8685
    87 aubio compiles on Linux, Mac OS X, Cygwin, and iPhone.
     86If waf is not found in the directory, you can download and install it with:
     87
     88    make getwaf
     89
     90aubio compiles on Linux, Mac OS X, Cygwin, and iOS.
    8891
    8992Credits and Publications
  • VERSION

    r3a1a5d6 rb257b60  
    11AUBIO_MAJOR_VERSION=0
    22AUBIO_MINOR_VERSION=4
    3 AUBIO_PATCH_VERSION=2
     3AUBIO_PATCH_VERSION=3
    44AUBIO_VERSION_STATUS='~alpha'
    55LIBAUBIO_LT_CUR=4
    6 LIBAUBIO_LT_REV=1
    7 LIBAUBIO_LT_AGE=1
     6LIBAUBIO_LT_REV=2
     7LIBAUBIO_LT_AGE=2
  • doc/aubiocut.txt

    r3a1a5d6 rb257b60  
    2020
    2121  -r, --samplerate rate  Fetch the input source, resampled at the given
    22   sampling rate. The rate should be specified in Hertz as an integer. If 0,
    23   the sampling rate of the original source will be used. Defaults to 0.
     22  sampling rate. The rate should be specified in Hertz as an integer. If set
     23  to 0, the sampling rate of the original source will be used. Defaults to 0.
    2424
    2525  -B, --bufsize win  The size of the buffer to analyze, that is the length
     
    4040
    4141  -c, --cut  Cut input sound file at detected labels. A new sound files for
    42   each slice will be created in the current directory.
     42  each slice will be created in the current directory.
     43
     44  -o, --output directory  Specify the directory path where slices of the
     45  original source should be created.
     46
     47  --cut-until-nsamples n  How many extra samples should be added at the end of
     48  each slice (default 0).
     49
     50  --cut-until-nslices n  How many extra slices should be added at the end of
     51  each slice (default 0).
    4352
    4453  -h, --help  Print a short help message and exit.
  • doc/full.cfg

    r3a1a5d6 rb257b60  
    11091109# This tag requires that the tag GENERATE_HTML is set to YES.
    11101110
    1111 HTML_TIMESTAMP         = YES
     1111HTML_TIMESTAMP         = NO
    11121112
    11131113# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
  • doc/web.cfg

    r3a1a5d6 rb257b60  
    11281128# This tag requires that the tag GENERATE_HTML is set to YES.
    11291129
    1130 HTML_TIMESTAMP         = YES
     1130HTML_TIMESTAMP         = NO
    11311131
    11321132# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
  • examples/aubiomfcc.c

    r3a1a5d6 rb257b60  
    4141void process_print (void)
    4242{
    43   /* output times in seconds and extracted mfccs */
    44   outmsg("%f\t",blocks*hop_size/(float)samplerate);
    45   fvec_print(mfcc_out);
     43  /* output times in selected format */
     44  print_time (blocks * hop_size);
     45  outmsg ("\t");
     46  /* output extracted mfcc */
     47  fvec_print (mfcc_out);
    4648}
    4749
  • examples/aubioonset.c

    r3a1a5d6 rb257b60  
    5050{
    5151  if ( is_onset ) {
    52     outmsg ("%f\n", aubio_onset_get_last_s (o) );
     52    print_time(aubio_onset_get_last (o));
     53    outmsg ("\n");
    5354  }
    5455}
  • examples/aubiopitch.c

    r3a1a5d6 rb257b60  
    4747{
    4848  smpl_t pitch_found = fvec_get_sample(pitch, 0);
    49   outmsg("%f %f\n",(blocks)
    50       *hop_size/(float)samplerate, pitch_found);
     49  print_time(blocks * hop_size);
     50  outmsg(" %f\n", pitch_found);
    5151}
    5252
  • examples/aubioquiet.c

    r3a1a5d6 rb257b60  
    3939void process_print (void) {
    4040  int curblocks = (blocks - 4) > 0 ? blocks - 4 : 0;
    41   if (issilence == -1) {
    42     outmsg("NOISY: %f\n",curblocks*hop_size/(float)samplerate);
    43   } else if (issilence == 2) {
    44     outmsg("QUIET: %f\n",curblocks*hop_size/(float)samplerate);
     41  if (issilence == -1 || issilence == 2) {
     42    if (issilence == -1) {
     43      outmsg ("NOISY: ");
     44    } else { // if (issilence == 2) {
     45      outmsg ("QUIET: ");
     46    }
     47    print_time (curblocks * hop_size);
     48    outmsg ("\n");
    4549  }
    4650}
  • examples/aubiotrack.c

    r3a1a5d6 rb257b60  
    5151void process_print (void) {
    5252  if ( is_beat && !is_silence ) {
    53     outmsg("%f\n", aubio_tempo_get_last_s(tempo) );
     53    print_time (aubio_tempo_get_last (tempo));
     54    outmsg ("\n");
    5455  }
    5556}
     
    7172  tempo_out = new_fvec(2);
    7273  tempo = new_aubio_tempo(tempo_method, buffer_size, hop_size, samplerate);
     74  // set silence threshold very low to output beats even during silence
     75  // aubio_tempo_set_silence(tempo, -1000.);
    7376  if (onset_threshold != 0.) aubio_tempo_set_threshold (tempo, onset_threshold);
    7477
  • examples/parse_args.h

    r3a1a5d6 rb257b60  
    3535extern char_t * pitch_unit;
    3636extern smpl_t pitch_tolerance;
     37// time stuff
     38extern uint_t time_format;
    3739// tempo stuff
    3840extern char_t * tempo_method;
     
    6971#endif
    7072      "       -r      --samplerate       select samplerate\n"
     73      "                 use 0 to use input source samplerate, or 32000 to force 32kHz\n"
    7174      "       -B      --bufsize          set buffer size\n"
     75      "                 number of frames to run the analysis on\n"
    7276      "       -H      --hopsize          set hopsize\n"
     77      "                 number of frames to read from source before each analysis\n"
    7378#ifdef PROG_HAS_ONSET
    7479      "       -O      --onset            select onset detection algorithm\n"
     80      "                 <default|energy|hfc|complex|phase|specdiff|kl|mkl|specflux>;\n"
     81      "                 default=hfc\n"
    7582      "       -t      --onset-threshold  set onset detection threshold\n"
     83      "                 a value between 0.1 (more detections) and 1 (less); default=0.3\n"
    7684#endif /* PROG_HAS_ONSET */
    7785#ifdef PROG_HAS_PITCH
    7886      "       -p      --pitch            select pitch detection algorithm\n"
     87      "                 <default|yinfft|yin|mcomb|fcomb|schmitt>; default=yinfft\n"
    7988      "       -u      --pitch-unit       select pitch output unit\n"
     89      "                 <default|freq|hertz|Hz|midi|cent|bin>; default=freq\n"
    8090      "       -l      --pitch-tolerance  select pitch tolerance\n"
     91      "                 (yin, yinfft only) a value between 0.1 and 0.7; default=0.3\n"
    8192#endif /* PROG_HAS_PITCH */
    8293      "       -s      --silence          select silence threshold\n"
     94      "                 a value in dB, for instance -70, or -100; default=-90\n"
     95      "       -T      --time-format      select time values output format\n"
     96      "                 (samples, ms, seconds) default=seconds\n"
    8397#ifdef PROG_HAS_OUTPUT
    8498      "       -m      --mix-input        mix input signal with output signal\n"
     99      "                 input signal will be added to output synthesis\n"
    85100      "       -f      --force-overwrite  overwrite output file if needed\n"
     101      "                 do not fail if output file already exists\n"
    86102#endif
    87103#ifdef PROG_HAS_JACK
     
    111127    "p:u:l:"
    112128#endif /* PROG_HAS_PITCH */
     129    "T:"
    113130    "s:mf";
    114131  int next_option;
     
    136153#endif /* PROG_HAS_PITCH */
    137154    {"silence",               1, NULL, 's'},
     155    {"time-format",           1, NULL, 'T'},
    138156    {"mix-input",             0, NULL, 'm'},
    139157    {"force-overwrite",       0, NULL, 'f'},
     
    189207      case 'l':
    190208        pitch_tolerance = (smpl_t) atof (optarg);
     209        break;
     210      case 'T':
     211        if (strcmp (optarg, "samples") == 0) {
     212          time_format = 2;
     213        } else if (strcmp (optarg, "ms") == 0) {
     214          time_format = 1;
     215        } else if (strcmp (optarg, "seconds") == 0) {
     216          time_format = 0;
     217        } else {
     218          errmsg ("Warning: did not get '%s' time-format string\n", optarg);
     219        }
    191220        break;
    192221      case 's':                /* silence threshold */
  • examples/utils.c

    r3a1a5d6 rb257b60  
    4848char_t * pitch_method = "default";
    4949smpl_t pitch_tolerance = 0.0; // will be set if != 0.
     50// time stuff
     51uint_t time_format = 0; // for "seconds", 1 for "ms", 2 for "samples"
    5052// tempo stuff
    5153char_t * tempo_method = "default";
     
    197199#endif
    198200  if (velo == 0) {
    199     outmsg ("%f\n", blocks * hop_size / (float) samplerate);
    200   } else {
    201     outmsg ("%f\t%f\t", mpitch, blocks * hop_size / (float) samplerate);
    202   }
    203 }
    204 
     201    print_time (blocks * hop_size);
     202    outmsg ("\n");
     203  } else {
     204    outmsg ("%f\t", mpitch);
     205    print_time (blocks * hop_size);
     206    outmsg ("\t");
     207  }
     208}
     209
     210void print_time (uint_t time_in_samples) {
     211  /* output times in selected format */
     212  if (time_format == 2) {
     213    outmsg ("%d", time_in_samples);
     214  } else if (time_format == 1) {
     215    outmsg ("%f", 1000. * time_in_samples / (float) samplerate);
     216  } else {
     217    outmsg ("%f", time_in_samples / (float) samplerate);
     218  }
     219}
  • examples/utils.h

    r3a1a5d6 rb257b60  
    5757void process_block (fvec_t *ibuf, fvec_t *obuf);
    5858void process_print (void);
     59
     60void print_time (uint_t samples);
  • examples/wscript_build

    r3a1a5d6 rb257b60  
    22
    33uselib = []
     4uselib += ['FFTW3', 'FFTW3F']
     5uselib += ['SAMPLERATE']
     6uselib += ['SNDFILE']
     7uselib += ['AVCODEC']
     8uselib += ['AVFORMAT']
     9uselib += ['AVRESAMPLE']
     10uselib += ['AVUTIL']
    411uselib += ['JACK']
    512
     
    2027            lib = 'm',
    2128            use = ['aubio', 'utilsio'],
     29            uselib = uselib,
    2230            source = source_file,
    2331            target = str(source_file).split('.')[0]
  • python/demos/demo_mfcc.py

    r3a1a5d6 rb257b60  
    77win_s = 512                 # fft size
    88hop_s = win_s / 4           # hop size
    9 n_filters = 40
     9n_filters = 40              # must be 40 for mfcc
    1010n_coeffs = 13
    1111samplerate = 44100
  • python/demos/demo_pitch.py

    r3a1a5d6 rb257b60  
    2323
    2424pitch_o = pitch("yin", win_s, hop_s, samplerate)
    25 pitch_o.set_unit("freq")
     25pitch_o.set_unit("midi")
    2626pitch_o.set_tolerance(tolerance)
    2727
     
    3737    confidence = pitch_o.get_confidence()
    3838    #if confidence < 0.8: pitch = 0.
    39     print "%f %f %f" % (total_frames / float(samplerate), pitch, confidence)
     39    #print "%f %f %f" % (total_frames / float(samplerate), pitch, confidence)
    4040    pitches += [pitch]
    4141    confidences += [confidence]
     
    8181    ax2.axis( ymin = 0.9 * true_freqs.min(), ymax = 1.1 * true_freqs.max() )
    8282# plot raw pitches
    83 ax2.plot(times, pitches, '--g')
     83ax2.plot(times, pitches, '.g')
    8484# plot cleaned up pitches
    8585cleaned_pitches = pitches
     
    9191#ax2.axis( ymin = 55, ymax = 70 )
    9292plt.setp(ax2.get_xticklabels(), visible = False)
    93 ax2.set_ylabel('f0 (Hz)')
     93ax2.set_ylabel('f0 (midi)')
    9494
    9595# plot confidence
  • python/ext/aubiomodule.c

    r3a1a5d6 rb257b60  
    22#include "aubio-types.h"
    33#include "aubio-generated.h"
     4#include "py-musicutils.h"
     5
     6static char aubio_module_doc[] = "Python module for the aubio library";
     7
     8static char Py_alpha_norm_doc[] = ""
     9"alpha_norm(fvec, integer) -> float\n"
     10"\n"
     11"Compute alpha normalisation factor on vector, given alpha\n"
     12"\n"
     13"Example\n"
     14"-------\n"
     15"\n"
     16">>> b = alpha_norm(a, 9)";
     17
     18static char Py_bintomidi_doc[] = ""
     19"bintomidi(float, samplerate = integer, fftsize = integer) -> float\n"
     20"\n"
     21"Convert bin (float) to midi (float), given the sampling rate and the FFT size\n"
     22"\n"
     23"Example\n"
     24"-------\n"
     25"\n"
     26">>> midi = bintomidi(float, samplerate = 44100, fftsize = 1024)";
     27
     28static char Py_miditobin_doc[] = ""
     29"miditobin(float, samplerate = integer, fftsize = integer) -> float\n"
     30"\n"
     31"Convert midi (float) to bin (float), given the sampling rate and the FFT size\n"
     32"\n"
     33"Example\n"
     34"-------\n"
     35"\n"
     36">>> bin = miditobin(midi, samplerate = 44100, fftsize = 1024)";
     37
     38static char Py_bintofreq_doc[] = ""
     39"bintofreq(float, samplerate = integer, fftsize = integer) -> float\n"
     40"\n"
     41"Convert bin number (float) in frequency (Hz), given the sampling rate and the FFT size\n"
     42"\n"
     43"Example\n"
     44"-------\n"
     45"\n"
     46">>> freq = bintofreq(bin, samplerate = 44100, fftsize = 1024)";
     47
     48static char Py_freqtobin_doc[] = ""
     49"freqtobin(float, samplerate = integer, fftsize = integer) -> float\n"
     50"\n"
     51"Convert frequency (Hz) in bin number (float), given the sampling rate and the FFT size\n"
     52"\n"
     53"Example\n"
     54"-------\n"
     55"\n"
     56">>> bin = freqtobin(freq, samplerate = 44100, fftsize = 1024)";
     57
     58static char Py_zero_crossing_rate_doc[] = ""
     59"zero_crossing_rate(fvec) -> float\n"
     60"\n"
     61"Compute Zero crossing rate of a vector\n"
     62"\n"
     63"Example\n"
     64"-------\n"
     65"\n"
     66">>> z = zero_crossing_rate(a)";
     67
     68static char Py_min_removal_doc[] = ""
     69"min_removal(fvec) -> float\n"
     70"\n"
     71"Remove the minimum value of a vector, in-place modification\n"
     72"\n"
     73"Example\n"
     74"-------\n"
     75"\n"
     76">>> min_removal(a)";
    477
    578extern void add_generated_objects ( PyObject *m );
    679extern void add_ufuncs ( PyObject *m );
    780extern int generated_types_ready(void);
    8 
    9 static char Py_alpha_norm_doc[] = "compute alpha normalisation factor";
    1081
    1182static PyObject *
     
    40111}
    41112
    42 static char Py_bintomidi_doc[] = "convert bin to midi";
    43 
    44113static PyObject *
    45114Py_bintomidi (PyObject * self, PyObject * args)
     
    57126}
    58127
    59 static char Py_miditobin_doc[] = "convert midi to bin";
    60 
    61128static PyObject *
    62129Py_miditobin (PyObject * self, PyObject * args)
     
    74141}
    75142
    76 static char Py_bintofreq_doc[] = "convert bin to freq";
    77 
    78143static PyObject *
    79144Py_bintofreq (PyObject * self, PyObject * args)
     
    91156}
    92157
    93 static char Py_freqtobin_doc[] = "convert freq to bin";
    94 
    95158static PyObject *
    96159Py_freqtobin (PyObject * self, PyObject * args)
     
    107170  return (PyObject *)PyFloat_FromDouble (output);
    108171}
    109 
    110 static char Py_zero_crossing_rate_doc[] = "compute zero crossing rate";
    111172
    112173static PyObject *
     
    139200  return result;
    140201}
    141 
    142 static char Py_min_removal_doc[] = "compute zero crossing rate";
    143202
    144203static PyObject *
     
    182241  {"zero_crossing_rate", Py_zero_crossing_rate, METH_VARARGS, Py_zero_crossing_rate_doc},
    183242  {"min_removal", Py_min_removal, METH_VARARGS, Py_min_removal_doc},
     243  {"level_lin", Py_aubio_level_lin, METH_VARARGS, Py_aubio_level_lin_doc},
     244  {"db_spl", Py_aubio_db_spl, METH_VARARGS, Py_aubio_db_spl_doc},
     245  {"silence_detection", Py_aubio_silence_detection, METH_VARARGS, Py_aubio_silence_detection_doc},
     246  {"level_detection", Py_aubio_level_detection, METH_VARARGS, Py_aubio_level_detection_doc},
     247  {"window", Py_aubio_window, METH_VARARGS, Py_aubio_window_doc},
    184248  {NULL, NULL} /* Sentinel */
    185249};
    186 
    187 static char aubio_module_doc[] = "Python module for the aubio library";
    188250
    189251PyMODINIT_FUNC
  • python/ext/py-sink.c

    r3a1a5d6 rb257b60  
    1010} Py_sink;
    1111
    12 static char Py_sink_doc[] = "sink object";
     12static char Py_sink_doc[] = ""
     13"  __new__(path, samplerate = 44100, channels = 1)\n"
     14"\n"
     15"      Create a new sink, opening the given path for writing.\n"
     16"\n"
     17"      Examples\n"
     18"      --------\n"
     19"\n"
     20"      Create a new sink at 44100Hz, mono:\n"
     21"\n"
     22"      >>> sink('/tmp/t.wav')\n"
     23"\n"
     24"      Create a new sink at 8000Hz, mono:\n"
     25"\n"
     26"      >>> sink('/tmp/t.wav', samplerate = 8000)\n"
     27"\n"
     28"      Create a new sink at 32000Hz, stereo:\n"
     29"\n"
     30"      >>> sink('/tmp/t.wav', samplerate = 32000, channels = 2)\n"
     31"\n"
     32"      Create a new sink at 32000Hz, 5 channels:\n"
     33"\n"
     34"      >>> sink('/tmp/t.wav', channels = 5, samplerate = 32000)\n"
     35"\n"
     36"  __call__(vec, write)\n"
     37"      x(vec,write) <==> x.do(vec, write)\n"
     38"\n"
     39"      Write vector to sink.\n"
     40"\n"
     41"      See also\n"
     42"      --------\n"
     43"      aubio.sink.do\n"
     44"\n";
     45
     46static char Py_sink_do_doc[] = ""
     47"x.do(vec, write) <==> x(vec, write)\n"
     48"\n"
     49"write monophonic vector to sink";
     50
     51static char Py_sink_do_multi_doc[] = ""
     52"x.do_multi(mat, write)\n"
     53"\n"
     54"write polyphonic vector to sink";
     55
     56static char Py_sink_close_doc[] = ""
     57"x.close()\n"
     58"\n"
     59"close this sink now";
    1360
    1461static PyObject *
     
    114161}
    115162
    116 /* function Py_sink_do */
     163/* function Py_sink_do_multi */
    117164static PyObject *
    118165Py_sink_do_multi(Py_sink * self, PyObject * args)
     
    148195
    149196AUBIO_MEMBERS_START(sink)
    150   {"uri", T_STRING, offsetof (Py_sink, uri), READONLY, ""},
    151   {"samplerate", T_INT, offsetof (Py_sink, samplerate), READONLY, ""},
    152   {"channels", T_INT, offsetof (Py_sink, channels), READONLY, ""},
     197  {"uri", T_STRING, offsetof (Py_sink, uri), READONLY,
     198    "path at which the sink was created"},
     199  {"samplerate", T_INT, offsetof (Py_sink, samplerate), READONLY,
     200    "samplerate at which the sink was created"},
     201  {"channels", T_INT, offsetof (Py_sink, channels), READONLY,
     202    "number of channels with which the sink was created"},
    153203AUBIO_MEMBERS_STOP(sink)
    154204
     
    161211
    162212static PyMethodDef Py_sink_methods[] = {
    163   {"__call__", (PyCFunction) Py_sink_do, METH_VARARGS,
    164     "x.__call__(vec, write)\n"
    165     "write monophonic vector to sink"
    166     ""},
    167   {"do", (PyCFunction) Py_sink_do, METH_VARARGS,
    168     "x.do(vec, write)\n"
    169     "write monophonic vector to sink"
    170     ""},
    171   {"do_multi", (PyCFunction) Py_sink_do_multi, METH_VARARGS,
    172     "x.do_multi(mat, write)\n"
    173     "write polyphonic vector to sink"},
    174   {"close", (PyCFunction) Pyaubio_sink_close, METH_NOARGS,
    175     "x.close()\n"
    176     "close this sink now"},
     213  {"do", (PyCFunction) Py_sink_do, METH_VARARGS, Py_sink_do_doc},
     214  {"do_multi", (PyCFunction) Py_sink_do_multi, METH_VARARGS, Py_sink_do_multi_doc},
     215  {"close", (PyCFunction) Pyaubio_sink_close, METH_NOARGS, Py_sink_close_doc},
    177216  {NULL} /* sentinel */
    178217};
  • python/ext/py-source.c

    r3a1a5d6 rb257b60  
    1111} Py_source;
    1212
    13 static char Py_source_doc[] = "source object";
     13static char Py_source_doc[] = ""
     14"   __new__(path, samplerate = 0, hop_size = 512, channels = 1)\n"
     15"\n"
     16"       Create a new source, opening the given path for reading.\n"
     17"\n"
     18"       Examples\n"
     19"       --------\n"
     20"\n"
     21"       Create a new source, using the original samplerate, with hop_size = 512:\n"
     22"\n"
     23"       >>> source('/tmp/t.wav')\n"
     24"\n"
     25"       Create a new source, resampling the original to 8000Hz:\n"
     26"\n"
     27"       >>> source('/tmp/t.wav', samplerate = 8000)\n"
     28"\n"
     29"       Create a new source, resampling it at 32000Hz, hop_size = 32:\n"
     30"\n"
     31"       >>> source('/tmp/t.wav', samplerate = 32000, hop_size = 32)\n"
     32"\n"
     33"       Create a new source, using its original samplerate:\n"
     34"\n"
     35"       >>> source('/tmp/t.wav', samplerate = 0)\n"
     36"\n"
     37"   __call__()\n"
     38"       vec, read = x() <==> vec, read = x.do()\n"
     39"\n"
     40"       Read vector from source.\n"
     41"\n"
     42"       See also\n"
     43"       --------\n"
     44"       aubio.source.do\n"
     45"\n";
     46
     47static char Py_source_get_samplerate_doc[] = ""
     48"x.get_samplerate() -> source samplerate\n"
     49"\n"
     50"Get samplerate of source.";
     51
     52static char Py_source_get_channels_doc[] = ""
     53"x.get_channels() -> number of channels\n"
     54"\n"
     55"Get number of channels in source.";
     56
     57static char Py_source_do_doc[] = ""
     58"vec, read = x.do() <==> vec, read = x()\n"
     59"\n"
     60"Read monophonic vector from source.";
     61
     62static char Py_source_do_multi_doc[] = ""
     63"mat, read = x.do_multi()\n"
     64"\n"
     65"Read polyphonic vector from source.";
     66
     67static char Py_source_close_doc[] = ""
     68"x.close()\n"
     69"\n"
     70"Close this source now.";
     71
     72static char Py_source_seek_doc[] = ""
     73"x.seek(position)\n"
     74"\n"
     75"Seek to resampled frame position.";
    1476
    1577static PyObject *
     
    2082  uint_t samplerate = 0;
    2183  uint_t hop_size = 0;
    22   static char *kwlist[] = { "uri", "samplerate", "hop_size", NULL };
    23 
    24   if (!PyArg_ParseTupleAndKeywords (args, kwds, "|sII", kwlist,
    25           &uri, &samplerate, &hop_size)) {
     84  uint_t channels = 0;
     85  static char *kwlist[] = { "uri", "samplerate", "hop_size", "channels", NULL };
     86
     87  if (!PyArg_ParseTupleAndKeywords (args, kwds, "|sIII", kwlist,
     88          &uri, &samplerate, &hop_size, &channels)) {
    2689    return NULL;
    2790  }
     
    56119  }
    57120
     121  self->channels = 1;
     122  if ((sint_t)channels >= 0) {
     123    self->channels = channels;
     124  } else if ((sint_t)channels < 0) {
     125    PyErr_SetString (PyExc_ValueError,
     126        "can not use negative value for channels");
     127    return NULL;
     128  }
     129
    58130  return (PyObject *) self;
    59131}
     
    64136  self->o = new_aubio_source ( self->uri, self->samplerate, self->hop_size );
    65137  if (self->o == NULL) {
    66     PyErr_SetString (PyExc_StandardError, "error creating object");
     138    char_t errstr[30 + strlen(self->uri)];
     139    sprintf(errstr, "error creating source with %s", self->uri);
     140    PyErr_SetString (PyExc_StandardError, errstr);
    67141    return -1;
    68142  }
    69143  self->samplerate = aubio_source_get_samplerate ( self->o );
    70   self->channels = aubio_source_get_channels ( self->o );
     144  if (self->channels == 0) {
     145    self->channels = aubio_source_get_channels ( self->o );
     146  }
    71147
    72148  return 0;
     
    136212
    137213AUBIO_MEMBERS_START(source)
    138   {"uri", T_STRING, offsetof (Py_source, uri), READONLY, ""},
    139   {"samplerate", T_INT, offsetof (Py_source, samplerate), READONLY, ""},
    140   {"channels", T_INT, offsetof (Py_source, channels), READONLY, ""},
    141   {"hop_size", T_INT, offsetof (Py_source, hop_size), READONLY, ""},
     214  {"uri", T_STRING, offsetof (Py_source, uri), READONLY,
     215    "path at which the source was created"},
     216  {"samplerate", T_INT, offsetof (Py_source, samplerate), READONLY,
     217    "samplerate at which the source is viewed"},
     218  {"channels", T_INT, offsetof (Py_source, channels), READONLY,
     219    "number of channels found in the source"},
     220  {"hop_size", T_INT, offsetof (Py_source, hop_size), READONLY,
     221    "number of consecutive frames that will be read at each do or do_multi call"},
    142222AUBIO_MEMBERS_STOP(source)
    143223
     
    164244}
    165245
     246static PyObject *
     247Pyaubio_source_seek (Py_source *self, PyObject *args)
     248{
     249  uint_t err = 0;
     250
     251  uint_t position;
     252  if (!PyArg_ParseTuple (args, "I", &position)) {
     253    return NULL;
     254  }
     255
     256  err = aubio_source_seek(self->o, position);
     257  if (err != 0) {
     258    PyErr_SetString (PyExc_ValueError,
     259        "error when seeking in source");
     260    return NULL;
     261  }
     262  Py_RETURN_NONE;
     263}
     264
    166265static PyMethodDef Py_source_methods[] = {
    167266  {"get_samplerate", (PyCFunction) Pyaubio_source_get_samplerate,
    168     METH_NOARGS, ""},
     267    METH_NOARGS, Py_source_get_samplerate_doc},
    169268  {"get_channels", (PyCFunction) Pyaubio_source_get_channels,
    170     METH_NOARGS, ""},
     269    METH_NOARGS, Py_source_get_channels_doc},
     270  {"do", (PyCFunction) Py_source_do,
     271    METH_NOARGS, Py_source_do_doc},
    171272  {"do_multi", (PyCFunction) Py_source_do_multi,
    172     METH_NOARGS, ""},
     273    METH_NOARGS, Py_source_do_multi_doc},
    173274  {"close", (PyCFunction) Pyaubio_source_close,
    174     METH_NOARGS, ""},
     275    METH_NOARGS, Py_source_close_doc},
     276  {"seek", (PyCFunction) Pyaubio_source_seek,
     277    METH_VARARGS, Py_source_seek_doc},
    175278  {NULL} /* sentinel */
    176279};
  • python/setup.py

    r3a1a5d6 rb257b60  
    11#! /usr/bin/env python
    22
    3 from distutils.core import setup, Extension
     3from setuptools import setup, Extension
    44
    55import sys
     
    4747    "ext/aubioproxy.c",
    4848    "ext/ufuncs.c",
     49    "ext/py-musicutils.c",
    4950    "ext/py-cvec.c",
    5051    # example without macro
     
    9596    platforms = 'any',
    9697    classifiers = classifiers,
     98    install_requires = ['numpy'],
    9799    )
  • python/tests/test_cvec.py

    r3a1a5d6 rb257b60  
    1010    def test_vector_created_with_zeroes(self):
    1111        a = cvec(10)
    12         a
    1312        shape(a.norm)
    1413        shape(a.phas)
     
    3635        spec = cvec(1024)
    3736        spec.norm[40:100] = 100
    38         assert_equal (spec.norm[0:40], 0)
    39         assert_equal (spec.norm[40:100], 100)
    40         assert_equal (spec.norm[100:-1], 0)
    41         assert_equal (spec.phas, 0)
     37        assert_equal(spec.norm[0:40], 0)
     38        assert_equal(spec.norm[40:100], 100)
     39        assert_equal(spec.norm[100:-1], 0)
     40        assert_equal(spec.phas, 0)
    4241
    4342    def test_assign_cvec_phas_slice(self):
    4443        spec = cvec(1024)
    4544        spec.phas[39:-1] = -pi
    46         assert_equal (spec.phas[0:39], 0)
    47         assert_equal (spec.phas[39:-1], -pi)
    48         assert_equal (spec.norm, 0)
     45        assert_equal(spec.phas[0:39], 0)
     46        assert_equal(spec.phas[39:-1], -pi)
     47        assert_equal(spec.norm, 0)
    4948
    5049if __name__ == '__main__':
  • python/tests/test_mathutils.py

    r3a1a5d6 rb257b60  
    11#! /usr/bin/env python
    22
    3 from numpy.testing import TestCase, run_module_suite
    4 from numpy.testing import assert_equal, assert_almost_equal
     3from numpy.testing import TestCase, assert_equal
    54from numpy import array, arange, isnan, isinf
    65from aubio import bintomidi, miditobin, freqtobin, bintofreq, freqtomidi, miditofreq
  • python/tests/test_pitch.py

    r3a1a5d6 rb257b60  
    6868        errors = errors[2:]
    6969        # check that the mean of all relative errors is less than 10%
    70         assert abs (mean(errors) ) < 0.1, pitches
    71         assert abs (mean(errors) ) < 0.1, "error is bigger than 0.1 (%f)" % mean(errors)
     70        #assert abs (mean(errors) ) < 0.1, pitches
     71        assert abs (median(errors) ) < 0.06, "median of relative errors is bigger than 0.06 (%f)\n found %s\n errors %s" % (mean(errors), pitches, errors)
    7272        #print 'len(pitches), cut:', len(pitches), cut
    73         #print 'mean errors: ', mean(errors), 'mean pitches: ', mean(pitches)
     73        #print 'median errors: ', median(errors), 'median pitches: ', median(pitches)
    7474
    7575pitch_algorithms = [ "default", "yinfft", "yin", "schmitt", "mcomb", "fcomb" , "specacf" ]
     76pitch_algorithms = [ "default", "yinfft", "yin", "schmitt", "mcomb", "fcomb" ]
    7677
     78#freqs = [ 27.5, 55., 110., 220., 440., 880., 1760., 3520. ]
     79freqs = [             110., 220., 440., 880., 1760., 3520. ]
     80signal_modes = []
     81for freq in freqs:
     82    signal_modes += [
     83        ( 4096,  2048, 44100, freq ),
     84        ( 2048,  512, 44100, freq ),
     85        ( 2048, 1024, 44100, freq ),
     86        ( 2048, 1024, 32000, freq ),
     87        ]
     88
     89freqs = [ ] #55., 110., 220., 440., 880., 1760., 3520. ]
     90for freq in freqs:
     91    signal_modes += [
     92        ( 2048, 1024, 22050, freq ),
     93        ( 1024,  256, 16000, freq ),
     94        ( 1024,  256, 8000,  freq ),
     95        ( 1024, 512+256, 8000, freq ),
     96        ]
     97
     98"""
    7799signal_modes = [
    78100        ( 4096,  512, 44100, 2.*882. ),
     
    88110        ( 1024, 512+256, 8000, 440. ),
    89111        ]
     112"""
    90113
    91114def create_test (algo, mode):
     
    97120    for mode in signal_modes:
    98121        test_method = create_test (algo, mode)
    99         test_method.__name__ = 'test_pitch_%s_%d_%d_%dHz_sin_%.2f' % ( algo,
     122        test_method.__name__ = 'test_pitch_%s_%d_%d_%dHz_sin_%.0f' % ( algo,
    100123                mode[0], mode[1], mode[2], mode[3] )
    101124        setattr (aubio_pitch_Sinusoid, test_method.__name__, test_method)
  • python/tests/test_source.py

    r3a1a5d6 rb257b60  
    3333class aubio_source_read_test_case(aubio_source_test_case_base):
    3434
    35     def read_from_sink(self, f):
     35    def read_from_source(self, f):
    3636        total_frames = 0
    3737        while True:
     
    4343        print total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")",
    4444        print "from", f.uri
     45        return total_frames
    4546
    4647    def test_samplerate_hopsize(self):
     
    4950                f = source(p, samplerate, hop_size)
    5051                assert f.samplerate != 0
    51                 self.read_from_sink(f)
     52                self.read_from_source(f)
    5253
    5354    def test_samplerate_none(self):
     
    5556            f = source(p)
    5657            assert f.samplerate != 0
    57             self.read_from_sink(f)
     58            self.read_from_source(f)
    5859
    5960    def test_samplerate_0(self):
     
    6162            f = source(p, 0)
    6263            assert f.samplerate != 0
    63             self.read_from_sink(f)
     64            self.read_from_source(f)
    6465
    6566    def test_wrong_samplerate(self):
     
    8687            assert f.samplerate != 0
    8788            assert f.hop_size != 0
    88             self.read_from_sink(f)
     89            self.read_from_source(f)
     90
     91    def test_seek_to_half(self):
     92        from random import randint
     93        for p in list_of_sounds:
     94            f = source(p, 0, 0)
     95            assert f.samplerate != 0
     96            assert f.hop_size != 0
     97            a = self.read_from_source(f)
     98            c = randint(0, a)
     99            f.seek(c)
     100            b = self.read_from_source(f)
     101            assert a == b + c
    89102
    90103class aubio_source_readmulti_test_case(aubio_source_read_test_case):
    91104
    92     def read_from_sink(self, f):
     105    def read_from_source(self, f):
    93106        total_frames = 0
    94107        while True:
     
    101114        print total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")",
    102115        print "from", f.uri
     116        return total_frames
    103117
    104118if __name__ == '__main__':
  • src/aubio_priv.h

    r3a1a5d6 rb257b60  
    129129#define AUBIO_SPRINTF                sprintf
    130130
    131 /* Libc shortcuts */
     131/* pi and 2*pi */
     132#ifndef M_PI
     133#define PI         (3.14159265358979323846)
     134#else
    132135#define PI         (M_PI)
     136#endif
    133137#define TWO_PI     (PI*2.)
    134138
     
    214218#define SAFE_LOG(f)   LOG(CEIL_DENORMAL(f))
    215219
     220/** silence unused parameter warning by adding an attribute */
     221#if defined(__GNUC__)
    216222#define UNUSED __attribute__((unused))
     223#else
     224#define UNUSED
     225#endif
    217226
    218227#endif /* _AUBIO__PRIV_H */
  • src/io/audio_unit.c

    r3a1a5d6 rb257b60  
    234234  audioFormat.mChannelsPerFrame = 2;
    235235  audioFormat.mFormatID = kAudioFormatLinearPCM;
    236   audioFormat.mFormatFlags = kAudioFormatFlagsCanonical;
     236  audioFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked;
    237237  audioFormat.mFramesPerPacket = 1;
    238   audioFormat.mBitsPerChannel = 8 * sizeof(AudioSampleType);
     238  audioFormat.mBitsPerChannel = 8 * sizeof(SInt16);
    239239#if 1  // interleaving
    240   audioFormat.mBytesPerFrame = 2 * sizeof(AudioSampleType);
    241   audioFormat.mBytesPerPacket = 2 * sizeof(AudioSampleType);
     240  audioFormat.mBytesPerFrame = 2 * sizeof(SInt16);
     241  audioFormat.mBytesPerPacket = 2 * sizeof(SInt16);
    242242#else
    243   audioFormat.mBytesPerPacket = audioFormat.mBytesPerFrame = sizeof(AudioUnitSampleType);
     243  audioFormat.mBytesPerPacket = audioFormat.mBytesPerFrame = sizeof(SInt32);
    244244  audioFormat.mFormatFlags |= kAudioFormatFlagIsNonInterleaved;
    245245#endif
  • src/io/sink_apple_audio.c

    r3a1a5d6 rb257b60  
    6161  s->max_frames = MAX_SIZE;
    6262  s->async = true;
     63
     64  if (uri == NULL) {
     65    AUBIO_ERROR("sink_apple_audio: Aborted opening null path\n");
     66    goto beach;
     67  }
    6368
    6469  s->samplerate = 0;
  • src/io/sink_sndfile.c

    r3a1a5d6 rb257b60  
    142142void aubio_sink_sndfile_do(aubio_sink_sndfile_t *s, fvec_t * write_data, uint_t write){
    143143  uint_t i, j,  channels = s->channels;
    144   int nsamples = channels*write;
     144  int nsamples = 0;
    145145  smpl_t *pwrite;
    146146  sf_count_t written_frames;
    147147
    148148  if (write > s->max_size) {
    149     AUBIO_WRN("trying to write %d frames, but only %d can be written at a time",
     149    AUBIO_WRN("sink_sndfile: trying to write %d frames, but only %d can be written at a time\n",
    150150      write, s->max_size);
    151151    write = s->max_size;
    152152  }
     153
     154  nsamples = channels * write;
    153155
    154156  /* interleaving data  */
     
    162164  written_frames = sf_write_float (s->handle, s->scratch_data, nsamples);
    163165  if (written_frames/channels != write) {
    164     AUBIO_WRN("sink_sndfile: trying to write %d frames to %s, but only %d could be written",
     166    AUBIO_WRN("sink_sndfile: trying to write %d frames to %s, but only %d could be written\n",
    165167      write, s->path, (uint_t)written_frames);
    166168  }
     
    170172void aubio_sink_sndfile_do_multi(aubio_sink_sndfile_t *s, fmat_t * write_data, uint_t write){
    171173  uint_t i, j,  channels = s->channels;
    172   int nsamples = channels*write;
     174  int nsamples = 0;
    173175  smpl_t *pwrite;
    174176  sf_count_t written_frames;
    175177
    176178  if (write > s->max_size) {
    177     AUBIO_WRN("trying to write %d frames, but only %d can be written at a time",
     179    AUBIO_WRN("sink_sndfile: trying to write %d frames, but only %d can be written at a time\n",
    178180      write, s->max_size);
    179181    write = s->max_size;
    180182  }
     183
     184  nsamples = channels * write;
    181185
    182186  /* interleaving data  */
     
    190194  written_frames = sf_write_float (s->handle, s->scratch_data, nsamples);
    191195  if (written_frames/channels != write) {
    192     AUBIO_WRN("sink_sndfile: trying to write %d frames to %s, but only %d could be written",
     196    AUBIO_WRN("sink_sndfile: trying to write %d frames to %s, but only %d could be written\n",
    193197      write, s->path, (uint_t)written_frames);
    194198  }
  • src/io/sink_wavwrite.c

    r3a1a5d6 rb257b60  
    4545#define HTOLES(x) x
    4646#else
     47#ifdef HAVE_WIN_HACKS
     48#define HTOLES(x) x
     49#else
    4750#define HTOLES(x) SWAPS(htons(x))
     51#endif
    4852#endif
    4953
     
    98102  // zero samplerate given. do not open yet
    99103  if ((sint_t)samplerate == 0) return s;
     104  // samplerate way too large, fail
     105  if ((sint_t)samplerate > 192000 * 4) goto beach;
    100106
    101107  s->samplerate = samplerate;
  • src/io/source_sndfile.c

    r3a1a5d6 rb257b60  
    152152void aubio_source_sndfile_do(aubio_source_sndfile_t * s, fvec_t * read_data, uint_t * read){
    153153  uint_t i,j, input_channels = s->input_channels;
    154   /* do actual reading */
     154  /* read from file into scratch_data */
    155155  sf_count_t read_samples = sf_read_float (s->handle, s->scratch_data, s->scratch_size);
    156156
    157   smpl_t *data;
    158 
     157  /* where to store de-interleaved data */
     158  smpl_t *ptr_data;
    159159#ifdef HAVE_SAMPLERATE
    160160  if (s->ratio != 1) {
    161     data = s->input_data->data;
     161    ptr_data = s->input_data->data;
    162162  } else
    163163#endif /* HAVE_SAMPLERATE */
    164164  {
    165     data = read_data->data;
     165    ptr_data = read_data->data;
    166166  }
    167167
    168168  /* de-interleaving and down-mixing data  */
    169169  for (j = 0; j < read_samples / input_channels; j++) {
    170     data[j] = 0;
     170    ptr_data[j] = 0;
    171171    for (i = 0; i < input_channels; i++) {
    172       data[j] += s->scratch_data[input_channels*j+i];
    173     }
    174     data[j] /= (smpl_t)input_channels;
     172      ptr_data[j] += s->scratch_data[input_channels*j+i];
     173    }
     174    ptr_data[j] /= (smpl_t)input_channels;
    175175  }
    176176
     
    196196  sf_count_t read_samples = sf_read_float (s->handle, s->scratch_data, s->scratch_size);
    197197
    198   smpl_t **data;
    199 
     198  /* where to store de-interleaved data */
     199  smpl_t **ptr_data;
    200200#ifdef HAVE_SAMPLERATE
    201201  if (s->ratio != 1) {
    202     AUBIO_ERR("source_sndfile: no multi channel resampling yet");
     202    AUBIO_ERR("source_sndfile: no multi channel resampling yet\n");
    203203    return;
    204     //data = s->input_data->data;
     204    //ptr_data = s->input_data->data;
    205205  } else
    206206#endif /* HAVE_SAMPLERATE */
    207207  {
    208     data = read_data->data;
     208    ptr_data = read_data->data;
    209209  }
    210210
     
    214214    for (j = 0; j < read_samples / input_channels; j++) {
    215215      for (i = 0; i < read_data->height; i++) {
    216         data[i][j] = (smpl_t)s->scratch_data[j * input_channels + i];
     216        ptr_data[i][j] = (smpl_t)s->scratch_data[j * input_channels + i];
    217217      }
    218218    }
     
    222222    for (j = 0; j < read_samples / input_channels; j++) {
    223223      for (i = 0; i < input_channels; i++) {
    224         data[i][j] = (smpl_t)s->scratch_data[j * input_channels + i];
     224        ptr_data[i][j] = (smpl_t)s->scratch_data[j * input_channels + i];
    225225      }
    226226    }
     
    232232    for (j = 0; j < read_samples / input_channels; j++) {
    233233      for (i = input_channels; i < read_data->height; i++) {
    234         data[i][j] = (smpl_t)s->scratch_data[j * input_channels + (input_channels - 1)];
     234        ptr_data[i][j] = (smpl_t)s->scratch_data[j * input_channels + (input_channels - 1)];
    235235      }
    236236    }
     
    265265uint_t aubio_source_sndfile_seek (aubio_source_sndfile_t * s, uint_t pos) {
    266266  uint_t resampled_pos = (uint_t)ROUND(pos / s->ratio);
    267   return sf_seek (s->handle, resampled_pos, SEEK_SET);
     267  sf_count_t sf_ret = sf_seek (s->handle, resampled_pos, SEEK_SET);
     268  if (sf_ret == -1) {
     269    AUBIO_ERR("source_sndfile: Failed seeking %s at %d: %s\n", s->path, pos, sf_strerror (NULL));
     270    return AUBIO_FAIL;
     271  }
     272  if (sf_ret != resampled_pos) {
     273    AUBIO_ERR("source_sndfile: Tried seeking %s at %d, but got %d: %s\n",
     274        s->path, resampled_pos, (uint_t)sf_ret, sf_strerror (NULL));
     275    return AUBIO_FAIL;
     276  }
     277  return AUBIO_OK;
    268278}
    269279
     
    273283  }
    274284  if(sf_close(s->handle)) {
    275     AUBIO_ERR("source_sndfile: Error closing file %s: %s", s->path, sf_strerror (NULL));
     285    AUBIO_ERR("source_sndfile: Error closing file %s: %s\n", s->path, sf_strerror (NULL));
    276286    return AUBIO_FAIL;
    277287  }
  • src/io/source_wavread.c

    r3a1a5d6 rb257b60  
    9393  s->fid = fopen((const char *)path, "rb");
    9494  if (!s->fid) {
    95     AUBIO_ERR("source_wavread: could not open %s (%s)\n", s->path, strerror(errno));
     95    AUBIO_ERR("source_wavread: Failed opening %s (System error: %s)\n", s->path, strerror(errno));
    9696    goto beach;
    9797  }
     
    220220#ifndef HAVE_WIN_HACKS
    221221    AUBIO_ERR("source_wavread: short read (%zd instead of %zd) in %s\n",
     222        bytes_read, bytes_expected, s->path);
    222223#else // mingw does not know about %zd...
    223224    AUBIO_ERR("source_wavread: short read (%d instead of %d) in %s\n",
     225        (int)bytes_read, (int)bytes_expected, s->path);
    224226#endif
    225         bytes_read, bytes_expected, s->path);
    226227    goto beach;
    227228  }
     
    356357
    357358uint_t aubio_source_wavread_seek (aubio_source_wavread_t * s, uint_t pos) {
    358   uint_t ret = fseek(s->fid, s->seek_start + pos * s->blockalign, SEEK_SET);
     359  uint_t ret = 0;
     360  if ((sint_t)pos < 0) {
     361    return AUBIO_FAIL;
     362  }
     363  ret = fseek(s->fid, s->seek_start + pos * s->blockalign, SEEK_SET);
     364  if (ret != 0) {
     365    AUBIO_ERR("source_wavread: could not seek %s at %d (%s)\n", s->path, pos, strerror(errno));
     366    return AUBIO_FAIL;
     367  }
     368  // reset some values
    359369  s->eof = 0;
    360370  s->read_index = 0;
    361   return ret;
     371  return AUBIO_OK;
    362372}
    363373
  • src/mathutils.c

    r3a1a5d6 rb257b60  
    141141    case aubio_win_parzen:
    142142      for (i=0;i<size;i++)
    143         w[i] = 1.0 - ABS((2.*i-size)/(size+1.0));
     143        w[i] = 1.0 - ABS((2.f*i-size)/(size+1.0f));
    144144      break;
    145145    default:
  • src/musicutils.h

    r3a1a5d6 rb257b60  
    113113smpl_t aubio_zero_crossing_rate (fvec_t * v);
    114114
    115 /** compute sound level on a linear
     115/** compute sound level on a linear scale
    116116
    117117  This gives the average of the square amplitudes.
    118118
    119   \param v vector to compute dB SPL from
     119  \param v vector to compute level from
    120120
    121121  \return level of v
  • src/onset/onset.c

    r3a1a5d6 rb257b60  
    6969  } else {
    7070    // we are at the beginning of the file, and we don't find silence
    71     if (o->total_frames == 0 && aubio_silence_detection(input, o->silence) == 0) {
     71    if (o->total_frames <= o->delay && o->last_onset < o ->minioi && aubio_silence_detection(input, o->silence) == 0) {
    7272      //AUBIO_DBG ("beginning of file is not silent, marking as onset\n");
    7373      isonset = o->delay / o->hop_size;
     
    100100}
    101101
     102smpl_t aubio_onset_get_silence(aubio_onset_t * o) {
     103  return o->silence;
     104}
     105
    102106uint_t aubio_onset_set_threshold(aubio_onset_t * o, smpl_t threshold) {
    103107  aubio_peakpicker_set_threshold(o->pp, threshold);
     
    173177{
    174178  aubio_onset_t * o = AUBIO_NEW(aubio_onset_t);
     179
     180  /* check parameters are valid */
     181  if ((sint_t)hop_size < 1) {
     182    AUBIO_ERR("onset: got hop_size %d, but can not be < 1\n", hop_size);
     183    goto beach;
     184  } else if ((sint_t)buf_size < 1) {
     185    AUBIO_ERR("onset: got buffer_size %d, but can not be < 1\n", buf_size);
     186    goto beach;
     187  } else if (buf_size < hop_size) {
     188    AUBIO_ERR("onset: hop size (%d) is larger than win size (%d)\n", buf_size, hop_size);
     189    goto beach;
     190  } else if ((sint_t)samplerate < 1) {
     191    AUBIO_ERR("onset: samplerate (%d) can not be < 1\n", samplerate);
     192    goto beach;
     193  }
     194
    175195  /* store creation parameters */
    176196  o->samplerate = samplerate;
     
    194214  o->total_frames = 0;
    195215  return o;
     216
     217beach:
     218  AUBIO_FREE(o);
     219  return NULL;
    196220}
    197221
  • src/onset/onset.h

    r3a1a5d6 rb257b60  
    126126uint_t aubio_onset_set_silence(aubio_onset_t * o, smpl_t silence);
    127127
     128/** get onset detection silence threshold
     129
     130  \param o onset detection object as returned by new_aubio_onset()
     131
     132  \return current silence threshold
     133
     134*/
     135smpl_t aubio_onset_get_silence(aubio_onset_t * o);
     136
    128137/** get onset detection function
    129138
  • src/pitch/pitch.c

    r3a1a5d6 rb257b60  
    130130    pitch_type = aubio_pitcht_default;
    131131  }
     132
     133  // check parameters are valid
     134  if ((sint_t)hopsize < 1) {
     135    AUBIO_ERR("onset: got hopsize %d, but can not be < 1\n", hopsize);
     136    goto beach;
     137  } else if ((sint_t)bufsize < 1) {
     138    AUBIO_ERR("onset: got buffer_size %d, but can not be < 1\n", bufsize);
     139    goto beach;
     140  } else if (bufsize < hopsize) {
     141    AUBIO_ERR("onset: hop size (%d) is larger than win size (%d)\n", bufsize, hopsize);
     142    goto beach;
     143  } else if ((sint_t)samplerate < 1) {
     144    AUBIO_ERR("onset: samplerate (%d) can not be < 1\n", samplerate);
     145    goto beach;
     146  }
     147
    132148  p->samplerate = samplerate;
    133149  p->type = pitch_type;
     
    179195  }
    180196  return p;
     197
     198beach:
     199  AUBIO_FREE(p);
     200  return NULL;
    181201}
    182202
     
    238258    pitch_mode = aubio_pitchm_freq;
    239259  else if (strcmp (pitch_unit, "hertz") == 0)
     260    pitch_mode = aubio_pitchm_freq;
     261  else if (strcmp (pitch_unit, "Hertz") == 0)
    240262    pitch_mode = aubio_pitchm_freq;
    241263  else if (strcmp (pitch_unit, "Hz") == 0)
     
    296318aubio_pitch_set_silence (aubio_pitch_t * p, smpl_t silence)
    297319{
    298   if (silence < 0 && silence > -200) {
     320  if (silence <= 0 && silence >= -200) {
    299321    p->silence = silence;
    300322    return AUBIO_OK;
    301323  } else {
    302     AUBIO_ERR("pitch: could do set silence to %.2f", silence);
     324    AUBIO_ERR("pitch: could not set silence to %.2f", silence);
    303325    return AUBIO_FAIL;
    304326  }
  • src/pitch/pitchyin.c

    r3a1a5d6 rb257b60  
    146146    }
    147147    tmp2 += yin->data[tau];
    148     yin->data[tau] *= tau / tmp2;
     148    if (tmp2 != 0) {
     149      yin->data[tau] *= tau / tmp2;
     150    } else {
     151      yin->data[tau] = 1.;
     152    }
    149153    period = tau - 3;
    150154    if (tau > 4 && (yin->data[period] < tol) &&
  • src/pitch/pitchyinfft.c

    r3a1a5d6 rb257b60  
    136136    // and the cumulative mean normalized difference function
    137137    tmp += yin->data[tau];
    138     yin->data[tau] *= tau / tmp;
     138    if (tmp != 0) {
     139      yin->data[tau] *= tau / tmp;
     140    } else {
     141      yin->data[tau] = 1.;
     142    }
    139143  }
    140144  // find best candidates
  • src/spectral/phasevoc.c

    r3a1a5d6 rb257b60  
    7878
    7979  if ((sint_t)hop_s < 1) {
    80     AUBIO_ERR("got hop_size %d, but can not be < 1\n", hop_s);
     80    AUBIO_ERR("pvoc: got hop_size %d, but can not be < 1\n", hop_s);
    8181    goto beach;
    8282  } else if ((sint_t)win_s < 1) {
    83     AUBIO_ERR("got buffer_size %d, but can not be < 1\n", win_s);
     83    AUBIO_ERR("pvoc: got buffer_size %d, but can not be < 1\n", win_s);
    8484    goto beach;
    8585  } else if (win_s < hop_s) {
    86     AUBIO_ERR("hop size (%d) is larger than win size (%d)\n", win_s, hop_s);
     86    AUBIO_ERR("pvoc: hop size (%d) is larger than win size (%d)\n", win_s, hop_s);
    8787    goto beach;
    8888  }
  • src/spectral/specdesc.c

    r3a1a5d6 rb257b60  
    119119    onset->data[0] +=
    120120      SQRT (ABS (SQR (o->oldmag->data[j]) + SQR (fftgrain->norm[j])
    121             - 2. * o->oldmag->data[j] * fftgrain->norm[j]
     121            - 2 * o->oldmag->data[j] * fftgrain->norm[j]
    122122            * COS (o->dev1->data[j] - fftgrain->phas[j])));
    123123    /* swap old phase data (need to remember 2 frames behind)*/
  • src/spectral/specdesc.h

    r3a1a5d6 rb257b60  
    158158/** execute spectral description function on a spectral frame
    159159
    160   Generic function to compute spectral detescription.
     160  Generic function to compute spectral description.
    161161
    162162  \param o spectral description object as returned by new_aubio_specdesc()
  • src/synth/sampler.c

    r3a1a5d6 rb257b60  
    4040{
    4141  aubio_sampler_t *s = AUBIO_NEW(aubio_sampler_t);
     42  if ((sint_t)blocksize < 1) {
     43    AUBIO_ERR("sampler: got blocksize %d, but can not be < 1\n", blocksize);
     44    goto beach;
     45  }
    4246  s->samplerate = samplerate;
    4347  s->blocksize = blocksize;
     
    4751  s->playing = 0;
    4852  return s;
     53beach:
     54  AUBIO_FREE(s);
     55  return NULL;
    4956}
    5057
  • src/tempo/beattracking.c

    r3a1a5d6 rb257b60  
    267267  sint_t k = 0;
    268268  smpl_t three_energy = 0., four_energy = 0.;
     269  if (gp < 2) return 4;
    269270  if (acflen > 6 * gp + 2) {
    270271    for (k = -2; k < 2; k++) {
     
    331332  if (counter == 1 && flagstep == 1) {
    332333    //check for consistency between previous beatperiod values
    333     if (ABS (2. * rp - rp1 - rp2) < bt->g_var) {
     334    if (ABS (2 * rp - rp1 - rp2) < bt->g_var) {
    334335      //if true, can activate context dependent model
    335336      flagconst = 1;
  • src/tempo/tempo.c

    r3a1a5d6 rb257b60  
    110110      tempo->data[0] = o->out->data[i] - FLOOR(o->out->data[i]); /* set tactus */
    111111      /* test for silence */
    112       /*
    113112      if (aubio_silence_detection(input, o->silence)==1) {
    114113        tempo->data[0] = 0; // unset beat if silent
    115114      }
    116       */
    117115      o->last_beat = o->total_frames + (uint_t)ROUND(tempo->data[0] * o->hop_size);
    118116    }
     
    149147  o->silence = silence;
    150148  return AUBIO_OK;
     149}
     150
     151smpl_t aubio_tempo_get_silence(aubio_tempo_t * o) {
     152  return o->silence;
    151153}
    152154
     
    157159}
    158160
     161smpl_t aubio_tempo_get_threshold(aubio_tempo_t * o) {
     162  return o->threshold;
     163}
     164
    159165/* Allocate memory for an tempo detection */
    160166aubio_tempo_t * new_aubio_tempo (char_t * tempo_mode,
     
    164170  char_t specdesc_func[20];
    165171  o->samplerate = samplerate;
     172  // check parameters are valid
     173  if ((sint_t)hop_size < 1) {
     174    AUBIO_ERR("tempo: got hop size %d, but can not be < 1\n", hop_size);
     175    goto beach;
     176  } else if ((sint_t)buf_size < 1) {
     177    AUBIO_ERR("tempo: got window size %d, but can not be < 1\n", buf_size);
     178    goto beach;
     179  } else if (buf_size < hop_size) {
     180    AUBIO_ERR("tempo: hop size (%d) is larger than window size (%d)\n", buf_size, hop_size);
     181    goto beach;
     182  } else if ((sint_t)samplerate < 1) {
     183    AUBIO_ERR("tempo: samplerate (%d) can not be < 1\n", samplerate);
     184    goto beach;
     185  }
     186
    166187  /* length of observations, worth about 6 seconds */
    167188  o->winlen = aubio_next_power_of_two(5.8 * samplerate / hop_size);
     189  if (o->winlen < 4) o->winlen = 4;
    168190  o->step = o->winlen/4;
    169191  o->blockpos = 0;
     
    194216  }*/
    195217  return o;
     218
     219beach:
     220  AUBIO_FREE(o);
     221  return NULL;
    196222}
    197223
  • src/tempo/tempo.h

    r3a1a5d6 rb257b60  
    9494uint_t aubio_tempo_set_silence(aubio_tempo_t * o, smpl_t silence);
    9595
     96/** get tempo detection silence threshold
     97
     98  \param o tempo detection object as returned by new_aubio_tempo()
     99
     100  \return current silence threshold
     101
     102*/
     103smpl_t aubio_tempo_get_silence(aubio_tempo_t * o);
     104
    96105/** set tempo detection peak picking threshold
    97106
     
    103112*/
    104113uint_t aubio_tempo_set_threshold(aubio_tempo_t * o, smpl_t threshold);
     114
     115/** get tempo peak picking threshold
     116
     117  \param o tempo detection object as returned by new_aubio_tempo()
     118
     119  \return current tempo detection threshold
     120
     121*/
     122smpl_t aubio_tempo_get_threshold(aubio_tempo_t * o);
    105123
    106124/** get current tempo
  • src/temporal/resampler.c

    r3a1a5d6 rb257b60  
    7777struct _aubio_resampler_t
    7878{
     79  void *dummy;
    7980};
    8081
  • src/wscript_build

    r3a1a5d6 rb257b60  
    2121# build libaubio.so (cshlib) and/or libaubio.a (cstlib)
    2222if ctx.env['DEST_OS'] in ['ios', 'iosimulator']:
    23     build_features = ['cstlib']
     23    build_features = ['cstlib', 'cshlib']
    2424elif ctx.env['DEST_OS'] in ['win32', 'win64']:
    2525    build_features = ['cshlib']
     
    3030    ctx(features = 'c ' + target,
    3131            use = ['lib_objects'],
     32            uselib = uselib,
    3233            lib = 'm',
    3334            target = 'aubio',
    34             install_path = '${PREFIX}/lib',
    3535            vnum = ctx.env['LIB_VERSION'])
    3636
  • tests/src/io/test-source.c

    r3a1a5d6 rb257b60  
    4545    n_frames / hop_size, source_path);
    4646
     47  // close the file (optional)
     48  aubio_source_close(s);
     49  // test closing the file a second time
     50  aubio_source_close(s);
     51
    4752  del_fvec (vec);
    4853  del_aubio_source (s);
  • tests/src/io/test-source_apple_audio.c

    r3a1a5d6 rb257b60  
    1717    PRINT_MSG(" - read file.wav at original samplerate\n");
    1818    PRINT_MSG("       %s file.wav\n", argv[0]);
    19     PRINT_MSG(" - read file.wav at 32000Hz\n");
     19    PRINT_MSG(" - read file.aif at 32000Hz\n");
    2020    PRINT_MSG("       %s file.aif 32000\n", argv[0]);
    21     PRINT_MSG(" - read file.wav at original samplerate with 4096 blocks\n");
    22     PRINT_MSG("       %s file.wav 0 4096 \n", argv[0]);
     21    PRINT_MSG(" - read file.mp3 at original samplerate with 4096 blocks\n");
     22    PRINT_MSG("       %s file.mp3 0 4096 \n", argv[0]);
    2323    return err;
    2424  }
  • tests/src/spectral/test-fft.c

    r3a1a5d6 rb257b60  
    33int main (void)
    44{
    5   uint_t win_s = 8; // window size
     5  uint_t i, n_iters = 100; // number of iterations
     6  uint_t win_s = 500; // window size
    67  fvec_t * in = new_fvec (win_s); // input buffer
    78  cvec_t * fftgrain = new_cvec (win_s); // fft norm and phase
     
    1920  in->data[6] = 5;
    2021  in->data[7] = 6;
    21   fvec_print(in);
     22  //fvec_print(in);
    2223
    23   // execute stft
    24   aubio_fft_do (fft,in,fftgrain);
    25   cvec_print(fftgrain);
     24  for (i = 0; i < n_iters; i++) {
     25    // execute stft
     26    aubio_fft_do (fft,in,fftgrain);
     27    cvec_print(fftgrain);
    2628
    27   // execute inverse fourier transform
    28   aubio_fft_rdo(fft,fftgrain,out);
     29    // execute inverse fourier transform
     30    aubio_fft_rdo(fft,fftgrain,out);
     31  }
    2932
    3033  // cleam up
    31   fvec_print(out);
     34  //fvec_print(out);
    3235  del_aubio_fft(fft);
    3336  del_fvec(in);
  • tests/wscript_build

    r3a1a5d6 rb257b60  
    33for target_name in ctx.path.ant_glob('src/**/*.c'):
    44    uselib = []
     5    uselib += ['FFTW3', 'FFTW3F']
     6    uselib += ['SAMPLERATE']
     7    uselib += ['SNDFILE']
     8    uselib += ['AVCODEC']
     9    uselib += ['AVFORMAT']
     10    uselib += ['AVRESAMPLE']
     11    uselib += ['AVUTIL']
     12    uselib += ['JACK']
    513    includes = ['../src', '.']
    614    extra_source = []
  • wscript

    r3a1a5d6 rb257b60  
    118118    if target_platform in [ 'ios', 'iosimulator' ]:
    119119        ctx.define('TARGET_OS_IPHONE', 1)
    120         SDKVER="7.1"
    121120        MINSDKVER="6.1"
    122121        ctx.env.CFLAGS += ['-std=c99']
     
    124123            DEVROOT = "/Applications/Xcode.app/Contents"
    125124            DEVROOT += "/Developer/Platforms/iPhoneOS.platform/Developer"
    126             SDKROOT = "%(DEVROOT)s/SDKs/iPhoneOS%(SDKVER)s.sdk" % locals()
    127             #ctx.env.CFLAGS += [ '-arch', 'arm64' ]
     125            SDKROOT = "%(DEVROOT)s/SDKs/iPhoneOS.sdk" % locals()
     126            ctx.env.CFLAGS += [ '-arch', 'arm64' ]
    128127            ctx.env.CFLAGS += [ '-arch', 'armv7' ]
    129128            ctx.env.CFLAGS += [ '-arch', 'armv7s' ]
    130             #ctx.env.LINKFLAGS += [ '-arch', 'arm64' ]
     129            ctx.env.LINKFLAGS += [ '-arch', 'arm64' ]
    131130            ctx.env.LINKFLAGS += ['-arch', 'armv7']
    132131            ctx.env.LINKFLAGS += ['-arch', 'armv7s']
     
    136135            DEVROOT = "/Applications/Xcode.app/Contents"
    137136            DEVROOT += "/Developer/Platforms/iPhoneSimulator.platform/Developer"
    138             SDKROOT = "%(DEVROOT)s/SDKs/iPhoneSimulator%(SDKVER)s.sdk" % locals()
     137            SDKROOT = "%(DEVROOT)s/SDKs/iPhoneSimulator.sdk" % locals()
    139138            ctx.env.CFLAGS += [ '-arch', 'i386' ]
    140139            ctx.env.CFLAGS += [ '-arch', 'x86_64' ]
     
    180179        if (ctx.options.enable_fftw3f != False):
    181180            ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
    182                     args = '--cflags --libs', mandatory = False)
     181                    args = '--cflags --libs',
     182                    mandatory = ctx.options.enable_fftw3f)
    183183            if (ctx.options.enable_double == True):
    184                 ctx.msg('Warning', 'fftw3f enabled, but compiling in double precision!')
     184                ctx.msg('Warning',
     185                        'fftw3f enabled, but compiling in double precision!')
    185186        else:
    186             # fftw3f not enabled, take most sensible one according to enable_double
     187            # fftw3f disabled, take most sensible one according to
     188            # enable_double
    187189            if (ctx.options.enable_double == True):
    188190                ctx.check_cfg(package = 'fftw3', atleast_version = '3.0.0',
    189                         args = '--cflags --libs', mandatory = False)
     191                        args = '--cflags --libs', mandatory =
     192                        ctx.options.enable_fftw3)
    190193            else:
    191194                ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
    192                         args = '--cflags --libs', mandatory = False)
     195                        args = '--cflags --libs',
     196                        mandatory = ctx.options.enable_fftw3)
    193197        ctx.define('HAVE_FFTW3', 1)
    194198
     
    206210    if (ctx.options.enable_sndfile != False):
    207211        ctx.check_cfg(package = 'sndfile', atleast_version = '1.0.4',
    208                 args = '--cflags --libs', mandatory = False)
     212                args = '--cflags --libs',
     213                mandatory = ctx.options.enable_sndfile)
    209214
    210215    # check for libsamplerate
    211216    if (ctx.options.enable_samplerate != False):
    212217        ctx.check_cfg(package = 'samplerate', atleast_version = '0.0.15',
    213                 args = '--cflags --libs', mandatory = False)
     218                args = '--cflags --libs',
     219                mandatory = ctx.options.enable_samplerate)
    214220
    215221    # check for jack
    216222    if (ctx.options.enable_jack != False):
    217223        ctx.check_cfg(package = 'jack',
    218                 args = '--cflags --libs', mandatory = False)
     224                args = '--cflags --libs',
     225                mandatory = ctx.options.enable_jack)
    219226
    220227    # check for libav
    221228    if (ctx.options.enable_avcodec != False):
    222229        ctx.check_cfg(package = 'libavcodec', atleast_version = '54.35.0',
    223                 args = '--cflags --libs', uselib_store = 'AVCODEC', mandatory = False)
     230                args = '--cflags --libs', uselib_store = 'AVCODEC',
     231                mandatory = ctx.options.enable_avcodec)
    224232        ctx.check_cfg(package = 'libavformat', atleast_version = '52.3.0',
    225                 args = '--cflags --libs', uselib_store = 'AVFORMAT', mandatory = False)
     233                args = '--cflags --libs', uselib_store = 'AVFORMAT',
     234                mandatory = ctx.options.enable_avcodec)
    226235        ctx.check_cfg(package = 'libavutil', atleast_version = '52.3.0',
    227                 args = '--cflags --libs', uselib_store = 'AVUTIL', mandatory = False)
     236                args = '--cflags --libs', uselib_store = 'AVUTIL',
     237                mandatory = ctx.options.enable_avcodec)
    228238        ctx.check_cfg(package = 'libavresample', atleast_version = '1.0.1',
    229                 args = '--cflags --libs', uselib_store = 'AVRESAMPLE', mandatory = False)
     239                args = '--cflags --libs', uselib_store = 'AVRESAMPLE',
     240                mandatory = ctx.options.enable_avcodec)
    230241        if all ( 'HAVE_' + i in ctx.env.define_key
    231242                for i in ['AVCODEC', 'AVFORMAT', 'AVUTIL', 'AVRESAMPLE'] ):
     
    323334    ctx.excl += ' **/python.old/*'
    324335    ctx.excl += ' **/python/tests/sounds'
     336    ctx.excl += ' **/**.asc'
Note: See TracChangeset for help on using the changeset viewer.