The Devil's Orchard is a track from Opeth's latest album Heritage that's played in standard tuning. After the progressive and atmospheric intro, Opeth deliver this finger-twisting, yet catchy riff. The phrase ascends through the E Lydian mode and then descends a G# diminished 7 arpeggio. The hardest thing about it is maintaining consistent timing and a smooth delivery.
Aim to play both your picked notes and your hammer-ons at the same volume, as this helps to achieve the required fluidity. It's tempting to speed up during the fast hammer-on/pull-off sequence on the fourth string, but resist, because this will ruin the relaxed feel. Use your fourth and first fingers for each stage of the descending G# diminished arpeggio. This provides a comfortable pattern and will also position you to loop the riff from the start.
Get the sound
A guitar fitted with a humbucker is best to get the rich sound of this riff, but the tone is relatively clear and doesn't require a large amount of distortion. Try setting the gain lower on the amp and rolling your guitar's volume control back. This will clean up the sound while adding clarity and warmth to the intricate parts of the riff.