It's all about getting the direction change of subsequent notes right. Up or Down is all that matters. And the nice bit is that it doesn't matter if you transpose or if you go up too far or down too far for the next note.
You'll note that you need to define a sequence of similar notes as 'down' or 'up' to make it work.