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

Root note when using ChordProgression.from_string() #61

Closed
flexiblestoic opened this issue Feb 11, 2021 · 7 comments
Closed

Root note when using ChordProgression.from_string() #61

flexiblestoic opened this issue Feb 11, 2021 · 7 comments

Comments

@flexiblestoic
Copy link

Hi,

Fantastic piece of software. I was wondering if there is a way to define the root note when injecting the chord progression from a string?

Thanks,
Chris

@jonathangjertsen
Copy link
Owner

I'm not sure what you mean - the root note will be derived from the chord names in the string. The octave is chosen arbitrarily though - is that what you want to be able to specify?

Maybe you can provide some example code showing how you would like to use it?

@flexiblestoic
Copy link
Author

flexiblestoic commented Feb 11, 2021

Yes, I was thinking about the octave of the root note. I would use it like:

prog = ChordProgression.from_string("4F -- 3Am -- 4Dm7 -- 4F --")

Meaning the roots would be F4 A3 D4 and F4. The octave number before the note would be optional.

@jonathangjertsen
Copy link
Owner

I see! Having the octave in front is a nice solution, I don't think it conflicts with any of the existing notation. It could probably be extended to solve #1 as well. I'll give it a go!

@flexiblestoic
Copy link
Author

#1 Indeed. So the octave in front wouldn't the best solution to generalize. Maybe an optional dot notation?
The first inversion of C major starting on E4 would be E4.C
A C major starting on C5 would be C5.C

@jonathangjertsen
Copy link
Owner

I've added support for the octave in front, available in version 1.0.0 (pip install jchord==1.0.0)

@jonathangjertsen
Copy link
Owner

The first inversion of C major starting on E4 would be E4.C

If you just need to change the bass note, this is supported with slash chords, in this case you would write "5C/E". The "/E" adds an E below the root

jonathangjertsen pushed a commit that referenced this issue Feb 11, 2021
chord.bass will always be the lowest chord, even for slash chords.

Verifies claim in #61 (comment)
@flexiblestoic
Copy link
Author

Just tested. Works awesome. Thanks Jonathan!

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