Ejemplo n.º 1
0
 private TGMeasureHeader readMeasureHeader(int number, TGSong song, TGTimeSignature timeSignature)
     throws IOException {
   int flags = readUnsignedByte();
   TGMeasureHeader header = getFactory().newHeader();
   header.setNumber(number);
   header.setStart(0);
   header.getTempo().setValue(120);
   header.setTripletFeel(this.tripletFeel);
   header.setRepeatOpen(((flags & 0x04) != 0));
   if ((flags & 0x01) != 0) {
     timeSignature.setNumerator(readByte());
   }
   if ((flags & 0x02) != 0) {
     timeSignature.getDenominator().setValue(readByte());
   }
   timeSignature.copy(header.getTimeSignature());
   if ((flags & 0x08) != 0) {
     header.setRepeatClose(readByte());
   }
   if ((flags & 0x10) != 0) {
     header.setRepeatAlternative(parseRepeatAlternative(song, number, readUnsignedByte()));
   }
   if ((flags & 0x20) != 0) {
     header.setMarker(readMarker(number));
   }
   if ((flags & 0x40) != 0) {
     readByte();
     readByte();
   }
   return header;
 }
Ejemplo n.º 2
0
 public TGTimeSignature clone(TGFactory factory) {
   TGTimeSignature timeSignature = factory.newTimeSignature();
   copy(timeSignature);
   return timeSignature;
 }