pub(crate) fn read_chord(&self, data: &[u8], seek: &mut usize, string_count: u8) -> Chord {
        let mut c = Chord {length: string_count, strings: vec![-1; string_count.into()], ..Default::default()};
        for _ in 0..string_count {c.strings.push(-1);}
        c.new_format = Some(read_bool(data, seek));
        if c.new_format == Some(true) {
            if      self.version.number.0 == 3 { self.read_new_format_chord_v3(data, seek, &mut c); }
            else                               { self.read_new_format_chord_v4(data, seek, &mut c);}
        }
        else {self.read_old_format_chord(data, seek, &mut c);}
        c
    }
/// Read chord diagram. First byte is chord header. If it's set to 0, then following chord is written in 
/// default (GP3) format. If chord header is set to 1, then chord diagram in encoded in more advanced (GP4) format.
Read chord diagram. First byte is chord header. If it's set to 0, then following chord is written in
default (GP3) format. If chord header is set to 1, then chord diagram in encoded in more advanced (GP4) format.
Read chord diagram . First byte is chord header . If it ' s set to 0 then following chord is written in default ( GP3 ) format . If chord header is set to 1 then chord diagram in encoded in more advanced ( GP4 ) format .
pub(crate) fn read_chord(&self, data: &[u8], seek: &mut usize, string_count: u8) -> Chord {
        let mut c = Chord {length: string_count, strings: vec![-1; string_count.into()], ..Default::default()};
        for _ in 0..string_count {c.strings.push(-1);}
        c.new_format = Some(read_bool(data, seek));
        if c.new_format == Some(true) {
            if      self.version.number.0 == 3 { self.read_new_format_chord_v3(data, seek, &mut c); }
            else                               { self.read_new_format_chord_v4(data, seek, &mut c);}
        }
        else {self.read_old_format_chord(data, seek, &mut c);}
        c
    }
pub ( crate ) fn read_chord ( & self , data : & [ u8 ] , seek : & mut usize , string_count : u8 ) -> Chord { let mut c = Chord { length : string_count , strings : vec ! [ 1 string_count into ( ) ] , .. Default :: default ( ) } ; for _ in 0 .. string_count { c . strings . push ( - 1 ) ; } c . new_format = Some ( read_bool ( data , seek ) ) ; if c . new_format == Some ( true ) { if self . version . number . 0 == 3 { self . read_new_format_chord_v3 ( data , seek , & mut c ) ; } else { self . read_new_format_chord_v4 ( data , seek , & mut c ) ; } } else { self . read_old_format_chord ( data , seek , & mut c ) ; } c }
Read chord diagram.
Read chord diagram .
&self
data
&[u8]
seek
&mut usize
string_count
u8
&self
data
&[u8]
seek
&mut usize
string_count
u8