OpenShot Audio Library | OpenShotAudio 0.4.0
Loading...
Searching...
No Matches
juce_MPENote.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23namespace juce
24{
25
26//==============================================================================
39struct JUCE_API MPENote
40{
41 //==============================================================================
44 {
45 off = 0,
46 keyDown = 1,
49 };
50
51 //==============================================================================
72 MPENote (int midiChannel,
73 int initialNote,
74 MPEValue velocity,
75 MPEValue pitchbend,
76 MPEValue pressure,
77 MPEValue timbre,
78 KeyState keyState = MPENote::keyDown) noexcept;
79
86 MPENote() noexcept;
87
89 bool isValid() const noexcept;
90
91 //==============================================================================
92 // Invariants that define the note.
93
98 uint16 noteID = 0;
99
103 uint8 midiChannel = 0;
104
108 uint8 initialNote = 0;
109
110 //==============================================================================
111 // The five dimensions of continuous expressive control
112
117
129
134
139
145
153
154 //==============================================================================
165
170
171 //==============================================================================
175 double getFrequencyInHertz (double frequencyOfA = 440.0) const noexcept;
176
178 bool operator== (const MPENote& other) const noexcept;
179
181 bool operator!= (const MPENote& other) const noexcept;
182};
183
184} // namespace juce
static MPEValue centreValue() noexcept
static MPEValue minValue() noexcept
MPEValue noteOnVelocity
MPEValue timbre
MPEValue pitchbend
MPEValue pressure
MPEValue initialTimbre
double totalPitchbendInSemitones
MPEValue noteOffVelocity
KeyState keyState
MPENote(int midiChannel, int initialNote, MPEValue velocity, MPEValue pitchbend, MPEValue pressure, MPEValue timbre, KeyState keyState=MPENote::keyDown) noexcept