Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign Articulation in final tagless style #94

Open
bwetherfield opened this issue Oct 9, 2018 · 0 comments
Open

Redesign Articulation in final tagless style #94

bwetherfield opened this issue Oct 9, 2018 · 0 comments

Comments

@bwetherfield
Copy link
Member

bwetherfield commented Oct 9, 2018

Some ideas for replacing the enum based articulation with a final tagless approach. This will enable more user customization downstream.

// Articulation that can be represented by a single symbol above or below a notehead
protocol SymbolizableArticulation {
    static func staccato() -> Self
    static func staccatissimo() -> Self
    static func marcato() -> Self
    ...
    static func stack([Self]) -> Self
}

typealias DrawnMarking = SomeView // for example - something drawn
typealias MarkingDescribed = String // string representation like "staccato"

extension DrawnMarking: SymbolizableArticulation {
    ...
}

extension MarkingDesribed: SymbolisableArticulation {
    ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant