73 void setVelocity (
float velocity,
bool useMousePositionForVelocity);
87 void setMidiChannel (
int midiChannelNumber);
106 void setMidiChannelsToDisplay (
int midiChannelMask);
118 void clearKeyMappings();
128 void setKeyPressForNote (
const KeyPress& key,
int midiNoteOffsetFromC);
134 void removeKeyPressForNote (
int midiNoteOffsetFromC);
145 void setKeyPressBaseOctave (
int newOctaveNumber);
157 whiteNoteColourId = 0x1005000,
158 blackNoteColourId = 0x1005001,
159 keySeparatorLineColourId = 0x1005002,
160 mouseOverKeyOverlayColourId = 0x1005003,
161 keyDownOverlayColourId = 0x1005004,
162 textLabelColourId = 0x1005005,
163 shadowColourId = 0x1005006
175 bool isDown,
bool isOver,
Colour lineColour,
Colour textColour);
185 bool isDown,
bool isOver,
Colour noteFillColour);
196 virtual bool mouseDownOnKey (
int midiNoteNumber,
const MouseEvent& e);
205 virtual bool mouseDraggedToKey (
int midiNoteNumber,
const MouseEvent& e);
211 virtual void mouseUpOnKey (
int midiNoteNumber,
const MouseEvent& e);
219 virtual String getWhiteNoteText (
int midiNoteNumber);
235 void timerCallback()
override;
237 bool keyStateChanged (
bool isKeyDown)
override;
239 bool keyPressed (
const KeyPress&)
override;
241 void focusLost (FocusChangeType)
override;
243 void colourChanged()
override;
255 void resetAnyKeysInUse();
256 void updateNoteUnderMouse (
Point<float>,
bool isDown,
int fingerNum);
257 void updateNoteUnderMouse (
const MouseEvent&,
bool isDown);
258 void repaintNote (
int midiNoteNumber);
262 int midiChannel = 1, midiInChannelMask = 0xffff;
263 int keyMappingOctave = 6;
265 float velocity = 1.0f;
266 bool useMousePositionForVelocity =
true;
271 BigInteger keysPressed, keysCurrentlyDrawnDown;
Holds a resizable array of primitive or copy-by-value objects.
An arbitrarily large integer class.
Represents a colour, also including a transparency value.
A graphics context, used for drawing a component or image.
Represents a key press, including any modifier keys that are needed.
A base class for drawing a custom MIDI keyboard component.
Orientation
The direction of the keyboard.
A component that displays a piano keyboard, whose notes can be clicked on.
ColourIds
A set of colour IDs to use to change the colour of various aspects of the keyboard.
int getMidiChannelsToDisplay() const noexcept
Returns the current set of midi channels represented by the component.
int getMidiChannel() const noexcept
Returns the midi channel that the keyboard is using for midi messages.
Receives events from a MidiKeyboardState object.
Represents a piano keyboard, keeping track of which keys are currently pressed.
Contains position and status information about a mouse event.
A pair of (x, y) coordinates.
Manages a rectangle and allows geometric operations to be performed on it.
Makes repeated callbacks to a virtual method at a specified time interval.