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

Coltrane doesn't display enharmonic intervals correctly #12

Closed
art-of-dom opened this issue Mar 18, 2018 · 5 comments
Closed

Coltrane doesn't display enharmonic intervals correctly #12

art-of-dom opened this issue Mar 18, 2018 · 5 comments

Comments

@art-of-dom
Copy link

Coltrane does not give the correct name when creating an interval that has a more common enharmonic equivalent. Due to this, Coltrane cannot be used for music theory centric applications.

This interval is C to D (or D _down to _ C) and should be a Major Second (Correct)

2.5.0 :007 > interval = Coltrane::Note['D'] - Coltrane::Note['C']
 => #<Coltrane::IntervalClass:0x000000000142e248 @cents=200> 
2.5.0 :008 > interval.name
 => "M2" 

This interval is C to D# (or D# _down to _ C) and should be an Augmented Second (Wrong)

2.5.0 :009 > interval = Coltrane::Note['D#'] - Coltrane::Note['C']
 => #<Coltrane::IntervalClass:0x00000000013e46c0 @cents=300> 
2.5.0 :010 > interval.name
 => "m3" 

This interval is F to B (or B _down to _ F) and should be an Augmented Fourth (Correct)

> 2.5.0 :017 > interval = Coltrane::Note['B'] - Coltrane::Note['F']
>  => #<Coltrane::IntervalClass:0x00000000016d3958 @cents=600> 
> 2.5.0 :018 > interval.name
>  => "A4" 

This interval is B to F (or F _down to _ B) and should be a diminished fifth (Wrong, it gives and Augmented Fourth)

> 2.5.0 :017 > interval = Coltrane::Note['F'] - Coltrane::Note['B']
>  => #<Coltrane::IntervalClass:0x00000000016d3958 @cents=600> 
> 2.5.0 :018 > interval.name
>  => "A4" 

This interval is B to Fb (or Fb _down to _ B) and should be a doubly diminished fifth (Wrong, it gives a Perfect 4th)

2.5.0 :033 > interval = Coltrane::Note['Fb'] - Coltrane::Note['B']
 => #<Coltrane::IntervalClass:0x0000000001514810 @cents=500> 
2.5.0 :034 > interval.name
 => "P4" 

@pedrozath
Copy link
Owner

Alright. Can you better explain me how does that work? I think it's not hard to implement this.

@pedrozath
Copy link
Owner

What's the general rule? Why doubly diminished fifth instead of perfect fourth?

@art-of-dom
Copy link
Author

Intervals are a measure of two distances which are letter distance and distance in semitones. So any B up to any F must be some kind of 5th. A perfect fourth up from B would be an E and while the enharmonic equivelent note would be Fb, how the notes are spelled affect the intervals name since letter name is apart of the calculation.

@pedrozath
Copy link
Owner

Alright. Thanks a lot for this information.

@pedrozath
Copy link
Owner

Technically this is solved now. I had to completely refactor interval code for that. Would appreciate a lot if you could confirm :)

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

2 participants