Class: PatternController

MusicXMLAnalyzer. PatternController

new PatternController()

Source:

Methods

<inner> addNote()

Method adds a note to pattern by click on button if pattern.length < 12
Source:

<inner> addNoteByCanvasClick(note)

Method adds a note to pattern by click on canvas if pattern.length < 12
Parameters:
Name Type Description
note Vex.Flow.StavNote the note that should be added
Source:

<inner> changeAccidential(val)

Method changes current accidential
Parameters:
Name Type Description
val string accidential name
Source:

<inner> changeDuration(val)

Method changes current note duration
Parameters:
Name Type Description
val string note duration
Source:

<inner> changeMode(val)

Method changes current mode
Parameters:
Name Type Description
val number mode name
Source:

<inner> changeNote(val)

Method changes current note
Parameters:
Name Type Description
val string note name
Source:

<inner> changeOctave(val)

Method changes current octave
Parameters:
Name Type Description
val string current octave
Source:

<inner> changeSpecialRyth(val)

Method changes current special rhythm
Parameters:
Name Type Description
val string special rhythm
Source:

<inner> getCurrentMode() → {string}

Method returns the current mode
Source:
Returns:
currentMode
Type
string

<inner> getDuration(type)

Function to get Duration of Notes
Parameters:
Name Type Description
type string The note type
Source:

<inner> getMidiValue(step, octave, alter) → {number}

Method to get MIDI-Values
Parameters:
Name Type Description
step string The note step
octave string The notes octave
alter string The alter value
Source:
Returns:
The MIDI value
Type
number

<inner> init()

Init method of PatternController
Source:

<inner> onAccidentialSelectionChange(event, selectedAcc)

Method updates accidential selection
Parameters:
Name Type Description
event event update event
selectedAcc string the selected accidential
Source:

<inner> onCanvasClear()

Method clears the canvas
Source:

<inner> onDurationSelectionChange(event, selectedDur)

Method updates duration selection
Parameters:
Name Type Description
event event update event
selectedDur string the selected duration
Source:

<inner> onNotationViewUpdate(event, vexflowNotes)

Method updates notes in notationView
Parameters:
Name Type Description
event event update event
vexflowNotes Array.<Vex.Flow.StaveNote> The current notes
Source:

<inner> onNoteNameSelectionChange(event, selectedNoteName)

Method updates note selection
Parameters:
Name Type Description
event event update event
selectedNoteName string the selected note name
Source:

<inner> onOctaveSelectionChange(event, selectedOctave)

Method updates octave selection
Parameters:
Name Type Description
event event update event
selectedOctave string the selected octave
Source:

<inner> onPatternChange(event, pattern)

Method changes state of SearchPatternButton
Parameters:
Name Type Description
event event The triggered event
pattern object The current configured patter
Source:

<inner> onSpecRythSelectionChange(event, selectedSpecRyth)

Method updates rhythm selection
Parameters:
Name Type Description
event event update event
selectedSpecRyth string the selected rhythmic special
Source:

<inner> onTripletEnterModeEnd()

Method ends triplet input
Source:

<inner> onTripletEnterModeStart()

Method enables triplet input
Source:

<inner> onViewChangedToCurrentMode(event, mode)

Method changes current mode
Parameters:
Name Type Description
event event The triggered event
mode int The selected mode
Source:

<inner> playPattern()

Method to play the created Pattern
Source:

<inner> removeLastNote()

Method removes last element on canvas
Source: