Difference between revisions of "Humdrum lab 5"

From CCARH Wiki
Jump to navigation Jump to search
Line 84: Line 84:
 
     0.01 3 2
 
     0.01 3 2
 
     0.01 7 4
 
     0.01 7 4
     0 2 8
+
     0 2 8
     0 7 8
+
     0 7 8
     0 9 4
+
     0 9 4
     0 10 8
+
     0 10 8
     0 17 16
+
     0 17 16
     0 1 2
+
     0 1 2
     0 5 8
+
     0 5 8
     0 1 4
+
     0 1 4
     0 4 8
+
     0 4 8
  
 
-C means extract the count of the meter (the top number).
 
-C means extract the count of the meter (the top number).
Line 99: Line 99:
  
 
-a means to append the analysis to the end of the lines (keeping the original input score).
 
-a means to append the analysis to the end of the lines (keeping the original input score).
 
  
 
== Chord labels ==
 
== Chord labels ==

Revision as of 17:34, 1 May 2018

This lab is about the wikifonia data.

Basic information

How many files

   ls *.krn | wc -l
   6710

How many have lyrics:

    grep -l "\*\*text" *.krn | wc -l
    5460

How many have chords:

    grep -l "\*\*text" *.krn | wc -l
    6282

How many have two or more verses:

    grep -l "\*\*text.*\*\*text" *.krn | wc -l
    2006

Duration

What is the duration of all songs if played back-to-back and at the specified tempo without repeats?

   gettime -T *.krn | tail -n 1
   286:50:23.1354 hours

What are the longest songs:

    gettime --simple -T *.krn | sort -k2 -nr | head -n 10
    WF6618.krn:	3120
    WF0181.krn:	3120
    WF0182.krn:	1864
    WF3616.krn:	1420
    WF6336.krn:	1134
    WF5131.krn:	909
    WF6068.krn:	785
    WF5004.krn:	696
    WF3226.krn:	671
    WF1249.krn:	664

The -k2 option means to sort by the second column of data. -n means to sort numerically rather than alphabetically, and -r means to sort by highest first.

What are the shortest songs:

    gettime --simple -T *.krn | sort -k2 -nr | tail -n 10
    WF2814.krn:	16
    WF2806.krn:	16
    WF2795.krn:	16
    WF2785.krn:	16
    WF2856.krn:	14
    WF2852.krn:	12
    WF2799.krn:	12
    WF6338.krn:	8
    WF5609.krn:	8
 The shortest song in VHV:
    cat WF5609.krn | pbcopy
Wf-puff.png


Meter

What sort of meters are in the database and how much of each type?

    beat -Ca *.krn | beat -Ua  | extractx -s '$1-$'  | ridx -H | sortcount -p
    65.89	4	4
    15.44	3	4
    11.67	2	2
    3.24	2	4
    2.78	6	8
    0.52	12	8
    0.16	5	4
    0.14	9	8
    0.09	6	4
    0.06	3	8
    0.01	3	2
    0.01	7	4
    0 	2	8
    0 	7	8
    0 	9	4
    0 	10	8
    0 	17	16
    0 	1	2
    0 	5	8
    0 	1	4
    0 	4	8

-C means extract the count of the meter (the top number).

-U means extract the duration unit from the meter (the bottom number).

-a means to append the analysis to the end of the lines (keeping the original input score).

Chord labels

How many unique chord labels are there?

   extractx -i mxhm  * | ridx -H | sortcount | wc -l
   1399

What are the most common ones:

   extractx -i mxhm  * | ridx -H | sortcount -p | head -n 10
   7.21	C major
   6.14	F major
   4.94	G major
   4.83	G dominant
   4.07	C dominant
   3.55	D dominant
   3.28	B- major
   2.81	E- major
   2.3	D major
   2.25	F dominant