saebekassebil / teoria

Javascript taught Music Theory
http://saebekassebil.github.io/teoria
MIT License
1.32k stars 114 forks source link

Possible erroneous interpretation of chord string. #29

Closed quickredfox closed 11 years ago

quickredfox commented 11 years ago

I'm using ChordFinder.app to help me along my adventure into the complex world of music theory, If I set up the app to show me all the chords for a C double sharp, it provides me with a list of triads, basic sevenths etc... If you notice in the screenshot it uses the ascii-style notation to display chord in the left.

Screen Shot 2013-02-27 at 5 35 24 PM

Now, I dont know if it's ChordFinder, Teoria or my own understanding of things that is at fault here, but grabbing the string from ChordFinder.app for a "Dominant 13th, Sharp 11th Chord starting at C double sharp. I get the keys displayed in the screenshot. Using teoria, I get whole other set of keys.

teoria.chord('C##13#11').notes.toString() #=> c#4,e#4,g#4,b4,d#5,fx5,ax5

I think could either be that teoria only uses x for double sharps and doesn't understand '##'. Or that ChordFinder.app should have used an x. And yes, I know how hard it must have been to decide on these things because I clearly see there is no authoritative standard on chord notation.

saebekassebil commented 11 years ago

Wow that app looks nice! In Teoria we use x for a double sharp - this is to my knowledge to most used way to present a double sharp. So teoria.chord('C##13#11') is interpreted as a C# (#13#11) - That is, a C# dominant chord with augmented 13th and 11th.

However, if you try to get the notes of the Cx chord: teoria.chord('Cx13#11'), then you'll get an error

Error: Invalid note format

I know that error message is a bit cryptic, but it's caused, when the function is trying to instantiate a triple-sharp f and a note - which "does not exists". In fact they do exist, but Teoria don't support triple-sharp notes as of now. We could open an issue on the subject of supporting triple-sharps, but that will result in supporting "triple-augmented" and "triple-diminished" intervals as well.

In my humble opinion, writing a Cx13 is just silly - One should use a D13 instead. The only place for double sharps and flats, are as members of a chord - not as tonic.

quickredfox commented 11 years ago

Well the app's been useful in hacking my way through sheet music and finding my keys. But as we can see here, it might be confusing me more than helping as far as theory/programming goes.

Wikipedia seems to agree with your humble opinion stating that "Although very uncommon, a triple sharp (#x) can sometimes be found. It raises a note by three semitones". And reading "music theory for beginner" type books I've rarely even seen a triple sharp being explained. Opening an issue for triple sharps could open up a bigger can of worms, because then I'll eventually be asking about arabic quarter-tones and quarter-tone sharps.

I see a problem growing here: Do you really want to support ALL of music theory (ie: all of wikipedia)? What are the limits Teoria will accept as it's ultimate scope of features?

PS: Another useful app I use is Wolfram's Music Theory Course Assistant https://itunes.apple.com/ca/app/wolfram-music-theory-course/id410595605?mt=8

saebekassebil commented 11 years ago

@quickredfox Let's wait opening issues about spicy stuff such as triple sharps, etc.

What I'd like to see Teoria growing into is more of a platform with different interfaces for different music terminologies. It makes little sense supporting quarter-tones in standard western 12TET, but makes a lot more sense when working with microtonal intervals, as in Indian and Arabic music. What I/we need to do, however, is to find a way to do this "generally", so the library will seem coherent and the code easy to write and read. This will include refactoring most of the code into more abstract units as discussed in #4.

quickredfox commented 11 years ago

That is actually a very clear response. I even suggest you add this to the README as a sort of "mission statement" for the project. I will close this Issue because I opened it and your answers have been satisfactory. The "problem" is an acceptable one.