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

Update JSdoc #468

Closed
no-chris opened this issue Oct 25, 2021 · 5 comments · Fixed by #499
Closed

Update JSdoc #468

no-chris opened this issue Oct 25, 2021 · 5 comments · Fixed by #499
Labels
bug Something isn't working
Projects

Comments

@no-chris
Copy link
Owner

* @returns {Chord|Null} A chord object if the given string is successfully parsed. Null otherwise.

Does not return null anymore

@no-chris no-chris added the bug Something isn't working label Oct 25, 2021
@Kernix13
Copy link

Pretty cool but some of the chords and notes for them seem off. I've never seen a major triad with an 'add b9'. Also, your Dm-maj7 has the 7th notated as Db instead of C#. I created a monster Excel spreadsheet years ago that took all that stuff into account. I wrote a lot of articles on the chord names from the most common scales. If you are interested, I can send you a link to some of the ones dealing with the chord names from those scales.

@no-chris
Copy link
Owner Author

Hello!

Thanks for checking this out 🙌🏻

Please do send me the links, there is no chord-to-scale mapping at all for now, the note detection algorithm is weak at best.

@Kernix13
Copy link

Here is a link to a blog post on every chord from the major scale, C major for this one:
https://everyguitarchord.com/c-major-scale-chords-every-diatonic-chord/

I realized I never wrote a post on a list of all possible chord names (IMO). I gave up on that site as I'm trying to learn JS and create a 2nd portfolio project with the hopes of getting a job soon. I have other posts showing the chords for the other scales I use.

I built all the possible chord for each scale degree for the major scale, harmonic & melodic minor scales, whole tone scale, augmented scale, and diminished scale. They are the most commonly used so I drew a line in the sand with those.

I have a spreadsheet that pulls in the "correct" notes for any key. And by correct, I mean I change notes like the F## in an E7#9 chord to G. My chord list of names is this:

Maj, 6, add9, add#11, 6 add9, 6 add9 N5, add9/11, add9/#11, 6 add9/11, 6 add9/#11, 6 add#9/#11 | Maj7, Maj7 N5, Maj9, Maj9 N5, Maj13, Maj13 NR, Maj9/13 N5, Maj9/13, Maj7#11, Maj9#11, Maj13#11, Maj13#11 NR | 7, 7 N5, 9, 9 N5, 11, 11 NR, 11 N5, 13, 13 NR, 13 N3, 13 N5, 9/11, 9/11 N5, 9/13, 9/13 N5, 11/13, 11/13 NR, 11/13 N5 | 7b9. 7b9 N5. 7b9#11. 7b9b13. 7b9b13 NR. 7b9b13 N3. 11b9. 11b9 NR. 11b9 N5. 13b9. 13b9 N5. 13b9 NR, N5. 7b13, 7#9, 7#9 NR, 7#9 N5, 7b9/#9, 7#9#11, 7#9#11 NR, 7#9b13, 7#9b13 NR, 13#9, 13#9 NR, 13#9 N5, 13#9 NR, N5, 7#11, 9#11, 9#11 NR, 9#11 N3, 13#11, 13#11 NR, 13#11 N3 | m, m6, m add9, m6 add9, m6 add9 NR | m7, m9, m9 N5, m11, mi13, mi13 N5 | m-maj7, m-maj7 N5, m9-maj7 | sus, sus2, 6 sus, sus add9, 6 sus add9 | 7 sus, 7sus b9, 9 sus, 13 sus, 13sus b9 | maj7 sus, maj13 sus | dim, dim7, m7b5, m9b5, m11b5 | m-maj7b5 | + | 7#5, 7#5b9, 7#5b9 N3, 9#5, 7#5#9, 7#5#9 NR, 7#5b9/#9 | Maj7#5 | 7b5, 7b5b9, 7b5b9 N3, 7b5#9, 7b5#9 NR, 7b5b9/#9, 7b5b13, 7b5b13 NR, 9b5, 9b5b13, 13b5, 13b5 NR, 13b5 N3, 13b5b9, 13b5b9 N3, 13b5#9, 13b5#9 NR | Maj7b5

That is my list and my naming conventions. I'm sure people with degrees in music will have a slightly different list with different naming conventions.

Back to my main tab of my spreadsheet. I have all those chord names without a chromatic note name. But the next ccolumn concats the chord name with whatever chromatic note you enter. To return all the notes in the chord, I do a vlookup to another tab. That is the one that takes into account enharmonic equivalents: #9 vs b3, #11 vs b5, and #5 vs b6/b13. Here is an example of that source tab using the note A:
Key R b9 9 #9 b3 3 P4 #11 b5 5 #5 b13 6 b7 M7
A A Bb B C C C# D D# Eb E F F F# G G#

I have a Chord checker tab where you enter in the notes of a chord and it returns each chord that has those notes. For example, if you enter the notes for A minor 7(ACEG), it will return C6, Am7, and all other chords that have those notes like C6 add9, Am11, etc. I have the max # of nested if statements (7) to do that. I repeat that for my scale checker tab but it's a little tricky for the few 8 notes scales (diminished and Bebop). Here is an example of my if staements: =IF(F4=$P$2,1,IF(F4=$Q$2,1,IF(F4=$R$2,1,IF(F4=$S$2,1,IF(F4=$T$2,1,IF(F4=$U$2,1,0))))))

I assume you could do the same with Switch statements. The biggest problem you would have is what I imagined when I built my guitar site. How would a user know to enter C# instaed of Db for an A major chord when they don't know it is an A major chord. And what if there were other accidental notes in the chord? And then there are chords that have both a flat and a sharp in them like A7b9 with a C# and a Bb. I think you might need an array for all possible note combinations, but then that is for the advanced features you are looking for.

@no-chris
Copy link
Owner Author

Wow, you really gave it a lot of thought and did an amazing job there! Your website has amazing content 👏🏻

Hope it all goes well with the Javascript and that you can land a job soon 🤞🏻

I need to give a thought on how to include your ideas in this package. For now I have to admit it is a bit on hold as this lib serves the purpose (and much more) intended for it in the beginning, which was to support my other project, a new syntax to write Chord Sheets (https://github.com/no-chris/chord-mark). I'm currently working on a proper public release for it with documentation, it will probably take a few more months until I reach a stage where this becomes usable.

But then I can see how incorporating your ideas would make those chords sheets even cooler, like automatically replacing chords with enharmonic equivalents: if you don't know how to play a specific chord, you could see alternatives with whom you might be more familiar with.

On your list of symbols, I assume NR means No Root, N3 means No 3rd, etc.?

Again, thanks for taking the time to share your thought and knowledge here, this is much appreciated 🙌🏻

@Kernix13
Copy link

Kernix13 commented Oct 26, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Board
Awaiting triage
Development

Successfully merging a pull request may close this issue.

2 participants