Browse Source

made the simple abc render more compact

master^2
Cerys Lewis 2 weeks ago
parent
commit
f4eeb66e7c
  1. 21
      App/Dataclasses/DatabaseFolkTuneDetails.php

21
App/Dataclasses/DatabaseFolkTuneDetails.php

@ -65,15 +65,18 @@ K: {$this->Parts[$counter]->KeySignature}";
public function BuildSimple(): string
{
$builder = "X: {$this->ID}
L: 1/4";
$builder .= "
$notation = $this->Parts[0]->ABCNotation;
$notation = preg_replace(
pattern: "/\r|\n/",
replacement: "",
subject: $notation
);
return "
X: {$this->ID}
L: 1/4
K: {$this->Parts[0]->KeySignature}
M: {$this->Parts[0]->TimeSignature}";
$builder .= "
{$this->Parts[0]->ABCNotation}";
return $builder;
M: {$this->Parts[0]->TimeSignature}
{$notation}";
}
}
Loading…
Cancel
Save