Class: ResultView

MusicXMLAnalyzer. ResultView

new ResultView()

Source:

Methods

<inner> addImageToDOM(index, dataURI)

Method adds image to dom
Parameters:
Name Type Description
index int counter
dataURI string uri to image data
Source:

<inner> addLogMessage(msg)

Adds a log message
Parameters:
Name Type Description
msg string log message
Source:

<inner> calculateDimensions()

Method to calculate width & height for resizing images (pdf donwload)
Source:

<inner> checkNextNotes(pattern, note, i, j) → {Vex.Flow.Note}

Method checks if the following note belongs to current chord Also handles highlighting of chords in results
Parameters:
Name Type Description
pattern object array containing notes
note Vex.Flow.Note the current vexflow note
i int counter of the current measure
j int counter of the current note
Source:
Returns:
Returns a vexflow compatible note object
Type
Vex.Flow.Note

<inner> disposeLogMessages()

Disposes log messages
Source:

<inner> generateExportPdf()

Method generates pdf export
Source:

<inner> generateVexflowNotes(pattern, result)

Method generates vexflow notes
Parameters:
Name Type Description
pattern object the user pattern
result object search result
Source:

<inner> getDurationIn64th(duration) → {number}

Method converts duration from string to number values as 1/64
Parameters:
Name Type Description
duration string string of note duration
Source:
Returns:
duration value as number
Type
number

<inner> getVexflowDuration(duration, type) → {string}

Method returns the note duration in vexflow style
Parameters:
Name Type Description
duration string duration of note
type number type of note (0 = note, 1 = rest, 2 = dotted note)
Source:
Returns:
duration for vexflow
Type
string

<inner> getVexflowKey(step, octave, alter) → {string}

Method returns key description for vexflow
Parameters:
Name Type Description
step string note name
octave string octave number
alter string accidential of the note
Source:
Returns:
key description for vexflow
Type
string

<inner> init()

Init function
Source:

<inner> initLogMessages()

Inits the log messages
Source:

<inner> initPatternCanvas(pattern)

Method renders pattern canvas above result carousel
Parameters:
Name Type Description
pattern object user created pattern
Source:

<inner> initResultItems()

Method inits result items
Source:

<inner> onListItemClick(event)

Gets called when a list item has been clicked
Parameters:
Name Type Description
event Event the triggered click event
Source:

<inner> prepareExport()

Method prepares pdf export
Source:

<inner> renderNotes(measures, canvas, context, pattern)

Method renders result extract
Parameters:
Name Type Description
measures array array containing the measures of result extract
canvas object the canvas proportions
context canvas the canvas context
pattern object the user pattern
Source:

<inner> renderResultExtract(index, data)

Method renders result extract
Parameters:
Name Type Description
index int counter
data object contains information about extract position
Source:

<inner> resizedataURL(datas, wantedWidth, wantedHeight, index)

Method creates images from carousel data
Parameters:
Name Type Description
datas URI carousel image uri
wantedWidth float width of the image
wantedHeight float height of the image
index int counter
Source:

<inner> setModelReady()

Method preapares model export
Source: