# HG changeset patch # User Matthias Mauch # Date 1436963360 -3600 # Node ID c81a39f25c2dc713be0c98c8c14891c4a1e0b22e # Parent b31cc68e623435dbcd9c2fcf3a691a92c714b6ad towards correcting the window size diff -r b31cc68e6234 -r c81a39f25c2d README --- /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 diff -r b31cc68e6234 -r c81a39f25c2d code/trajectory-plots.R --- 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