From 02d227ad29770dca328b6ab1a440f3a99bcce0f9 Mon Sep 17 00:00:00 2001 From: Craig Stuart Sapp Date: Tue, 11 Mar 2014 22:09:43 -0700 Subject: [PATCH 1/3] Updated README.md Fixed typo. Also the ALSA libraries and libasound2 and libasound2-dev are not need for standard Humdrum Toolkit, just for humextra program humplay (lines 19-23). --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 118533f..8fe5e56 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This repository contains the "classical" humdrum toolkit. Craig Sapp's humextra tools are now available on his [own github repository](https://github.com/craigsapp/humextra). There are no binaries, I'll have to compile the code. -## Downloadig Humdrum +## Downloading Humdrum To download the humdrum distribution go to the following page on the github repository: From 872f5acdca3aaba50772026e036d8cea83a769d7 Mon Sep 17 00:00:00 2001 From: Craig Stuart Sapp Date: Tue, 11 Mar 2014 22:12:02 -0700 Subject: [PATCH 2/3] Updated degree.awk Allow the degree command to handle modal key designations (similar fix as in deg.awk). Example test: humcat h://370chorales/chor034.krn | degree -x --- toolkit/awk/degree.awk | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/toolkit/awk/degree.awk b/toolkit/awk/degree.awk index fbd3804..bcdeacd 100755 --- a/toolkit/awk/degree.awk +++ b/toolkit/awk/degree.awk @@ -80,11 +80,14 @@ BEGIN { cont_tie_reg = "\\]|_" indicators = "^(\\*\\+|\\*\\-|\\*\\^|\\*v|\\*x)$" input_interps = "^(\\*\\*pitch|\\*\\*Tonh|\\*\\*solfg|\\*\\*kern)$" - key_reg = "^\\*(([ABCDEFGabcdefg](#?|-?))|(\\?)|(X)|(Cx)|(cx)|(Dx)):$" - pc_key_sig = "^\\*k\\[([abcdefg]((n)|(#)|(x+(#?))|(-)+))*\\]$" - ph_key_sig = "^\\*K\\[([ABCDEFG][1-9]((n)|(#)|(x+(#?))|(-)+))*\\]$" + # $ removed from following regex by Craig Sapp 20140311 so that + # model key designations (such as *G:mix) can be handled gracefully. + #key_reg = "^\\*(([A-Ga-g](#?|-?))|(\\?)|(X)|(Cx)|(cx)|(Dx)):$" + key_reg = "^\\*(([A-Ga-g](#?|-?))|(\\?)|(X)|(Cx)|(cx)|(Dx)):" + pc_key_sig = "^\\*k\\[([a-g]((n)|(#)|(x+(#?))|(-)+))*\\]$" + ph_key_sig = "^\\*K\\[([A-G][1-9]((n)|(#)|(x+(#?))|(-)+))*\\]$" kern_pitch = "a+|b+|c+|d+|e+|f+|g+|A+|B+|C+|D+|E+|F+|G+" - pitch_pitch = "[ABCDEFG]" + pitch_pitch = "[A-G]" solfg_pitch = "do|re|mi|fa|sol|la|si" octave_class = "[0-9]" # @@ -377,7 +380,10 @@ function store_new_interps( j,interp_line) current_interp[j] = $j current_key[j] = "" } - else if ($j ~ key_reg) current_key[j] = $j + else if ($j ~ key_reg) { + current_key[j] = $j + sub(/:.../, ":", current_key[j]) + } else if ($j ~ /^\*[kK]\[/) { if ($j !~ pc_key_sig && $j !~ ph_key_sig) @@ -967,7 +973,7 @@ function process_kern(data_token,position, return_token,arrayd,j,split_num,\ if (match(arrayd[j],kern_pitch)) { current_note[2] = substr(arrayd[j],RSTART,1) - if (current_note[2] ~ /[abcdefg]/) + if (current_note[2] ~ /[a-g]/) { current_note[2] = to_upper(current_note[2]) current_note[1] = 3 + RLENGTH From 256daf0e0b8c5bef485cf2de3094f3dcbc3708c4 Mon Sep 17 00:00:00 2001 From: Craig Stuart Sapp Date: Tue, 11 Mar 2014 22:14:06 -0700 Subject: [PATCH 3/3] Update degree.awk Fixed typo. --- toolkit/awk/degree.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/awk/degree.awk b/toolkit/awk/degree.awk index bcdeacd..5724e3d 100755 --- a/toolkit/awk/degree.awk +++ b/toolkit/awk/degree.awk @@ -81,7 +81,7 @@ BEGIN { indicators = "^(\\*\\+|\\*\\-|\\*\\^|\\*v|\\*x)$" input_interps = "^(\\*\\*pitch|\\*\\*Tonh|\\*\\*solfg|\\*\\*kern)$" # $ removed from following regex by Craig Sapp 20140311 so that - # model key designations (such as *G:mix) can be handled gracefully. + # modal key designations (such as *G:mix) can be handled gracefully. #key_reg = "^\\*(([A-Ga-g](#?|-?))|(\\?)|(X)|(Cx)|(cx)|(Dx)):$" key_reg = "^\\*(([A-Ga-g](#?|-?))|(\\?)|(X)|(Cx)|(cx)|(Dx)):" pc_key_sig = "^\\*k\\[([a-g]((n)|(#)|(x+(#?))|(-)+))*\\]$"