Struct ukebox::voicing_graph::VoicingGraph [−][src]
pub struct VoicingGraph { /* fields omitted */ }
Expand description
A graph whose nodes represent chord voicings and whose edges are weighted by the distances between the voicings. It is used to find the (by some definition) optimal voice leading for a given sequence of chords.
Implementations
impl VoicingGraph
[src]
impl VoicingGraph
[src]pub fn new(config: VoicingConfig) -> Self
[src]
pub fn add(&mut self, chord_seq: &ChordSequence)
[src]
pub fn paths(
&self,
max_suggestions: usize
) -> impl Iterator<Item = (Vec<Voicing>, Distance)> + '_
[src]
pub fn paths(
&self,
max_suggestions: usize
) -> impl Iterator<Item = (Vec<Voicing>, Distance)> + '_
[src]Return an iterator over the paths between the voicing nodes. The path with the lowest distance is presented first. If several paths have the same overall distance, they are further ranked by fingering distance.