|
| 1 | +# XCORRSOUND |
| 2 | + |
| 3 | +Compare Sound Waves using Cross Correlation. |
| 4 | + |
| 5 | +### What does XCORRSOUND do? |
| 6 | + |
| 7 | +The xcorrSound package contains several tools. |
| 8 | + |
| 9 | +* overlap-analysis is a tool to find the overlap between two audio files. |
| 10 | +* waveform-compare is a tool that splits two audio files into equal sized blocks and outputs the correlation for each block (a_i,b_i), if a and b was the input. |
| 11 | +* sound-match is a tool to find the location of a small wavefile inside a big wavefile |
| 12 | + |
| 13 | +The tools all make use of cross correlation, which can be computed through the Fourier transform. |
| 14 | + |
| 15 | +Note that all the tools will need write access to a file called <tool>.log where various information about a run will be stored. |
| 16 | + |
| 17 | +### What are the benefits for end user? |
| 18 | +The automisation of manual processes offers a big performance improvement. |
| 19 | + |
| 20 | +* you can find overlaps between audio files automatically |
| 21 | +* you can perform quality assurance of all the files automatically after a mass audio file migration |
| 22 | + |
| 23 | +### Who is intended audience? |
| 24 | +XCORRSOUND is for: |
| 25 | + |
| 26 | +* Institutions who disseminate audio content |
| 27 | +* Institutions that preserve audio collection |
| 28 | + |
| 29 | +## Features and roadmap |
| 30 | +TODO |
| 31 | + |
| 32 | +## How to install and use |
| 33 | + |
| 34 | +### Requirements |
| 35 | + |
| 36 | +To install you need: |
| 37 | + |
| 38 | +* FFTW and |
| 39 | +* Boost |
| 40 | + |
| 41 | +### Download |
| 42 | +TODO |
| 43 | + |
| 44 | +### Install instructions |
| 45 | + |
| 46 | +To install follow these steps: |
| 47 | + |
| 48 | + The tools depend on FFTW3 and Boost program options. These can be found as debian packages. |
| 49 | + And as rpm packages. On Mac OS X the depdencies can be installed using |
| 50 | + Homebrew (http://brew.sh). See install_dependencies.sh |
| 51 | + |
| 52 | + Download the repository, change directory to the repository and run: |
| 53 | + |
| 54 | + mkdir build |
| 55 | + cd build |
| 56 | + cmake .. |
| 57 | + make |
| 58 | + |
| 59 | + You will now find all the tools in build/apps/ |
| 60 | + |
| 61 | +### BUILD DEBIAN PACKAGE |
| 62 | + |
| 63 | + Inside the build directory run: |
| 64 | + |
| 65 | + cpack -G DEB |
| 66 | + |
| 67 | + Now the .deb package file is in the build directory. |
| 68 | + To install |
| 69 | + |
| 70 | + sudo dpkg -i scape-xcorrsound*deb |
| 71 | + |
| 72 | +### Use |
| 73 | + |
| 74 | +Example: overlap-analysis |
| 75 | + |
| 76 | +Syntax: |
| 77 | + |
| 78 | +overlap-analysis <file1.wav> <file2.wav> [v<log level>] |
| 79 | + |
| 80 | +Output example: |
| 81 | + |
| 82 | +The best match was below the threshold of 0.2 |
| 83 | +Best at sample number: 11520000 |
| 84 | +Best at second: 240 |
| 85 | +Value of match was: 0.132016 |
| 86 | + |
| 87 | +In the log various information relating to the wav files can be found, |
| 88 | +such as samplerate, number of channels and so on. |
| 89 | + |
| 90 | +----------------------- wav header start ----------------------- |
| 91 | +ChunkID: RIFF$ËnWAVE |
| 92 | +ChunkSize: 57600036 |
| 93 | +Format: WAVE |
| 94 | +----------------------- wav header end ----------------------- |
| 95 | +----------------------- wav subchunk start ----------------------- |
| 96 | +Subchunk1ID: fmt |
| 97 | +Subchunk1Size: 16 |
| 98 | +AudioFormat: 1 |
| 99 | +NumChannels: 2 |
| 100 | +SampleRate: 48000 |
| 101 | +ByteRate: 192000 |
| 102 | +BlockAlign: 4 |
| 103 | +BitsPerSample: 16 |
| 104 | +Subchunk2ID: data |
| 105 | +Subchunk2Size: 57600000 |
| 106 | +----------------------- wav subchunk end ----------------------- |
| 107 | +----------------------- wav header start ----------------------- |
| 108 | +ChunkID: RIFF$ËnWAVE |
| 109 | +ChunkSize: 57600036 |
| 110 | +Format: WAVE |
| 111 | +----------------------- wav header end ----------------------- |
| 112 | +----------------------- wav subchunk start ----------------------- |
| 113 | +Subchunk1ID: fmt |
| 114 | +Subchunk1Size: 16 |
| 115 | +AudioFormat: 1 |
| 116 | +NumChannels: 2 |
| 117 | +SampleRate: 48000 |
| 118 | +ByteRate: 192000 |
| 119 | +BlockAlign: 4 |
| 120 | +BitsPerSample: 16 |
| 121 | +Subchunk2ID: data |
| 122 | +Subchunk2Size: 57600000 |
| 123 | +----------------------- wav subchunk end ----------------------- |
| 124 | + |
| 125 | +### Troubleshooting |
| 126 | +TODO |
| 127 | + |
| 128 | +## More information |
| 129 | + |
| 130 | +### Publications |
| 131 | +TODO |
| 132 | +* Bolette Ammitzbøll Jurik and Jesper Sindahl Nielsen: |
| 133 | + Audio Quality Assurance: An Application of Cross Correlation. |
| 134 | + In: iPRES 2012 – Proceedings of the 9th International Conference on Preservation of Digital Objects. Toronto 2012, 144-149. |
| 135 | + ISBN 978-0-9917997-0-1 (http://www.scape-project.eu/publication/audio-quality-assurance) |
| 136 | + |
| 137 | +### Licence |
| 138 | + |
| 139 | +XCORRSOUND is copyright 2012 State and University Library, Denmark <abr@statsbiblioteket.dk> |
| 140 | +released under [/usr/share/common-licenses/GPL-2] |
| 141 | + |
| 142 | +### Acknowledgements |
| 143 | + |
| 144 | +Part of this work was supported by the European Union in the 7th Framework Program, IST, through the SCAPE project, Contract 270137. |
| 145 | + |
| 146 | +### Support |
| 147 | +TODO |
| 148 | + |
| 149 | +## Develop |
| 150 | + |
| 151 | +* https://travis-ci.org/openplanets/scape-xcorrsound |
| 152 | + |
| 153 | +### Requirements |
| 154 | + |
| 155 | +To build you require: |
| 156 | + |
| 157 | +* C++ |
| 158 | +* cmake? |
| 159 | + |
| 160 | +For using the recommended IDE you require: |
| 161 | + |
| 162 | +* Eclipse??? |
| 163 | + |
| 164 | +### Setup IDE |
| 165 | +TODO |
| 166 | + |
| 167 | +### Build |
| 168 | +TODO move from above |
| 169 | + |
| 170 | +### Deploy |
| 171 | + |
| 172 | +To deploy do ... |
| 173 | + |
| 174 | +### Contribute |
| 175 | + |
| 176 | +1. [Fork the GitHub project](https://help.github.com/articles/fork-a-repo) |
| 177 | +2. Change the code and push into the forked project |
| 178 | +3. [Submit a pull request](https://help.github.com/articles/using-pull-requests) |
| 179 | + |
| 180 | +To increase the changes of you code being accepted and merged into the official source here's a checklist of things to go over before submitting a contribution. For example: |
| 181 | + |
| 182 | +* Has unit tests (that covers at least 80% of the code) |
| 183 | +* Has documentation (at least 80% of public API) |
| 184 | +* Agrees to contributor license agreement, certifying that any contributed code is original work and that the copyright is turned over to the project |
0 commit comments