pub fn compound_interval(&self, other: &Self) -> CompoundInterval {
        let interval = self.simple_interval(other);
        // calculate the octave using only the white keys
        let white_key_chromatic_distance = {
            let lower_wk_midi = self.note.name.chromatic_scale_degree() as isize + (CHROMATIC_SCALE as isize * self.octave);
            let higher_wk_midi = other.note.name.chromatic_scale_degree() as isize + (CHROMATIC_SCALE as isize * other.octave);
            (higher_wk_midi - lower_wk_midi).abs() as usize
        };
        let compound_octaves = white_key_chromatic_distance / CHROMATIC_SCALE;
        CompoundInterval::from_interval(interval, compound_octaves)
    }
/// The interval between one `PitchedNote` and another, including how many octaves separate them. Notes in the
/// same octave (less than 12 half-steps apart) will have an octave of zero. Of note is that there is **no**
/// diminished octave in this naming system. The distance between, say, G&sharp;<sub>5</sub> and 
/// G&natural;<sub>6</sub> is indicated as a diminished unison with an octave of one. This was an intentional
/// choice, made because an octave is equivalent to a unison for analytical purposes.
The interval between one `PitchedNote` and another, including how many octaves separate them. Notes in the
same octave (less than 12 half-steps apart) will have an octave of zero. Of note is that there is **no
diminished octave in this naming system. The distance between, say, G♯5 and
G♮6 is indicated as a diminished unison with an octave of one. This was an intentional
choice, made because an octave is equivalent to a unison for analytical purposes.
The interval between one ` PitchedNote ` and another including how many octaves separate them . Notes in the same octave ( less than 12 half - steps apart ) will have an octave of zero . Of note is that there is ** no diminished octave in this naming system . The distance between say G♯5 and G♮6 is indicated as a diminished unison with an octave of one . This was an intentional choice made because an octave is equivalent to a unison for analytical purposes .
pub fn compound_interval(&self, other: &Self) -> CompoundInterval {
        let interval = self.simple_interval(other);
        // calculate the octave using only the white keys
        let white_key_chromatic_distance = {
            let lower_wk_midi = self.note.name.chromatic_scale_degree() as isize + (CHROMATIC_SCALE as isize * self.octave);
            let higher_wk_midi = other.note.name.chromatic_scale_degree() as isize + (CHROMATIC_SCALE as isize * other.octave);
            (higher_wk_midi - lower_wk_midi).abs() as usize
        };
        let compound_octaves = white_key_chromatic_distance / CHROMATIC_SCALE;
        CompoundInterval::from_interval(interval, compound_octaves)
    }
pub fn compound_interval ( & self , other : & Self ) -> CompoundInterval { let interval = self . simple_interval ( other ) ; // calculate the octave using only the white keys let white_key_chromatic_distance = { let lower_wk_midi = self . note . name . chromatic_scale_degree ( ) as isize + ( CHROMATIC_SCALE as isize * self . octave ) ; let higher_wk_midi = other . note . name . chromatic_scale_degree ( ) as isize + ( CHROMATIC_SCALE as isize * other . octave ) ; ( higher_wk_midi - lower_wk_midi ) . abs ( ) as usize } ; let compound_octaves = white_key_chromatic_distance / CHROMATIC_SCALE ; CompoundInterval :: from_interval ( interval , compound_octaves ) }
The interval between one `PitchedNote` and another, including how many octaves separate them.
The interval between one ` PitchedNote ` and another including how many octaves separate them .
&self
other
&Self