Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Census -k incorrectly counts non-kern spines as notes #1

Open
craigsapp opened this issue Jul 14, 2014 · 0 comments
Open

Census -k incorrectly counts non-kern spines as notes #1

craigsapp opened this issue Jul 14, 2014 · 0 comments

Comments

@craigsapp
Copy link
Member

craigsapp commented Jul 14, 2014

The "census -k" command incorrectly counts non-kern spines as notes. Consider the following data:

**kern	**dynam
1c	f
*-	*-

census -k on this input gives:

 HUMDRUM DATA

 Number of data tokens:     2
 Number of null tokens:     0
 Number of multiple-stops:  0
 Number of data records:    1
 Number of comments:        0
 Number of interpretations: 2
 Number of records:         3

 KERN DATA

 Number of note-heads:      2
 Number of notes:           2
 Longest note:              1
 Shortest note:             1
 Highest note:              f
 Lowest note:               c
 Number of rests:           0
 Maximum number of voices:  2
 Number of single barlines: 0
 Number of double barlines: 0

Notice that the census -k output says there are two notes when there is only one. Running the command:

 extract -f 1 | census -k

on the input data gives the correct count:

 HUMDRUM DATA

 Number of data tokens:     1
 Number of null tokens:     0
 Number of multiple-stops:  0
 Number of data records:    1
 Number of comments:        0
 Number of interpretations: 2
 Number of records:         3

 KERN DATA

 Number of note-heads:      1
 Number of notes:           1
 Longest note:              1
 Shortest note:             1
 Highest note:              c
 Lowest note:               c
 Number of rests:           0
 Maximum number of voices:  1
 Number of single barlines: 0
 Number of double barlines: 0

The census command should not count data in non-kern spines when the -k option is given. But pre-filtering the data with extract can work around the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant