Exemplo n.º 1
0
 public function readTrill(NoteEffect $noteEffect)
 {
     $fret = $this->reader->readByte();
     $period = $this->reader->readByte();
     $trill = new EffectTrill();
     $trill->setFret($fret);
     if ($period == 1) {
         $trill->getDuration()->setValue(Duration::SIXTEENTH);
         $noteEffect->setTrill($trill);
     } else {
         if ($period == 2) {
             $trill->getDuration()->setValue(Duration::THIRTY_SECOND);
             $noteEffect->setTrill($trill);
         } else {
             if ($period == 3) {
                 $trill->getDuration()->setValue(Duration::SIXTY_FOURTH);
                 $noteEffect->setTrill($trill);
             }
         }
     }
 }