changeset 1:c81a39f25c2d camera-ready

towards correcting the window size
author Matthias Mauch <mail@matthiasmauch.net>
date Wed, 15 Jul 2015 13:29:20 +0100
parents b31cc68e6234
children 5f1cccdd8260
files README code/trajectory-plots.R images/DUMMY
diffstat 2 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README	Wed Jul 15 13:29:20 2015 +0100
@@ -0,0 +1,14 @@
+Welcome.
+
+This is code and data to reproduce the figures and analyses of the paper
+Dai, Mauch, Dixon: "Analysis of Intonation Trajectories in Solo Singing"
+
+The code is written in the programming language R, which can be obtained
+from http://www.r-project.org/.
+
+The easiest way to start is by
+1. starting R
+2. in R, going to the "code" directory in this repository
+3. run "load-and-merge.R", for example by typing
+   source("load-and-merge.R")
+4. the other files implement the outcomes of the paper
--- a/code/trajectory-plots.R	Wed Jul 15 12:06:53 2015 +0100
+++ b/code/trajectory-plots.R	Wed Jul 15 13:29:20 2015 +0100
@@ -9,7 +9,7 @@
 {
   for (p in piece.plot)
   {
-    pdf(sprintf("~/code/tsom-intonation/images/trajectory_%02d-%02d.pdf", s, p),
+    pdf(sprintf("../images/trajectory_%02d-%02d.pdf", s, p),
         width = 4, height = 3)
     par(mar = c(4,4,1,1))
     subs <- subset(tsom, subset = tsom$SingerNo == s &  tsom$Piece == p)
@@ -20,8 +20,8 @@
     abline(v=nrow(subs)/3*(1:2)+0.5, col=rgb(0,0,0,0.5), lty=2)
     lines(Triangle7+PitchError ~ NoteNo, data = subs,
           col = "black", lwd = 3)
-    text(.04,3.5, sprintf("MAPE: %0.03f", mean(abs(subs$Triangle7))), pos=4)
-    text(.04,2.8, sprintf("TRD: %0.03f", sd(abs(subs$Rectangle7+subs$PitchError))), pos=4)
+    text(.04,3.5, sprintf("MAPE: %0.03f", mean(abs(subs$Triangle5))), pos=4)
+    text(.04,2.8, sprintf("TRD: %0.03f", sd(abs(subs$Triangle5+subs$PitchError))), pos=4)
     dev.off()
   }
 }
\ No newline at end of file