Class: MIDIFileAspect

MIDIFileAspect(audioContext)

A MIDIFileAspect folds MIDI file and visual classes into a single simplified class.

Constructor

new MIDIFileAspect(audioContext)

Construct a new MIDIFileAspect.
Parameters:
Name Type Description
audioContext object An AudioContext.
Author:
  • Lawrence Fyfe
Source:

Methods

clearTarget()

Clear all zoom-related values and draw the Timeframe.
Source:

draw()

Draw this aspect.
Source:

erase()

Erase this aspect.
Source:

initialize(parentElement, parentWidth, parentHeight)

Initialize this aspect.
Parameters:
Name Type Description
parentElement element The parent element.
parentWidth number The parent width.
parentHeight number The parent height.
Source:

loadFile(file)

Load a MIDI file.
Parameters:
Name Type Description
file file A file.
Source:

saveToSVG()

Save the visual in this aspect to an SVG file.
Source:

startPlaying()

When audio starts playing, set the AudioPane as the active pane.
Source:

stopPlaying()

When audio stops playing, set the VisualPane as the active pane.
Source:

zoomTarget()

Zoom into the specified time range.
Source: