ozankasikci / rust-music-theory

A music theory guide written in Rust.
MIT License
626 stars 28 forks source link

Chord inversions #17

Closed henryksloan closed 4 years ago

henryksloan commented 4 years ago

Executable

chord.rs

test_chord.rs

Caveat: There is no standard (to my knowledge) for voicing inverted chords beyond the octave, i.e. placing G in G major 9 / B. For this reason (and to maximize simplicity and flexibility), my implementation enforces a non-decreasing order; G major 9 = B4 D5 F#5 A5 G6

ozankasikci commented 4 years ago

That's great, another very much needed feature!

I'll review this ASAP :)

ozankasikci commented 4 years ago

Great work.

I'd like to address an issue, although C/E is the universal notation to represent the first inversion, I think we should implement C/1 as well. That's because the former entails the user to know all the notes of the given chord while the latter is just intuitive.

Let me know what you think!

henryksloan commented 4 years ago

@ozankasikci Good idea, done! I had that same idea for numerical syntax, but I thought it might be a bit obscure. I added it, along with an extra example in the chords help message, so I think it's a good solution.

ozankasikci commented 4 years ago

Awesome, thanks! Merging :)