It's funny you should mention this chord as not sounding very pleasing, because personally, it's my favourite chord! Sometimes called the minor 7 flat 5 chord, I prefer the term "half diminished" chord, which is usually written as "ø" (easy to remember, it's the diminished symbol "o" crossed in half.). In a minor key it lands on the 2nd degree, and in the major on the 7th. It can be used in other contexts too though!
It has a number of interesting properties that make it useful in a bunch of situations, but before I go on to the technical side of things, let me first convince you of it's beauty, subjectively.
I first fell in love with this chord at around the same time I fell in love with Brazilian music, where it's often used as a sort of "heartstring puller" chord in minor keys, creating a sentimental mood (and usually used to set up a dominant 7th chord giving a tension and release effect). You also hear this used a lot in the wistful romantic string section bits of old hollywood film soundtracks.
The passages I used in the above (low quality and rambling) audio outline the canonical example: using viiø as a 2 5 1 to the relative minor. Then the second example I chose because it's just full of various half diminished chords, and shows quite nicely how soft and delicate they can sound (of course the apart from the Bø these are non-diatonic uses of the chord which isn't 100% strictly an answer to your question about the viiø/iiø, but limiting yourself to diatonic chords is no way to learn about music).
1) So the basic (almost certainly the most common) use of the half-diminished is to resolve downwards by a fifth to a dominant 7th chord, which then leads to a minor chord, aka, a minor "2 5 1", e.g. Bø E7 Am . This is what's seen in the examples I gave above.
But before I go on to the other uses, let's have a look at some of the chord's interesting properties:
- it's only 1 note different from a minor 7th chord (Am7:
A C E G Aø:
A C Eb G)
- it's only 1 note different from a diminished chord (Ao:
A C Eb F♯ Aø:
A C Eb G)
- it is identical to the top part of a 9th chord (and the diminished triad is identical to the top part of a 7th chord) G9 (Bø in bold):
G B D F A
- it shares all the same notes as a minor 6th chord, but in a different order. Am6 is
A C E F♯ (the same notes as F♯ø)
- the top half of the chord is exactly the same as the major 7th chord a semitone below it, compare F♯ø:
F♯ A C E to Fmaj7:
F A C E
Because of all these properties, as well as just a beautiful sounding way to do a minor 2 5 1, it's also a really malleable chord that it's quite easy to slip into places in a subtle way, and move the chord progression in new and interesting directions.
1B) I've not given this its own number, because it's more just an extension of 1). Because of the fact that it's so similar to a minor chord, you can take that minor 2 5 1 and daisy chain it, instead of landing on the expected minor chord, land on yet another half diminished chord and keep the cycle going. João Gilberto's recording of "A felicidade" is a good place to hear this. (F#ø>B7>Eø>A7>Dø>G7>C).
2) It can be used as a chromatic tension to a major or major 7th chord just below it. Most commonly this is seen in minor keys, where the half diminished chord on the 6th scale degree is not really an "out there" sounding chord, since the sharpened 6th is perfectly normal in a minor key (e.g. F♯ø in A minor). A really common progression is something like
|Dm |Dm/C |Bm7b5|Bbmaj7| (e.g. in Portishead "Glory Box") which can really be though of as
|Dm |Dm/C |Dm/B |Dm/Bb|
3) The flat 6 scale degree is the usually the most gloomy or the most "sad" interval in a minor key, and so the viø minor chord can be used to "lighten up" a minor song by injecting a bit of a "Dorian flavour" into the minor progression in a way that is less "obvious" and "in your face" than a major IV chord. For example, in many cases, in Am, a D or D7 chord might be a bit too much but a Dm or F chord a little too dreary (Am - D is a very "in your face", strident "doriany" chord progression which might not be the effect you want). In this case, an F♯ø allows you to move to a more doriany less morose feeling space in a much more subtle way. "Karma Police" by radiohead does this, the second chord in the first line is F♯ø, but then in the second line it is replaced it with F(sus2), and the second one sounds a little more "grave" and "resigned" than the first (against the same melody).
4) Its sharing of notes with the dominant chord a major 3rd below it can be exploited, either by using it as a substitution for the dominant (boring) or by using it as a pivot chord. In Elvis Costello's Almost Blue he does this; the first time round the Bø as usual goes to E7>Am, but the second time round you get Bø>G7 which leads to C, the relative major. This is a less strong resolution than Dm7>G7>C would be, but doing Am>Bø>G7>C means that you don't "see the G7 coming", it's not flagged up obviously, you just seamlessly shift into the major key from the minor.
5) as a substitution for a minor chord (behaving as an inverted m6 chord) e.g. F Dø C instead of F | F- | C Especially when coming from a m7 chord, as it gives more of a sensation of "movement" so Fm7|Fm6|C sounds quite "static", but | Fm7 | Dø | C | doesn't, mainly because of the root movement.
6) the same as the above, but instead of using that substitution to create a feeling of movement in otherwise static chords, using it as a way to modulate somewhere new using its secondary dominant function. e.g. using F#ø > B7 > Em7 to modulate from A minor or C major to E minor; it's easy to slip in the F#ø since it's essentially the same chord as an Am6, and then sneakily use it to move to Em , like at the beginning of Samba de Orly by Chico Buarque