TuningFork
TuningFork copied to clipboard
Is it possible to determine *how* sharp/flat a note is using this framework?
I should have elaborated more: is it possible to determine how close it is from the next note, as in "how far is this note between an A and an Ab?"
Hmm interesting idea...you can't currently, at least not directly. I could add it in explicitly or publicly expose the frequency table which would allow users to discover that info. I'll look into this over the weekend, it should be an easy addition.
Okay great! If you don't get a chance to look into it, I'll try hacking something together using the frequency table. I imagine it would involve finding the difference between two adjacent values, and finding how it relates to the actual frequency.
Yup, exactly. What I was thinking of doing was maybe returning an immutable Note
object which was really a node in a linked list that would have methods like Note.adjacent
or Note.step
or something like that so you could basically traverse the frequency table (which is now actually a linked list) given any note; I may or may not actually do that, but it's an idea...the benefit would be you could do O(1)
adjacent look-ups for any note.