GithubHelp home page GithubHelp logo

Comments (6)

ArTiSTiX avatar ArTiSTiX commented on June 9, 2024 1

@gotthehot yes this is a bug in midi-jar, i inverted a condition without notice. I'll be working on it to patch 1.5.0 with other changes you mentionned.

Note that i changed the tonal dictionary and the dectection code to allow omission, and midi-jar is my way to test it before submitting change to tonal.

from midi-jar.

ArTiSTiX avatar ArTiSTiX commented on June 9, 2024 1

Oops, sorry @gotthehot I unintentionally closed this ticket.

The v1.5.1 update should fix the issue of inverted chords with omissions being displayed before chords without omissions.

Note that chords with only omissions will still be displayed before inversions.

If you find any issue with it, you can create a new ticket, and if you find new strange behaviour (or mistakes) i would be happy to fix it too :)

from midi-jar.

ArTiSTiX avatar ArTiSTiX commented on June 9, 2024

@gotthehot Thanks for the suggestion.

In the current state, MIDI Jar (which uses https://github.com/tonaljs/tonal for all the music stuff) sorts chords this way:

  • Exact match with same root note (score 1)
  • Chord with omission (score 0.75) - if enabled
  • Chord inversion (score 0.5)
  • Chord inversion with omission (score 0.375) - if enabled

The number of omissions is not taken into account. In case of equality, the chords follow the order in dictionary.

Maybe inverting priority between omission and inversion could solve the issue (or adding a settings to choose to), like 0.5 coefficient for omission, and 0.75 for inversion could do it, but it could also make some chords be recognized as inversions where as they're not.

I could also add another variable to sort chords, but this is empirical: for the chord quiz module, i created a "complexity" score, which scores higher depending on the intervals (https://github.com/la-jarre-a-son/midi-jar/blob/main/src/renderer/hooks/useQuiz/utils.ts#L57-L83).
If inverting the omission/inversion score is not sufficient, this could be a way to sort this out.

I'm gonna add this setting along with the other ticket in a few day so that you can test it.

NOTE: on my end, E-A-C correctly results in a Am/E (but as the second detected alternative if omissions are allowed).

from midi-jar.

gotthehot avatar gotthehot commented on June 9, 2024

NOTE: on my end, E-A-C correctly results in a Am/E (but as the second detected alternative if omissions are allowed).

Sorry, that's my fault. Occasionally turned "display alternative chords" off while experimenting with detection.

On topic. In case of E-A-C both Am and C6 are inversions, so C6 selected as primary due to omission. Hmmm... For me it's lack of logic. In my opinion it's strange to see relatively rare C6 while playing simple Am. Imagine face of beginner learning triad inversions :) So I vote for triad inversion to be of highest priority when selecting variants. Configurable - may be, but default - at least.

from midi-jar.

ArTiSTiX avatar ArTiSTiX commented on June 9, 2024

Oh I missed that you are right, on E-A-C, C6/E is both inversion with omission, so that should clearly be scored less than Am/E which is only inversion. Definitely a bug there.

from midi-jar.

gotthehot avatar gotthehot commented on June 9, 2024

Author of tonal just answered my report: tonal always returns inversions after main chord, so the matter is priority in midi-jar, not tonal.

from midi-jar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.