Skip to content

Marker

Markers are used to mark times and control piano roll behavior (such as time signatures and scale highlighting).

Marker

Represents a marker in the FL Studio piano roll.

time property writable

time: int

Time at which the marker is placed (in ticks).

name property writable

name: str

Name of the marker.

Note that for markers that have an associated action, this won't be displayed to the user.

mode property writable

mode: int

Action associated with the marker.

Possible values
  • 0: no action.

  • 6: pattern length.

  • 8: time signature (numerator and denominator can be accessed from properties tsnum and tsden, respectively).

  • 9: start recording.

  • 10: stop recording.

  • 12: key/scale (key and scale helper can be accessed from properties scale_root and scale_helper, respectively).

tsnum property writable

tsnum: int

Numerator of a time signature marker.

tsden property writable

tsden: int

Denominator of a time signature marker.

scale_root property writable

scale_root: int

Root note of the scale of a key/scale marker, where C is note 0.

scale_helper property writable

scale_helper: str

Notes that are highlighted in the piano roll, as a comma-separated list of boolean integers.

For example, if C, D and Eb were highlighted, the elements would be:

>>> marker.scale_helper
'1,0,1,1,0,0,0,0,0,0,0,0'

To parse this into a more Pythonic form, you could use the following code:

>>> [n == '1' for n in marker.scale_helper.split(',')]
[True, False, True, True, False, False, False, False, False, False, False, False]

To assign this value in a more pythonic form, you could use the following code:

>>> scale = [True, False, True, True, False, False, False, False, False, False, False, False]
>>> marker.scale_helper = ",".join(str(int(v)) for v in scale)