Pitch detection actions.
For initialization and destruction of ML5 pitch detection, see initialization and destruction.
Methods
# static displayMidi(frequency)
Displays the frequency as a midi value on the piece of music
Parameters:
Name | Type | Description |
---|---|---|
frequency |
number | The frequency to convert and display |
# static isPitchDetectionAvailable() → {boolean}
Checks if pitch detection is available.
As part of the check, also checks if the microphone is available.
Indicates if pitch detection (which includes the microphone) is available
boolean
# static listen()
Listens to the singer updating the stored performance information and drawing real time feedback
# static pageTurn()
Sends performance information to the database for the current page
# static startPitchDetection() → {string}
Continuously detects pitch and displays it on the screen
The id of the current setInterval process (this can be used to stop the current setInterval process)
string
# static stopPitchDetection(sheetMusicId)
Stops the pitch detection
Parameters:
Name | Type | Description |
---|---|---|
sheetMusicId |
string | The id of the sheet music to submit the performance |
# inner pageWatch(currentSectionIndex, currentCount)
Watches the music and turns the page when the performer is close to the end of the current page
Parameters:
Name | Type | Description |
---|---|---|
currentSectionIndex |
number | The starting section index |
currentCount |
number | The starting time position |