tonal
tonal copied to clipboard
Confusing results from Detect.chord
Calling chord detection returns the '64' form for major chords which I found confusing as I had no idea what it meant.
Detect.chord([ '1P', '3M', '5P' ])
=> detected C64,Em#5
Yes, agree. This is not a good expected result. Scale names and detection needs a good rework (see #56)
(by the way: https://medium.com/@michaelkaulkin/name-that-chord-the-confusing-world-of-the-cadential-6-4-df58dd6a86cc)
Thanks for reporting!
How do you install Detect please?
I've tried npm install tonal
then
const _tonal = require('tonal');
tonal.Detect.chord(['A','C','Eb'];
but Detect isn't part of tonal.
Then I tried npm install tonal-detect
, as documented here: https://danigb.github.io/tonal/api/module-Detect.html, but tonal-detect isn't in npm.
Help :(
Yes, I don't know why it's called tonal-detector. I have to change the name or update the docs.
Anyway, as this issue suggest, chord and scale detection are not working very smoothly.
How is one supposed to use code from the extensions in the browser? Excuse me if it's trivial, i'm very novice with JS. Specifically I'm trying to use Tonal.Detect.chord().
In index.html I use
and I can call this just fine: Tonal.Chord.notes("C", "M");
however this is unable to find the chord function : Tonal.Detect.chord(["C", "E", "G"]);
and I think it's because Detect isn't in the minified distribution. trying to use the import function seems to be an endless pit of issues but I don't think I'm supposed to be using that in the browser.