The line: a motif, or plain note events. Notes that never sound are dropped, and notes sharing an onset are folded to their top voice.
The directions, the shape, the peak and trough, and a rationale. A line with no sounding notes is static with a range of 0, and its peak and trough are -1: there is no note for them to point at.
Read the shape of a line.
The step directions are the literal answer; the shape is what they add up to. A line is called ascending or descending when most of its motion runs one way, not only when every step does — a climb with one dip in it is still heard as a climb — and an arch when it rises to an interior peak and comes back down. Anything that keeps changing direction is a wave, and a line that does not move is static.
The line is expected to be monophonic, as analyzeVoice expects a voice to be; split polyphonic material into lines first. Notes struck together are read as one event, the highest of them standing for it — a chord and the note after it trace one step, not a climb through the chord — so a piano part read whole answers for its top voice rather than for a line no one plays.