I'm programming some Music stuff for piano and I need to know when exactly to call the note b or #. Can you help me out in understanding it? I know the difference and the purpose for those but I cannot make a universal formula out of it to always call the Notes correctly in my program.
Example: I say: Hey program gimme all the notes for the D7, or CM7, Em7 etc. chord. And then I want it to spit out the notes correctly called b or # where fit.
Thx in advance