===== Tutorial: Corpus studies with the Sonic Annotator ===== The [[https://www.vamp-plugins.org/sonic-annotator/|Sonic Annotator]] can be used to conveniently evaluate several (hundreds!) of audio files with Vamp plugins in one swoop. The program runs without installation. The operation is done via a command window (power shell), where commands have to be typed. ==== Operation of the program ==== 1. download Sonic-Annotator (https://code.soundsoftware.ac.uk/projects/sonic-annotator/files) and unpack it, e.g. to C:\Programme\sonic-annotator-1.6-win32 2. open //Power-Shell// (Windows: right-click in start menu to see //Power Shell// in program menu) or terminal window (Mac) and change to the corresponding directory (with the //cd// command; //c//hange //d//irectory): cd C:\Programs\sonic-annotator-1.6-win32 (Just type the command after the '... >' ) {{:vamp_plugins.png?400|}} All vamp plugins available on your computer in the //Vamp Plugin// folder are displayed with the following command: .\sonic-annotator --list (.\ is necessary if access rights to sonic-annotator are denied). A description of each vamp plugin is displayed by the following command, e.g., the Queen Mary tempo tracker: .\sonic-annotator -s vamp:qm-vamp-plugins:qm-tempotracker:tempo The default settings of the respective vamp plugin are listed, too. Unfortunately, changes to these default settings can only be made when using the RDF/Turtle format. Information on this can be found [[https://code.soundsoftware.ac.uk/projects/sonic-annotator/wiki|here]]. Two notes on dealing with power shell / command windows: * The cursor key //cursor up// repeats the last command(s)! * Use the possibilities of //cut & paste// to copy commands or parts of them (from this wiki, path names etc.). 3. the following command works to query the tempotracker plugin for an audio file 'Audio01.mp3': .\sonic-annotator -d vamp:qm-vamp-plugins:qm-tempotracker:tempo Audio01.mp3 -w csv The results are automatically written to a .csv file ('-w csv') named after the audio file and the vamp plugin. \\ The - -csv-separator ";" option separates the results with a semicolon so that they are displayed in cells in spreadsheet software (like //Excel//). .\sonic-annotator -d vamp:qm-vamp-plugins:qm-tempotracker:tempo Audio01.mp3 -w csv --csv-separator ";" 4. multiple (recursive) queries: put all audio files you want to evaluate into one folder, e.g. //c:/sound//. Then enter the following command: .\sonic-annotator -d vamp:qm-vamp-plugins:qm-tempotracker:tempo -r c:/sound -w csv (Important is the '-r' after the vamp plugin name, for 'recursive'). To write all results to a single file with the filename 'results.csv', use the following command suffix: - -csv-one-file "results.csv" suffix. Here is an example of an overall command to determine the tempo of a set of audio files located in the //c:/sound// folder. .\sonic-annotator -d vamp:qm-vamp-plugins:qm-tempotracker:tempo -r c:/sound -w csv --csv-one-file "results.csv" --csv-separator ";" ==== Tasks ==== Load the tracks of a CD or a playlist into a folder and compare * the (local) tempo of each track * the harmony of each piece * the tuning (deviation from 440 Hz) of the pieces