28 bool operator== (
const MidiNote& other)
const noexcept {
return state == other.state; }
29 bool operator!= (
const MidiNote& other)
const noexcept {
return state != other.state; }
34 BeatPosition getStartBeat() const noexcept {
return startBeat; }
35 BeatPosition getEndBeat() const noexcept {
return startBeat + lengthInBeats; }
36 BeatDuration getLengthBeats() const noexcept {
return lengthInBeats; }
37 BeatRange getRangeBeats() const noexcept {
return { getStartBeat(), getEndBeat() }; }
39 TimePosition getPlaybackTime (NoteEdge,
const MidiClip&,
const GrooveTemplate*)
const;
40 BeatPosition getPlaybackBeats (NoteEdge,
const MidiClip&,
const GrooveTemplate*)
const;
46 BeatPosition getQuantisedEndBeat (
const MidiClip&)
const;
47 BeatPosition getQuantisedEndBeat (
const MidiClip*)
const;
49 BeatDuration getQuantisedLengthBeats (
const MidiClip&)
const;
50 BeatDuration getQuantisedLengthBeats (
const MidiClip*)
const;
56 TimePosition getEditEndTime (
const MidiClip&)
const;
58 TimeDuration getLengthSeconds (
const MidiClip&)
const;
59 TimeRange getEditTimeRange (
const MidiClip&)
const;
61 void setStartAndLength (BeatPosition newStartBeat, BeatDuration newLengthInBeats,
juce::UndoManager*);
63 int getNoteNumber() const noexcept {
return (
int) noteNumber; }
66 int getVelocity() const noexcept {
return (
int) velocity; }
69 int getColour() const noexcept {
return (
int) colour; }
72 bool isMute() const noexcept {
return mute != 0; }
80 friend class MidiList;
81 friend struct NoteChannelAssigner;
83 BeatPosition startBeat;
84 BeatDuration lengthInBeats;
85 uint8_t noteNumber, velocity, colour, mute;
87 void updatePropertiesFromState();
90 MidiNote (
const MidiNote&) =
delete;