https://www.songsterr.com/a/wsa/trivium-like-light-to-the-flies-tab-s20144t1 (Posted a tab so you can hear the guitar without vocals at measure 34 on Lead guitar) How can the tritone (Last note in bar 34) sound quite pleasing and not dissonant at all?
The tritone steps from the major scale's 7th degree up to the 4th degree note in the next octave, a common interval. If there was a dominant seventh chord i.e. V7 backing that melody interval, the jump would be from the chord's third to its seventh note, outlining the chord nicely. There's actually a vi minor, but the melody line still outlines a dominant seventh on top of it, so instead of the "vi - IV" line there's a ghost of a V in between. Try comping bars 34-35 as "Dm - C7 - Bb - Bb" instead of just "Dm - Dm - Bb - Bb", and the ghost becomes visible. The tritone you're asking about can be seen as E and Bb from the C7 chord. Try it, take any song with a C7 accompaniment chord and play it just with the notes E and Bb - it works just as well.
Feelings of consonance and dissonance are subjective and dependent on musical and cultural context. Tritones can sound just fine.
A good melody carries an outline of possible chord progressions with it. :) In your example song, bar 35 begins with a long Bb note, and accompanying it with a Bb chord is an easy choice, but not the only one. The E - Bb tritone notes could be seen as outlining a Gm6/E chord just as well. For bars 34-35, try accompanying the melody with these chords instead: | Dm Dm | Gm6/E A7 | Or if you do something like | Dm C | Eb A7 | then the tritone is split in half, the E belonging to the C major chord, and Bb to the Eb major chord.