pub fn tie<T: LengthFluid + Clone>(
len_fn1: impl Fn(T) -> T::Output,
len_fn2: impl Fn(T) -> T::Output,
) -> impl Fn(T) -> T::Output
Expand description
Creates a tied note by combining the durations of two note lengths.
In music notation, a tie connects two notes of the same pitch, effectively creating one longer note with their combined duration.
ยงExamples
use symphoxy::prelude::*;
// Tie a quarter note and eighth note together
let tied_note = tie(quarter, eighth)(C4);
// Duration = 4 + 2 = 6 time units
// Tie two half notes for a whole note (or you could just use the "whole" function)
let whole_via_tie = tie(half, half)(A4);
// Duration = 8 + 8 = 16 time units