btc / allegro

Allegro Composer for iOS
2 stars 1 forks source link

beam rule: don't include rests in a beam #283

Closed niklele closed 7 years ago

btc commented 7 years ago

created a new type of beam rule function:


    // BeamRule determines what we do when we evaluate two adjacent notes
    enum BeamRule {
        case split // separate them
        case drop // drop both
        case keep // keep together
    }

    private static let beamRulesV2: [(NoteViewModel, NoteViewModel) -> BeamRule] = [
        { $0.note.rest || $1.note.rest ? .split : .keep },
    ]