\SearchController

Controller for analysis of uploads

Summary

Methods
Properties
Constants
search()
No public properties found
No constants found
setupLayout()
No protected properties found
N/A
_countIntervals()
_determineArtist()
_determineTitle()
_determineInstruments()
_countNoteTypes()
_determineMeter()
_determineKey()
_determineClef()
_countMeasures()
_countRests()
_countNotes()
_countNoteValues()
_determineMostFrequentNote()
No private properties found
N/A

Methods

search()

search() : \Illuminate\Http\RedirectResponse

Search function for automatic analysis of xml files

Returns

\Illuminate\Http\RedirectResponse —

Redirect to dashboard

setupLayout()

setupLayout() : void

Setup the layout used by the controller.

_countIntervals()

_countIntervals(\SimpleXMLElement  $xml) : array

Helper function to count intervals in a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

array —

interval array containing the frequency of intervals in a xml file

_determineArtist()

_determineArtist(\SimpleXMLElement  $xml) : string

Helper function to determine the artist/composer a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

string —

name of the artist (if available)

_determineTitle()

_determineTitle(\SimpleXMLElement  $xml) : string

Helper function to determine the title in a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

string —

title of the xml file

_determineInstruments()

_determineInstruments(\SimpleXMLElement  $xml) : array

Helper function to determine the instruments in a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

array —

instruments array containing the instruments taking part in a xml file

_countNoteTypes()

_countNoteTypes(\SimpleXMLElement  $xml) : array

Helper function to count note-length frequency in a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

array —

note-length array containing the frequency of note-lengths in a xml file

_determineMeter()

_determineMeter(\SimpleXMLElement  $xml) : string

Helper function to determine the start meter in a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

string —

the start meter of the given file

_determineKey()

_determineKey(\SimpleXMLElement  $xml) : array

Helper function to determine the frequency of keys in a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

array —

key array containing the frequency of keys in a xml file

_determineClef()

_determineClef(\SimpleXMLElement  $xml) : array

Helper function to determine the clef in a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

array —

clef array containing the frequency of clefs in a xml file

_countMeasures()

_countMeasures(\SimpleXMLElement  $xml) : integer

Helper function to count measures in a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

integer —

number of measures in a given xml file

_countRests()

_countRests(\SimpleXMLElement  $xml) : integer

Helper function to count rests in a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

integer —

number of rests in a given xml file

_countNotes()

_countNotes(\SimpleXMLElement  $xml) : \in

Helper function to count notes in a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

\in —

number of notes in a given xml file

_countNoteValues()

_countNoteValues(\SimpleXMLElement  $xml) : array

Helper function to count note values in a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

array —

notes array containing the frequency of note values in a xml file

_determineMostFrequentNote()

_determineMostFrequentNote(\SimpleXMLElement  $xml) : string

Helper function to determine the most frequent note in a given \SimpleXMLElement file

Parameters

\SimpleXMLElement $xml

uploaded user file

Returns

string —

name of the most frequent note in a given xml file