|
Gin
|
Displays the contents of a MidiFilePlayer as a piano roll view. More...
#include <gin_midifilecomponent.h>
Inherits juce::Component, juce::Timer, and juce::FileDragAndDropTarget.
Public Types | |
| enum | ColourIds { backgroundColourId = 0x1292e10 , noteColourId = 0x1292e11 , playheadColourId = 0x1292e12 , outlineColourId = 0x1292e13 , dropHighlightColourId = 0x1292e14 } |
Public Member Functions | |
| MidiFileComponent (MidiFilePlayer &player) | |
| ~MidiFileComponent () override | |
| void | paint (juce::Graphics &g) override |
| void | timerCallback () override |
| bool | isInterestedInFileDrag (const juce::StringArray &files) override |
| void | fileDragEnter (const juce::StringArray &files, int x, int y) override |
| void | fileDragExit (const juce::StringArray &files) override |
| void | filesDropped (const juce::StringArray &files, int x, int y) override |
Public Attributes | |
| std::function< void()> | onFileDropped |
| Called when a file is loaded via drag & drop. | |
| std::function< void()> | onPlaybackStateChanged |
| Called when playback state changes (started, stopped, or reached end). | |
Displays the contents of a MidiFilePlayer as a piano roll view.
MidiFileComponent renders MIDI notes from a MidiFilePlayer as horizontal bars on a piano roll style display. It also shows a playhead indicating the current playback position.
Key Features:
Usage:
| MidiFileComponent::MidiFileComponent | ( | MidiFilePlayer & | player | ) |
|
override |
|
override |
|
override |
| std::function<void()> MidiFileComponent::onFileDropped |
Called when a file is loaded via drag & drop.
| std::function<void()> MidiFileComponent::onPlaybackStateChanged |
Called when playback state changes (started, stopped, or reached end).