# HG changeset patch # User Chris Cannam # Date 1409750303 -3600 # Node ID 674fb672aa76ecce62e7dc9b26d75981531925f6 # Parent 7031e2e9912f1cfa5a4b31990040cf38d46c9aaf Add multi-F0 provisional entry diff -r 7031e2e9912f -r 674fb672aa76 multiple_f0_estimation/silvet/README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/multiple_f0_estimation/silvet/README.txt Wed Sep 03 14:18:23 2014 +0100 @@ -0,0 +1,37 @@ +# MIREX 2014 submission +# +# Multiple Fundamental Frequency Estimation & Tracking +# Chris Cannam, chris.cannam@eecs.qmul.ac.uk + +This submission uses the Silvet note estimation Vamp plugin running +in Sonic Annotator. + +The plugin only produces note-tracked outputs, so there is no +frame-by-frame estimation included with this submission. + +Two scripts are provided: doNoteTracking.sh runs the plugin in +"unknown instrument" mode (the default for this plugin), while +doNoteTracking-piano.sh runs it in "piano" mode. + +# Architecture + +- Linux 64-bit + +# Dependencies + +- Sonic Annotator v1.0 + http://code.soundsoftware.ac.uk/projects/sonic-annotator/files + +- Typical Unix/GNU shell commands + +# How to run + +In a terminal window run: + +./doNoteTracking.sh /path/to/audiofile.wav /path/to/outputfile.txt + +or + +./doNoteTracking-piano.sh /path/to/audiofile.wav /path/to/outputfile.txt + + diff -r 7031e2e9912f -r 674fb672aa76 multiple_f0_estimation/silvet/doNoteTracking-piano.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/multiple_f0_estimation/silvet/doNoteTracking-piano.sh Wed Sep 03 14:18:23 2014 +0100 @@ -0,0 +1,49 @@ +#!/bin/sh + +mydir=`dirname "$0"` +infile="$1" +outfile="$2" + +if [ t"$infile" = "t" ] || [ t"$outfile" = "t" ]; then + echo "Usage: $0 infile.wav outfile.txt" + exit 2 +fi + +mkdir -p "$mydir"/out || exit 1 + +inbase=`basename "$infile"` +inbase=${inbase%.*} + +echo "Processing input WAV file $infile, writing results to $outfile..." 1>&2 + +# Run the Silvet plugin. +# +# 1. Run the plugin. This will produce an output file +# out/${inbase}.csv + +VAMP_PATH="$mydir" sonic-annotator \ + -t "$mydir"/silvet-piano.ttl \ + -w csv \ + --csv-separator ' ' \ + --csv-one-file "$mydir/out/$inbase.csv" \ + --csv-force \ + "$infile" || exit 1 + +# 2. Check the output file exists + +poutfile="out/${inbase}.csv" +if [ ! -f "$poutfile" ]; then + echo "output file $poutfile not found! bailing out"; exit 1 +fi + +# 3. Convert the format. Sonic Annotator produced +# +# starttime duration freq note label +# +# while we want +# +# starttime endtime freq + +cat "$poutfile" | awk '{ print $1, $1+$2, $3 }' > "$outfile" + +echo "Done, output is in $outfile" diff -r 7031e2e9912f -r 674fb672aa76 multiple_f0_estimation/silvet/doNoteTracking.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/multiple_f0_estimation/silvet/doNoteTracking.sh Wed Sep 03 14:18:23 2014 +0100 @@ -0,0 +1,49 @@ +#!/bin/sh + +mydir=`dirname "$0"` +infile="$1" +outfile="$2" + +if [ t"$infile" = "t" ] || [ t"$outfile" = "t" ]; then + echo "Usage: $0 infile.wav outfile.txt" + exit 2 +fi + +mkdir -p "$mydir"/out || exit 1 + +inbase=`basename "$infile"` +inbase=${inbase%.*} + +echo "Processing input WAV file $infile, writing results to $outfile..." 1>&2 + +# Run the Silvet plugin. +# +# 1. Run the plugin. This will produce an output file +# out/${inbase}.csv + +VAMP_PATH="$mydir" sonic-annotator \ + -t "$mydir"/silvet.ttl \ + -w csv \ + --csv-separator ' ' \ + --csv-one-file "$mydir/out/$inbase.csv" \ + --csv-force \ + "$infile" || exit 1 + +# 2. Check the output file exists + +poutfile="out/${inbase}.csv" +if [ ! -f "$poutfile" ]; then + echo "output file $poutfile not found! bailing out"; exit 1 +fi + +# 3. Convert the format. Sonic Annotator produced +# +# starttime duration freq note label +# +# while we want +# +# starttime endtime freq + +cat "$poutfile" | awk '{ print $1, $1+$2, $3 }' > "$outfile" + +echo "Done, output is in $outfile" diff -r 7031e2e9912f -r 674fb672aa76 multiple_f0_estimation/silvet/silvet-piano.ttl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/multiple_f0_estimation/silvet/silvet-piano.ttl Wed Sep 03 14:18:23 2014 +0100 @@ -0,0 +1,21 @@ +@prefix xsd: . +@prefix vamp: . +@prefix : <#> . + +:transform a vamp:Transform ; + vamp:plugin ; + vamp:step_size "1024"^^xsd:int ; + vamp:block_size "1024"^^xsd:int ; + vamp:parameter_binding [ + vamp:parameter [ vamp:identifier "finetune" ] ; + vamp:value "0"^^xsd:float ; + ] ; + vamp:parameter_binding [ + vamp:parameter [ vamp:identifier "instrument" ] ; + vamp:value "1"^^xsd:float ; + ] ; + vamp:parameter_binding [ + vamp:parameter [ vamp:identifier "mode" ] ; + vamp:value "1"^^xsd:float ; + ] ; + . diff -r 7031e2e9912f -r 674fb672aa76 multiple_f0_estimation/silvet/silvet.cat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/multiple_f0_estimation/silvet/silvet.cat Wed Sep 03 14:18:23 2014 +0100 @@ -0,0 +1,1 @@ +vamp:silvet:silvet::Notes diff -r 7031e2e9912f -r 674fb672aa76 multiple_f0_estimation/silvet/silvet.n3 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/multiple_f0_estimation/silvet/silvet.n3 Wed Sep 03 14:18:23 2014 +0100 @@ -0,0 +1,115 @@ +@prefix rdfs: . +@prefix xsd: . +@prefix vamp: . +@prefix plugbase: . +@prefix owl: . +@prefix dc: . +@prefix af: . +@prefix foaf: . +@prefix doap: . +@prefix cc: . +@prefix : <#> . + + +## Properties of this document + +<> a vamp:PluginDescription ; + foaf:maker ; + foaf:primaryTopic . + + +## Maker of the whole plugin library + +:library_maker + foaf:name "Queen Mary, University of London" ; + foaf:logo ; + foaf:page + . + + +## Properties of the plugin library, and references to the plugins it contains + +plugbase:library a vamp:PluginLibrary ; + vamp:identifier "silvet" ; + foaf:maker :library_maker ; + vamp:available_plugin plugbase:silvet ; + dc:title "Silvet Note Transcription" ; # Place library name here and uncomment + dc:description """Silvet, or Shift-Invariant Latent Variable Transcription, is a Vamp plugin for polyphonic music transcription (from audio to note times and pitches).""" ; + foaf:page ; + doap:download-page ; + . + + +## Properties of the Silvet Note Transcription plugin + +plugbase:silvet a vamp:Plugin ; + dc:title "Silvet Note Transcription" ; + vamp:name "Silvet Note Transcription" ; + dc:description """Estimate the note onsets, pitches, and durations that make up a music recording.""" ; + foaf:maker :library_maker ; + dc:rights """Method by Emmanouil Benetos and Simon Dixon; plugin by Chris Cannam and Emmanouil Benetos. GPL licence.""" ; +# cc:license ; + vamp:identifier "silvet" ; + vamp:vamp_API_version vamp:api_version_2 ; + owl:versionInfo "1" ; + vamp:input_domain vamp:TimeDomain ; + vamp:parameter plugbase:silvet_param_mode ; + vamp:parameter plugbase:silvet_param_instrument ; + vamp:parameter plugbase:silvet_param_finetune ; + + vamp:output plugbase:silvet_output_notes ; + vamp:output plugbase:silvet_output_timefreq ; + . +plugbase:silvet_param_mode a vamp:QuantizedParameter ; + vamp:identifier "mode" ; + dc:title "Processing mode" ; + dc:format "" ; + vamp:min_value 0 ; + vamp:max_value 1 ; + vamp:unit "" ; + vamp:quantize_step 1 ; + vamp:default_value 1 ; + vamp:value_names ( "Draft (faster)" "Intensive (higher quality)"); + . +plugbase:silvet_param_instrument a vamp:QuantizedParameter ; + vamp:identifier "instrument" ; + dc:title "Instrument" ; + dc:format "" ; + vamp:min_value 0 ; + vamp:max_value 12 ; + vamp:unit "" ; + vamp:quantize_step 1 ; + vamp:default_value 0 ; + vamp:value_names ( "Multiple or unknown instruments" "Piano" "Guitar" "Violin" "Viola" "Cello" "Horn" "Flute" "Oboe" "Clarinet" "Tenor Sax" "Bassoon" "String quartet" "Wind ensemble"); + . +plugbase:silvet_param_finetune a vamp:QuantizedParameter ; + vamp:identifier "finetune" ; + dc:title "Return fine pitch estimates" ; + dc:format "" ; + vamp:min_value 0 ; + vamp:max_value 1 ; + vamp:unit "" ; + vamp:quantize_step 1 ; + vamp:default_value 0 ; + vamp:value_names (); + . +plugbase:silvet_output_notes a vamp:SparseOutput ; + vamp:identifier "notes" ; + dc:title "Note transcription" ; + dc:description """Overall note transcription across selected instruments""" ; + vamp:fixed_bin_count "true" ; + vamp:unit "Hz" ; + vamp:bin_count 2 ; + vamp:bin_names ( "Frequency" "Velocity"); + vamp:sample_type vamp:VariableSampleRate ; + vamp:computes_event_type af:Note ; + . +plugbase:silvet_output_timefreq a vamp:DenseOutput ; + vamp:identifier "timefreq" ; + dc:title "Time-frequency distribution" ; + dc:description """Filtered constant-Q time-frequency distribution used as input to the expectation-maximisation algorithm""" ; + vamp:fixed_bin_count "true" ; + vamp:unit "" ; + vamp:computes_signal_type af:Spectrogram ; + . + diff -r 7031e2e9912f -r 674fb672aa76 multiple_f0_estimation/silvet/silvet.so Binary file multiple_f0_estimation/silvet/silvet.so has changed diff -r 7031e2e9912f -r 674fb672aa76 multiple_f0_estimation/silvet/silvet.ttl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/multiple_f0_estimation/silvet/silvet.ttl Wed Sep 03 14:18:23 2014 +0100 @@ -0,0 +1,21 @@ +@prefix xsd: . +@prefix vamp: . +@prefix : <#> . + +:transform a vamp:Transform ; + vamp:plugin ; + vamp:step_size "1024"^^xsd:int ; + vamp:block_size "1024"^^xsd:int ; + vamp:parameter_binding [ + vamp:parameter [ vamp:identifier "finetune" ] ; + vamp:value "0"^^xsd:float ; + ] ; + vamp:parameter_binding [ + vamp:parameter [ vamp:identifier "instrument" ] ; + vamp:value "0"^^xsd:float ; + ] ; + vamp:parameter_binding [ + vamp:parameter [ vamp:identifier "mode" ] ; + vamp:value "1"^^xsd:float ; + ] ; + .