twitchax / kord

A music theory binary and library for Rust / JS.
MIT License
209 stars 10 forks source link

Implement `Playable` for `HasFrequency` #14

Closed barafael closed 1 year ago

barafael commented 1 year ago

Based on #13 (and #10), here is a patch to play anything which has a frequency.

barafael commented 1 year ago

This overrides the existing trait implementation for Chord somehow.

(also, I forgot to add #[cfg(feature = "audio")])

barafael commented 1 year ago

The trait conflict was just due to me not noticing I was using kord directly AND via a transitive dependency, which got me a version mismatch between my upstream version and the version used by the transitive dependency. It's fine.

I added the config flag for the "audio" feature, let me know what you think :)