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

Create a chord with root different from the tone #59

Closed
gsouf opened this issue Dec 22, 2014 · 6 comments
Closed

Create a chord with root different from the tone #59

gsouf opened this issue Dec 22, 2014 · 6 comments

Comments

@gsouf
Copy link

gsouf commented Dec 22, 2014

Hi,

Not sure about the correct english name of what i want to explain, an exemple worth 10000 words.

I dont find the way to build such a chord : A/B : A chord with A as the tonic and B as the bass.

Is there a way to do so in the current version ?

@saebekassebil
Copy link
Owner

Hi Soufiane!

There ought to be! I remember the chord parser being able to do exactly that - let me just check up on it.

Thanks for your interest btw!

@gsouf
Copy link
Author

gsouf commented Dec 23, 2014

I just tried the chord parser, it worked and chord.notes() return the good bass, but actually there is no simple way to distinctly get the root and the tone.

Theoria thinks that the tone and the root are the same thing but in theory that goes wrong for inverted chord (i finaly got the english word for it!).

Maybe can we add it to the library :

A first way that mays break a few compatibility but that i think better with music words :

  • Chord.root would return either the tone for a normal chord or the bass in an inverted chord.
    • for Am chord it would be the note A
    • for Am/B chord it would be the note B
  • add Chord.tone property that would be the tonic of the chord (why not a shortcut to get("first") )
    • for both of Am and Am/B chord it would be A

An other way that would keep 100% compatibility and would be easyer to implement :

  • add Chord.bass property, that woul defaulty be the same as tone, expect for inverted chords.
    • for Am chord it would be the note A
    • for Am/B chord it would be the note B

Tell me your feeling about it. I would be happy to contribute.

@saebekassebil
Copy link
Owner

Actually it should be possible to just do:

var chord = teoria.chord('Am/B'); // Create a Am(add9) with voicing b, a, c, e
var bass = chord.notes()[0]; // The *bass* of this chord is b
var root = chord.root; // The *root* of this chord is a

It seems that we've a bit of confused terminology. What you refer to as the "tone" is the root/tonic (which apparently is only called a tonic in scale terminology and a root in chords). And what you refer to as root is actually the base of the chord - which you can already get by just taking the lowest note in the chord voicing as shown above.

What do you think about this? Is it too elaborate?

@gsouf
Copy link
Author

gsouf commented Dec 23, 2014

Sure there is a terminology to have.

I checked, double checked, and triple checked, and even more. Actually I couldnt figure out the good definition of the root of a chord.
For some people it's the note with the lowest pitch (the base), for some other it's the tonic. I have a book that I i highly entrust. I will check asap what the book says about that.

I use to know the root as the lowest note in the chord when teoria knows it has the tonic. That's where the confusion comes from.

Btw, that's just a terminology problem, the most important is that things to get clear.

About the solution var bass = chord.notes()[0];. The problem is not that it is hard to play with. But i think it would be more semantic and easyest to understand for new commers and code readers to have a shortcut .getBase() (or just .base() to respect the library convention).

@saebekassebil
Copy link
Owner

Not sure if it's valid (although I've always said it that way): http://en.wikipedia.org/wiki/Root_(chord)

You're probably right about the .base() method - Let's add it. Would you like to do it?

@saebekassebil
Copy link
Owner

Fixed per d9a04c9

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

Successfully merging a pull request may close this issue.

2 participants