Chord placement to follow; need not be pre-sorted. Each segment's chord may be written as a chord symbol as well as given as chord data.
Key/scale context, used for diatonic approach tones in walking. A key
name such as 'C major' is read as that key.
OptionaltsTime signature; used for metric accents.
OptionalstyleBass-line idiom.
OptionaloctaveTarget register as a base MIDI octave; roots land around octave*12+12.
An octave pickup in the pop style may drop a note into the octave below
that band, which is where such a pickup belongs, or take the octave above
instead on an instrument with nothing below the band to drop into.
OptionalinstrumentThe instrument the line is written for. Giving one is itself the request
that the line be playable on it: octave then says where in that
instrument to aim rather than which absolute band to use, and where the two
disagree the instrument wins — a note below the lowest string comes back an
octave up, the way a player would take it. Leave it out for a programmed
part, which is generated exactly as before.
OptionalctxThe generation context. Its complexity.rhythmic sets how often the pop
style takes a weak-beat pickup, its instruments.bass names the instrument
when instrument does not, its bpm together with
complexity.difficulty keeps leaps the hand could not make in time out of
the line, and its seed fixes every deterministic choice the line makes.
OptionalbudgetMaximum number of segments, and of notes, generateBassLine may work through. The line is built segment by segment, so this is the guard against an unbounded caller rather than a limit on any search.
Options controlling generateBassLine.