TuningFork icon indicating copy to clipboard operation
TuningFork copied to clipboard

Is it possible to determine *how* sharp/flat a note is using this framework?

Open edekhayser opened this issue 9 years ago • 4 comments

edekhayser avatar Nov 03 '15 01:11 edekhayser

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?"

edekhayser avatar Nov 03 '15 01:11 edekhayser

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.

comyar avatar Nov 03 '15 01:11 comyar

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.

edekhayser avatar Nov 03 '15 01:11 edekhayser

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.

comyar avatar Nov 03 '15 02:11 comyar