Is there a good mnemonic or trick for working out the key signature from a given key? I can always write out the chromatic scale, then count out the appropriate intervals from the tonic, and figure the key signature out from that, but I'm wondering if there are any mnemonics or tricks for making this easier.
Also, are there any tricks for going in the other direction, from key signature to key? Of course this won't map to a single key, since there are all of the modes with the same key signature, but something that would make it easy to figure out the major and relative minor given a key signature would be helpful.