// Display a report for Chords consistency // Arguments: // (no argument) // // Author: LoopToGo // // Description : Display a report showing when Chords for Play loops // are not the same as the Chords from the corresponding linked Record loop showErrorAndLogConsole // Make sure the Error/Log console is visible print Song contains $nbChords chords and $nbLoops Loops print Checking if chords at play loops correspond to chords at linked record loop print variable nbError 0 for n 1 $nbChords variable _chordName chordName & $n variable _chordBar chordBar & $n variable chordName $$_chordName variable chordBar $$_chordBar //print Chord: $chordName Bar: $chordBar for n2 1 $nbLoops variable _loopID loopID & $n2 variable loopID $$_loopID getLoopType loopType $loopID getLoopStart loopStart $loopID getLoopEnd loopEnd $loopID variable condition1 $chordBar = $loopStart variable condition2 $chordBar > $loopStart if $condition1 + $condition2 variable condition3 $chordBar < $loopEnd if $condition3 + $condition4 if $loopType = Record // we create a variable for the chords with the loop ID and the bar containing the chord // it will be used to check if a play Loop point to the same chord // IDBar tag variable $loopID & $chordBar $chordName else // $loopType = Play //print $condition1 $condition2 $condition3 $condition4 getLoopLink loopLinkID $loopID if $loopLinkID getLoopStart loopLinkStart $loopLinkID // Start of the corresponding record loop getLoopEnd loopLinkEnd $loopLinkID // End of the corresponding record loop variable loopLinkLength $loopLinkEnd - $loopLinkStart variable correction $loopStart - $loopLinkStart variable chordBarEquivalent $chordBar - $correction if $loopLinkLength while $chordBarEquivalent > $loopLinkEnd - .01 // In case play loop is repeating variable chordBarEquivalent $chordBarEquivalent - $loopLinkLength endWhile endIf variable IDBarRecord $loopLinkID & $chordBarEquivalent getLoopName loopName $loopID getLoopTrack loopTrack $loopID if $$IDBarRecord = $chordName //print OK [ $loopTrack "-" $loopName ] : $chordName "at bar" $chordBar "is the same as" $$IDBarRecord "at bar" $chordBarEquivalent else print ERROR [ $loopTrack "-" $loopName ] : $chordName "at bar" $chordBar "is different from" $$IDBarRecord "at bar" $chordBarEquivalent variable nbError $nbError + 1 endIf else // No loopLinkID Ok, we accept it for Drum tracks //getLoopName loopName $loopID //getLoopTrack loopTrack $loopID //print ERROR [ $loopTrack "-" $loopName ] : "****Play Loop at bar" $chordBar "is not linked to a record loop!" //variable nbError $nbError + 1 endIf //print $loopName $loopType $loopLink $loopStart $loopEnd endIf endIf endIf endFor endFor print if $nbError variable _error error if $nbError > 1 variable _error errors endIf print Error : $nbError $_error found! else print No error found endIf