Marker

Marker’s parent is Measure.

Read marker informations

use PhpTabs\PhpTabs;

$song = new PhpTabs('my-song.gp5');

// Get first measure's marker
$marker = $song->getTrack(0)
               ->getMeasure(0)
               ->getMarker();

echo sprintf("
Marker
------

title: %s
",

$marker->getTitle()
);

It will ouput something like:

Marker
------

title: My marker title

Write marker informations

$marker->setTitle('Some string');

Color

You may get and set a color.

$color = $marker->getColor();

$marker->setColor($color);

Measure

You may get and set its parent measure.

$measure = $marker->getMeasure();

$marker->setMeasure($measure);

Copy

You may copy all attributes from another marker.

// Copy from another marker
$newMarker>copyFrom($marker);