Computational-Cognitive-Musicology-Lab / humdrumR

A toolkit for analyzing data encoded in the humdrum format.
https://computational-cognitive-musicology-lab.github.io/humdrumR/
Other
13 stars 1 forks source link

Smart interpretations #22

Open natsguitar opened 1 year ago

natsguitar commented 1 year ago

We want parseResult to update Exclusive and OTHER tandem interpretation fields, like Key.

I'll make it so certain functions (like pitch functions) have a drop argument, which causes them to return a table with any exclusives that need updating.

parseResult() will work with that...

natsguitar commented 1 year ago

On the other end, We'd like it if the autoArgs insertion would insert the appropriate Exclusive interpretion for a call.

Right now, this doesn't work:

chorales <- readHumdrum(humdrumRroot, 'HumdrumData/BachChorales/chor00[5-7].*.krn')

 chorales <- within(chorales, Recip <- recip(Token))

 within(chorales, Pitch <- pitch(Token))

because Recip is selected, so we get pitch(Token, Exclusive = Pitch.Exclusive) (essentially), when we want Token.Exclusive.