chords2halftone.php
changeset 4 bb3789db954a
parent 0 16db14829751
equal deleted inserted replaced
3:c3150cee8dd9 4:bb3789db954a
    36 				echo '(' . implode(") (", $chordstack) . ")\n";
    36 				echo '(' . implode(") (", $chordstack) . ")\n";
    37 				$chordline = false;
    37 				$chordline = false;
    38 			}
    38 			}
    39 			echo "\n[{$match[1]}]\n";
    39 			echo "\n[{$match[1]}]\n";
    40 		}
    40 		}
    41 		else if ( preg_match('/^(\s*([A-G][#b]?(?:m?7?|2|add9|sus4|[Mm]aj[79])?)(\/[A-G][#b]?)?\s*)*$/', $line) )
    41 		else if ( preg_match('/^(\s*([A-G][#b]?(?:[Mm]?7?|2|5|6|add9|sus4|[Mm]aj[79]|dim|aug)?)(\/[A-G][#b]?)?\s*)*$/', $line) )
    42 		{
    42 		{
    43 			if ( $chordline )
    43 			if ( $chordline )
    44 			{
    44 			{
    45 				// we have two chord lines in a row... treat the last one as a transition
    45 				// we have two chord lines in a row... treat the last one as a transition
    46 				$chordstack = preg_split("/([ \t]+)/", $chordline);
    46 				$chordstack = preg_split("/([ \t]+)/", $chordline);