pub(crate) fn read_beat_v5(&mut self, data: &[u8], seek: &mut usize, voice: &mut Voice, start: &mut i64, track_index: usize) -> i64 {
        let duration = self.read_beat(data, seek, voice, *start, track_index);
        //get the beat used in read_beat()
        let b = voice.beats.len() - 1;

        let flags2 = read_short(data, seek);
        //println!("read_beat_v5(), flags2: {} \t seek: {}", flags2, *seek);
        if (flags2 & 0x0010) == 0x0010 {voice.beats[b].octave = Octave::Ottava;}
        if (flags2 & 0x0020) == 0x0020 {voice.beats[b].octave = Octave::OttavaBassa;}
        if (flags2 & 0x0040) == 0x0040 {voice.beats[b].octave = Octave::Quindicesima;}
        if (flags2 & 0x0100) == 0x0100 {voice.beats[b].octave = Octave::QuindicesimaBassa;}

        voice.beats[b].display.break_beam = (flags2 & 0x0001) == 0x0001;
        voice.beats[b].display.force_beam = (flags2 & 0x0004) == 0x0004;
        voice.beats[b].display.force_bracket = (flags2 & 0x2000) == 0x2000;
        voice.beats[b].display.break_secondary_tuplet = (flags2 & 0x1000) == 0x1000;
        if (flags2 & 0x0002) == 0x0002 {voice.beats[b].display.beam_direction = VoiceDirection::Down;}
        if (flags2 & 0x0008) == 0x0008 {voice.beats[b].display.beam_direction = VoiceDirection::Up;}
        if (flags2 & 0x0200) == 0x0200 {voice.beats[b].display.tuplet_bracket = TupletBracket::Start;}
        if (flags2 & 0x0400) == 0x0400 {voice.beats[b].display.tuplet_bracket = TupletBracket::End;}
        if (flags2 & 0x0800) == 0x0800 {voice.beats[b].display.break_secondary = read_byte(data, seek);}

        duration
    }
/// Read beat. First, beat is read is in Guitar Pro 3 `guitarpro.gp3.readBeat`. Then it is followed by set of flags stored in `short`.
/// - *0x0001*: break beams
/// - *0x0002*: direct beams down
/// - *0x0004*: force beams
/// - *0x0008*: direct beams up
/// - *0x0010*: ottava (8va)
/// - *0x0020*: ottava bassa (8vb)
/// - *0x0040*: quindicesima (15ma)
/// - *0x0100*: quindicesima bassa (15mb)
/// - *0x0200*: start tuplet bracket here
/// - *0x0400*: end tuplet bracket here
/// - *0x0800*: break secondary beams
/// - *0x1000*: break secondary tuplet
/// - *0x2000*: force tuplet bracket
/// - Break secondary beams: `byte`. Appears if flag at *0x0800* is set. Signifies how much beams should be broken.
Read beat. First, beat is read is in Guitar Pro 3 `guitarpro.gp3.readBeat`. Then it is followed by set of flags stored in `short`.
Read beat . First beat is read is in Guitar Pro 3 ` guitarpro . gp3 . readBeat ` . Then it is followed by set of flags stored in ` short ` .
pub(crate) fn read_beat_v5(&mut self, data: &[u8], seek: &mut usize, voice: &mut Voice, start: &mut i64, track_index: usize) -> i64 {
        let duration = self.read_beat(data, seek, voice, *start, track_index);
        //get the beat used in read_beat()
        let b = voice.beats.len() - 1;
        let flags2 = read_short(data, seek);
        //println!("read_beat_v5(), flags2: {} \t seek: {}", flags2, *seek);
        if (flags2 & 0x0010) == 0x0010 {voice.beats[b].octave = Octave::Ottava;}
        if (flags2 & 0x0020) == 0x0020 {voice.beats[b].octave = Octave::OttavaBassa;}
        if (flags2 & 0x0040) == 0x0040 {voice.beats[b].octave = Octave::Quindicesima;}
        if (flags2 & 0x0100) == 0x0100 {voice.beats[b].octave = Octave::QuindicesimaBassa;}
        voice.beats[b].display.break_beam = (flags2 & 0x0001) == 0x0001;
        voice.beats[b].display.force_beam = (flags2 & 0x0004) == 0x0004;
        voice.beats[b].display.force_bracket = (flags2 & 0x2000) == 0x2000;
        voice.beats[b].display.break_secondary_tuplet = (flags2 & 0x1000) == 0x1000;
        if (flags2 & 0x0002) == 0x0002 {voice.beats[b].display.beam_direction = VoiceDirection::Down;}
        if (flags2 & 0x0008) == 0x0008 {voice.beats[b].display.beam_direction = VoiceDirection::Up;}
        if (flags2 & 0x0200) == 0x0200 {voice.beats[b].display.tuplet_bracket = TupletBracket::Start;}
        if (flags2 & 0x0400) == 0x0400 {voice.beats[b].display.tuplet_bracket = TupletBracket::End;}
        if (flags2 & 0x0800) == 0x0800 {voice.beats[b].display.break_secondary = read_byte(data, seek);}
        duration
    }
pub ( crate ) fn read_beat_v5 ( & mut self , data : & [ u8 ] , seek : & mut usize , voice : & mut Voice , start : & mut i64 , track_index : usize ) -> i64 { let duration = self . read_beat ( data , seek , voice , * start , track_index ) ; //get the beat used in read_beat() let b = voice . beats . len ( ) - 1 ; let flags2 = read_short ( data , seek ) ; //println!("read_beat_v5(), flags2: {} \t seek: {}", flags2, *seek); if ( flags2 & 0x0010 ) == 0x0010 { voice . beats [ b ] . octave = Octave :: Ottava ; } if ( flags2 & 0x0020 ) == 0x0020 { voice . beats [ b ] . octave = Octave :: OttavaBassa ; } if ( flags2 & 0x0040 ) == 0x0040 { voice . beats [ b ] . octave = Octave :: Quindicesima ; } if ( flags2 & 0x0100 ) == 0x0100 { voice . beats [ b ] . octave = Octave :: QuindicesimaBassa ; } voice . beats [ b ] . display . break_beam = ( flags2 & 0x0001 ) == 0x0001 ; voice . beats [ b ] . display . force_beam = ( flags2 & 0x0004 ) == 0x0004 ; voice . beats [ b ] . display . force_bracket = ( flags2 & 0x2000 ) == 0x2000 ; voice . beats [ b ] . display . break_secondary_tuplet = ( flags2 & 0x1000 ) == 0x1000 ; if ( flags2 & 0x0002 ) == 0x0002 { voice . beats [ b ] . display . beam_direction = VoiceDirection :: Down ; } if ( flags2 & 0x0008 ) == 0x0008 { voice . beats [ b ] . display . beam_direction = VoiceDirection :: Up ; } if ( flags2 & 0x0200 ) == 0x0200 { voice . beats [ b ] . display . tuplet_bracket = TupletBracket :: Start ; } if ( flags2 & 0x0400 ) == 0x0400 { voice . beats [ b ] . display . tuplet_bracket = TupletBracket :: End ; } if ( flags2 & 0x0800 ) == 0x0800 { voice . beats [ b ] . display . break_secondary = read_byte ( data , seek ) ; } duration }
Read beat.
Read beat .
&mut self
data
&[u8]
seek
&mut usize
voice
&mut Voice
start
&mut i64
track_index
usize
&mut self
data
&[u8]
seek
&mut usize
voice
&mut Voice
start
&mut i64
track_index
usize