PHP Classes

Doc and Roll

Recommend this page to a friend!

      Music theory  >  All threads  >  Doc and Roll  >  (Un) Subscribe thread alerts  
Subject:Doc and Roll
Summary:Yes but...
Messages:3
Author:Brandon Sussman
Date:2010-12-10 15:37:34
Update:2010-12-11 19:05:58
 

  1. Doc and Roll   Reply   Report abuse  
Picture of Brandon Sussman 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.

  2. Re: Doc and Roll   Reply   Report abuse  
Picture of Arturs Sosins Arturs Sosins - 2010-12-10 16:41:32 - In reply to message 1 from Brandon Sussman
wow, thank you for stating it. Don't know how I missed it, will recheck all comment data. ;)
Well then what should be in doc? Something like comments in main class? I just never had written one. Still feeling like a newbie with all this programming thing

  3. Re: Doc and Roll   Reply   Report abuse  
Picture of Arturs Sosins Arturs Sosins - 2010-12-11 19:05:58 - In reply to message 1 from Brandon Sussman
First version of documentation
code-snippets.co.cc/PHP-classes/Imp ...
If you find anything wrong or got ideas what needs to be added or changed, I'm open to any suggestions.

Will try to write similar docs for my other classes.