Sequence

The song's timeline: an ordered list of tracks and the play, cursor and loop positions.

Declared in src/libs/libbahn/bahn/tracker/sequencer/Sequence.hpp
Group bahn

Detailed description

A Sequence holds one track for each node that has a column in the sequencer, in column order, and one Position. The position holds the play position, the edit cursor, the sequence begin and end, and the loop begin and end.

processParameters() sends the pattern data for the current tick to the nodes. A node with a track gets it through its track. A node with patterns but with no track, for example an effect, gets the row of its first pattern for the current tick.

An edit to the tracks or the positions marks the song as changed.

See also Pattern, SequencerView.

Member function documentation

addTrack

QSharedPointer<bahn::Track> Sequence::addTrack(QSharedPointer<bahn::Node> node)

Give the node node a track, and hand the track back.

The new track is the last column. A null node gets no track, and the return value is null.

A null node is refused rather than wrapped. A track whose node is null crashes the sequencer the moment it is drawn, because drawTracks asks every track for its node's name — and the select-node dialogue can return null when it is dismissed oddly.

It returns the track so a caller can put a pattern on the timeline at once. A track with no entry draws an empty column, which reads as "the track was not added" to anyone who has not been told otherwise.

In this section