Skip to content

simplify transpose method#2

Open
gjthoman wants to merge 1 commit intoallenjprice:masterfrom
gjthoman:master
Open

simplify transpose method#2
gjthoman wants to merge 1 commit intoallenjprice:masterfrom
gjthoman:master

Conversation

@gjthoman
Copy link
Copy Markdown
Contributor

@gjthoman gjthoman commented Jul 3, 2014

This is kind of what I am thinking:
remove doubles, and half step enharmonics like E# and Fb etc... no one cares.... probably

convert the incoming chord root into an integer
do math
convert is back to a note name and chose enharmonic base on a flat key array

for the most part, this takes care of things... by if you transpose into a weird key you could end up with an Fm7 chord in the key of Gb... but I don't think that's a big deal.

The diff is really strange, so you may want to merge this into a branch in your repo to better see how the code flows. I did leave it hooked up to your processChord method.

Overall... I'm blown away by your first attempt. Great job!

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 this pull request may close these issues.

1 participant