Draw an ASCII key signature Given an input of a note, output an ASCII drawing of the corresponding major
key on the treble clef.

Here are all the major keys (that don't include double-sharps or double-flats)
and their corresponding key signatures:


Circle of fifths deluxe 4 by Wikipedia user Just plain Bill, copyright CC BY-SA 3.0

If the input is a key with sharps, draw the following ASCII art with the
appropriate number of sharps:

   #
-#-------
      #
----#----
  #
-------#-
     #
---------

---------


And if the input is a key with flats:

---------
  b
----b----
      b
-b-------
   b
-----b---
       b
---------


Here is a concise summary of the possible inputs as well as how many sharps or
flats they use:

   0   1   2   3   4   5   6   7
#  C   G   D   A   E   B   F#  C#
b  C   F   Bb  Eb  Ab  Db  Gb  Cb


All five lines of dashes must always be drawn, but there may be any number of
dashes per line such that the sharps or flats have at least one column of
padding on each side, as long as each line of dashes has the same length. For
example, these are all also acceptable outputs for the input Ab:

---------   ------   ---------   ----------------
  b           b           b          b
----b----   ----b-   -------b-   ------b---------

-b-------   -b----   ----b----   ---b------------
   b           b           b          b
---------   ------   ---------   ----------------

---------   ------   ---------   ----------------


In the case of C major, which has no sharps nor flats, any positive number of dashes per
line (even one) is acceptable.

Any amount of leading or trailing whitespace is fine, as are trailing spaces on
each line. Extra leading spaces are okay as long as there are the same number
on each line.

You may take input in lowercase or require that inputs without a sharp or flat contain a trailing space, if you so desire.

Since this is code-golf, the shortest solution in bytes will win.
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!