ChordDefinition
in package
Chord definition.
Table of Contents
- $fretOffset : int
- How many frets from the beginning to ignore.
- $frets : int
- Number of frets.
- $marks : array<string|int, ChordMark>
- String marks.
- $notes : array<string|int, ChordNote>
- Notes in the chord.
- $strings : int
- Number of strings.
- __construct() : mixed
- getFretOffset() : int
- getFrets() : int
- getMarks() : iteratable<string|int, ChordMark>
- getNotes() : iteratable<string|int, ChordNote>
- getStrings() : int
- validateFretOffset() : int
- validateFrets() : int
- validateMarks() : array<string|int, mixed>
- validateNotes() : array<string|int, mixed>
- validateStrings() : int
Properties
$fretOffset
How many frets from the beginning to ignore.
private
int
$fretOffset
$frets
Number of frets.
private
int
$frets
This must include ChordDefinition::$fretOffset, i.e. frets must be greater than offset.
$marks
String marks.
private
array<string|int, ChordMark>
$marks
$notes
Notes in the chord.
private
array<string|int, ChordNote>
$notes
$strings
Number of strings.
private
int
$strings
Methods
__construct()
public
__construct(int $strings, int $frets, int $fretOffset, array<string|int, ChordNote> $notes, array<string|int, ChordMark> $marks) : mixed
Parameters
- $strings : int
-
number of strings
- $frets : int
-
number of frets
- $fretOffset : int
-
skipped frets
- $notes : array<string|int, ChordNote>
-
notes
- $marks : array<string|int, ChordMark>
-
string marks
Return values
mixed —getFretOffset()
public
getFretOffset() : int
Return values
int —number of skipped frets
getFrets()
public
getFrets() : int
Return values
int —number of frets
getMarks()
public
getMarks() : iteratable<string|int, ChordMark>
Return values
iteratable<string|int, ChordMark> —string marks
getNotes()
public
getNotes() : iteratable<string|int, ChordNote>
Return values
iteratable<string|int, ChordNote> —notes
getStrings()
public
getStrings() : int
Return values
int —number of strings
validateFretOffset()
private
validateFretOffset(int $fretOffset) : int
Parameters
- $fretOffset : int
Return values
int —validateFrets()
private
validateFrets(int $frets) : int
Parameters
- $frets : int
Return values
int —validateMarks()
private
validateMarks(array<string|int, mixed> $marks) : array<string|int, mixed>
Parameters
- $marks : array<string|int, mixed>
Return values
array<string|int, mixed> —validateNotes()
private
validateNotes(array<string|int, mixed> $notes) : array<string|int, mixed>
Parameters
- $notes : array<string|int, mixed>
Return values
array<string|int, mixed> —validateStrings()
private
validateStrings(int $strings) : int
Parameters
- $strings : int