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

Should notes and pitches implement Playable? #10

Closed
barafael opened this issue May 30, 2023 · 1 comment
Closed

Should notes and pitches implement Playable? #10

barafael opened this issue May 30, 2023 · 1 comment

Comments

@barafael
Copy link
Contributor

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.

@twitchax
Copy link
Owner

Yeah, good ideas all around. I can look into this.

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

2 participants