changeset 56:674fb672aa76

Add multi-F0 provisional entry
author Chris Cannam
date Wed, 03 Sep 2014 14:18:23 +0100
parents 7031e2e9912f
children e4d2a92fbcf4
files multiple_f0_estimation/silvet/README.txt multiple_f0_estimation/silvet/doNoteTracking-piano.sh multiple_f0_estimation/silvet/doNoteTracking.sh multiple_f0_estimation/silvet/silvet-piano.ttl multiple_f0_estimation/silvet/silvet.cat multiple_f0_estimation/silvet/silvet.n3 multiple_f0_estimation/silvet/silvet.so multiple_f0_estimation/silvet/silvet.ttl
diffstat 8 files changed, 293 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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
+
+
--- /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"
--- /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"
--- /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:      <http://www.w3.org/2001/XMLSchema#> .
+@prefix vamp:     <http://purl.org/ontology/vamp/> .
+@prefix :         <#> .
+
+:transform a vamp:Transform ;
+    vamp:plugin <http://vamp-plugins.org/rdf/plugins/silvet#silvet> ;
+    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 ;
+    ] ;
+    .
--- /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
--- /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:     <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd:      <http://www.w3.org/2001/XMLSchema#> .
+@prefix vamp:     <http://purl.org/ontology/vamp/> .
+@prefix plugbase: <http://vamp-plugins.org/rdf/plugins/silvet#> .
+@prefix owl:      <http://www.w3.org/2002/07/owl#> .
+@prefix dc:       <http://purl.org/dc/elements/1.1/> .
+@prefix af:       <http://purl.org/ontology/af/> .
+@prefix foaf:     <http://xmlns.com/foaf/0.1/> .
+@prefix doap:     <http://usefulinc.com/ns/doap#> .
+@prefix cc:       <http://web.resource.org/cc/> .
+@prefix :         <#> .
+
+
+## Properties of this document
+
+<> a vamp:PluginDescription ;
+    foaf:maker          <http://vamp-plugins.org/rdf/template-generator> ;
+    foaf:primaryTopic   <http://vamp-plugins.org/rdf/plugins/silvet> .
+
+
+## Maker of the whole plugin library
+
+:library_maker
+    foaf:name "Queen Mary, University of London" ;
+    foaf:logo <http://vamp-plugins.org/rdf/plugins/makers/qm.png> ;
+    foaf:page <http://c4dm.eecs.qmul.ac.uk/>
+    .
+
+
+## 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              <http://code.soundsoftware.ac.uk/projects/silvet> ;
+    doap:download-page     <http://code.soundsoftware.ac.uk/projects/silvet/files> ;
+    .
+
+
+## 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            <Place plugin license URI here and uncomment> ; 
+    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 ;
+    .
+
Binary file multiple_f0_estimation/silvet/silvet.so has changed
--- /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:      <http://www.w3.org/2001/XMLSchema#> .
+@prefix vamp:     <http://purl.org/ontology/vamp/> .
+@prefix :         <#> .
+
+:transform a vamp:Transform ;
+    vamp:plugin <http://vamp-plugins.org/rdf/plugins/silvet#silvet> ;
+    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 ;
+    ] ;
+    .