Skip to content

Should notes and pitches implement Playable? #10

@barafael

Description

@barafael

I see currently a Chord is the only thing implementing the Playable trait. Does it fit your vision for the crate for Note and Pitch to implement Playable? In theory, it could be possible to do

impl<F: HasFrequency> Playable for F { ... }

However I think that clashes with the existing implementation of Playable for Chord - I could not get it to work correctly for some reason.

P.S. more of a breaking change, and just a suggestion: in Playable::play, I think it might be more practical to take std::time::Duration instead of f32 as arguments. When I first used this function I needed to dig at the source code/try out empirically to find out what the unit of length and delay and fade_in is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions