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