Scale from key and mode
GolfScript, 96 characters
&quot; &quot;/~5&lt;{+}*7%&quot;v]nwm[{&quot;=2*2base(;\(&quot; #&quot;@?]{.1&gt;))[&quot;b&quot;&quot;&quot;&quot;#&quot;..+]=+\[~@(@+@(7%65+\1$7%4%0&gt;-]}7*;]&quot; &quot;*

Golfscript solution which can be tested online.
Note: As in the examples the key has to be upper case while mode has to be given in lower case.
Examples:
&gt;C lydian
C D E F# G A B

&gt;C mixolydian
C D E F G A Bb