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

Chord repetitions should not be counted as transitions. #2

Open
yrammos opened this issue Jun 16, 2022 · 10 comments
Open

Chord repetitions should not be counted as transitions. #2

yrammos opened this issue Jun 16, 2022 · 10 comments

Comments

@yrammos
Copy link
Member

yrammos commented Jun 16, 2022

Currently, transition matrices represent repetitions as transitions. Quite often, the probabilities on the diagonal of the matrix are nonzero. Consecutive annotations of a harmony X are counted as (trivial) transitions X-->X. Naturally, this is especially common with the highest-ranking harmonies.

This seems conceptually questionable to me: a repetition is precisely the opposite of a transition.

Beyond the conceptual question, counting repetitions as transitions may significantly distort the non-trivial transition frequencies X-->Y, where X <> Y.

Thoughts?

@ren-zeng
Copy link

ren-zeng commented Jun 16, 2022

@apmcleod
Copy link

Yannis's code was running on the main branch, which currently (I think) does not split at local key boundaries, which could then lead to repeated chords in rare cases.

The pipeline approach should solve this issue by including a LocalKeyGrouper before the BiGramAnalyzer.

If there are still repeats using the new code, then we should look at the annotations and decide whether to use Zeng's renormalization approach or keep them in.

@yrammos
Copy link
Member Author

yrammos commented Jun 16, 2022

So here are two scenarios in which such repetitions might occur:

  • Across key-areas (for example, I.I --> V.I). I understand these will be prevented in the next release of the library, which uses a key-area splitter.
  • Annotation errors (annotating with the same Roman numeral twice in a row). Would ms3 currently merge such numerals? Should it, perhaps?

It might be worth doing a pandas search in all_subcorpora, searching for consecutive rows that have the same chord value, and see what kinds of cases we get.

@johentsch
Copy link
Member

Hi folks, thanks for bringing up the issue. I used to have a parameter in my grams() function allowing to filter out homogeneous grams. Don't know why the parameter didn't make it but I'll include it and also make it a parameter for the Bigram analyzer, letting the diagonal be 0 by default. Let me know if you have other suggestions.

@apmcleod
Copy link

Parameters to merge chords which differ only by suspension/added tones or inversion might also be useful at some point in the future (I use both of these at times).

@yrammos
Copy link
Member Author

yrammos commented Jun 16, 2022

Parameters to merge chords which differ only by suspension/added tones or inversion might also be useful at some point in the future (I use both of these at times).

I concur with @apmcleod on this last point.

@johentsch
Copy link
Member

Yes. the code for this is ready, just needs to be built in.

@m-rohrmeier
Copy link

Hi guys, I am not sure whether it is a good idea at all to manipulate / temper with the simple core concept of the transition matrix and also change the probabilities in order to avoid repetition.
It is part of the music and if our annotators thought it is worth to notate the same chord symbol again, it may be for a good reason. Also, we need to be careful about segment boundaries here.
First, I would suggest to check with a couple of concrete annotations to assess in which musical contexts these repetitions occur.

@apmcleod
Copy link

But we are creating this library for it to be of use to a wider audience. If someone wants to run a chord transition analysis using it, and wants to ignore repetitions, or if they are interested in a chord vocabulary that is invariant to transposition and suspensions, they should be able to do that simply.

On the other hand, whether either of those options should be the default or not is certainly another question entirely.

@m-rohrmeier
Copy link

Okay. That makes sense.

johentsch added a commit that referenced this issue Nov 7, 2023
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

5 participants