Constructor
# new TexLoaded(typeOfTex, partNames, clefs, myPart, id, measureStart, measureEnd, sheetMusicId)
Creates a new TexLoaded
Parameters:
Name | Type | Description |
---|---|---|
typeOfTex |
string | The type of AlphaTex that is loaded. TODO: Should probably be replaced by an enum |
partNames |
Array.<string> | The parts that can be selected from the sheet music |
clefs |
Array.<string> | Clefs per staff for the sheet music |
myPart |
string | The name of the user's part |
id |
string | Can be null, if not null then the ID of the Exercise that is loaded TODO: Rename property to more useful name |
measureStart |
number | The start measure number of the loaded AlphaTex |
measureEnd |
number | The end measure number of the loaded AlphaTex |
sheetMusicId |
string | The ID of the sheet music that the AlphaTex is tied to. TODO: Get this from state if possible and remove property |
Members
Methods
# getStartOctave() → {number}
Get the start octave of the loaded part
The start octave of the loaded part
number
# setFirstMeasurePosition()
Sets the first measure position based on the cursor bar
# setMeasureLengths(measureLengths, barCount)
Create section lengths of the given size out of the sheet music
Parameters:
Name | Type | Description |
---|---|---|
measureLengths |
Array.<number> | The lengths of each measure in seconds |
barCount |
number | The size of each section |
# update(typeOfTex, partNames, clefs, myPart, id, measureStart, measureEnd)
Updates information about the loaded AlphaTex
Parameters:
Name | Type | Description |
---|---|---|
typeOfTex |
string | The type of AlphaTex that is loaded. |
partNames |
Array.<string> | The parts that can be selected from the sheet music |
clefs |
Array.<string> | Clefs per staff for the sheet music |
myPart |
string | The name of the user's part |
id |
string | Can be null, if not null then the ID of the Exercise that is loaded |
measureStart |
number | The start measure number of the loaded AlphaTex |
measureEnd |
number | The end measure number of the loaded AlphaTex |
# updateCurrentTrackIndexes(trackIndex)
Update the loaded track
Parameters:
Name | Type | Description |
---|---|---|
trackIndex |
number | The new loaded track index |
# updateLengthsPerSection(measureStart, measureEnd, barCount)
Updates the section lengths within the provided bounds of the provided size.
TODO: Merge functionality with setMeasureLengths
Parameters:
Name | Type | Description |
---|---|---|
measureStart |
number | The starting measure number |
measureEnd |
number | The ending measure number |
barCount |
number | The size of each section |