saebekassebil / teoria

Javascript taught Music Theory
http://saebekassebil.github.io/teoria
MIT License
1.32k stars 115 forks source link

missing note.midi() #51

Closed mllocs closed 10 years ago

mllocs commented 10 years ago

Since we have teoria.note.fromKey(), note.key() and teoria.note.fromMIDI() it would be nice to have note.midi(). I can PR If you think that's a good idea.

saebekassebil commented 10 years ago

Hi @mllocs.

You're right, that since we have the fromMIDI it would be understandable to implement the note.midi(). However, recently I've begun disliking all the sugar functions of the library, and both to- and from MIDI are just that, since they're equal to note.key() + 20.

I'm working with some different ideas on where teoria is going, but I don't think it's a good idea to have more sugar than already. You can always extend the TeoriaNote.prototype.

Thank you for the suggestion nonetheless :)