Brandon Sussman - 2010-12-10 15:37:36
I agree - musical theory is not wanted here - I was referring to technical, not musical doc :)
OTOH, You use interval to mean semitone.
I know it is old-fashioned, but I don't think one should need to chop comments out of the code to understand how to use the code
I am having trouble dealing with the comments in the class file - the input/output does not match. For example:
/**
* Get chord notes by name and type (optional transpose)
* Example input:
* $name = "C"; //chord name
* $type = "major"; //chord type
* $transpose = -1 //intervals to transpose to (default value 0 doesn't transpose), negative number tranposes down, positive - up
* Example output:
* Array
* (
* [0] => C
* [3] => F
* [5] => G#
* )
*/
The correct output is:
Array
(
[0] => B
[1] => D#
[2] => F#
)
The code works but the comments dont! The indexing 0,3,5 in your comments is unusual as well.
BTW - I didn't mean the comment about a graphical output to be critical of what you have done - only that it would be a valuable thing and could be driven by what you have done.