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

Chords in the key of a note #106

Open
ishmangit opened this issue Apr 20, 2016 · 4 comments
Open

Chords in the key of a note #106

ishmangit opened this issue Apr 20, 2016 · 4 comments

Comments

@ishmangit
Copy link

Hi to all!,
I'm very impressed with the possibilities of this library. However I'm wondering if it's possible to obtain the chords in the key of a certain note.

Sorry in advance if I missed something in the documentation...

@saebekassebil
Copy link
Owner

Hey, thanks for the interest!

It's definitely possible. Create a note, create a scale from that note (major, minor, whatever), and map over all the notes in the scale, creating chords by just selecting every other note in the scale array.

C,D,E,F,G,A,B
^---^---^---- = C, E, G = C major

C,D,E,F,G,A,B
--^---^---^-- = D, F, A = D minor

etc.

Makes sense?

@Walther
Copy link

Walther commented Oct 20, 2017

This could be useful, perhaps in combination with some chord degree notation (e.g. ii, V, I) getters.

In addition to the triads, ability to get the common tetrads for the scale - e.g. in a major key, Maj7, m7, m7, Maj7, 7, m7, m7b5 - as Chord objects.

@saebekassebil
Copy link
Owner

saebekassebil commented Oct 21, 2017 via email

@Walther
Copy link

Walther commented Oct 21, 2017

We could have a function aScale.getChord(degree [, tones]) which would return a chord at the degree:th position on the scale, defaulting to a triad, optionally returning a tones polyad.

A use case could look like this:

let c4 = teoria.Note("c4");
let cIonian = c4.scale("ionian");
let iiTriad = cIonian.getChord(2); // D minor
let iiTetrad = cIonian.getChord(2, 4); // Dm7
let iiPentad = cIonian.getChord(2, 5); // Dm7(add9)

A naive implementation could indeed just pick every other note of the scale, starting at the right root, and pick the required amount of notes (triad, tetrad, pentad...). Simple!

However, it's actually a lot more complicated. Consider for example the A minor scale. With this method, the in-key chords would include Am at i and Em7 at V - however, in modern popular music, it's much more common to use E7 as the V7 in a minor key.

In addition, a naive implementation like this would result in rather curious chord voicings for non-diatonic scales, like the chromatic 😄


It might be the easiest just to take the degree:th note of a key and declare the chord quality manually, something like let ii7 = teoria.Chord(cIonian.getNoteAtDegree("ii"), "m7"). This degree-based getting could facilitate various chord substitutions, for example that dom7 instead of m7 in a minor key, or getting a bII7 (common tritone substitution for a V7 in jazz), with the end user not having to think about how to compute the required Db7 - where Db as a note doesn't even belong in C major scale.

Then again this might require a whole new concept Key in addition to Scale... Which could be a fun project to do!

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

3 participants