Draw an ASCII key signature
Python 2, 206 197 178 175 168 161 bytes

Thanks to Mr. Xcoder for -12 bytes!



This is a function which returns the result as a 2D list of characters. If the input does not contain a sharp/flat, it should be padded with a space.

def f(k,r=range(10)):n="CGDAEB".find(k[0])+7*' #'.find(k[1]);return[[(' -'[i%2],'b#'[n&gt;0])[0&lt;j&lt;=abs(n)and`i`==(n*"1403625"+"5263748")[j-1]]for j in r]for i in r]


Try it online!