LMMS
Loading...
Searching...
No Matches
juce_MPESynthesiserVoice.h
Go to the documentation of this file.
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//==============================================================================
38{
39public:
40 //==============================================================================
43
45 virtual ~MPESynthesiserVoice();
46
52
56 bool isCurrentlyPlayingNote (MPENote note) const noexcept;
57
62 virtual bool isActive() const { return currentlyPlayingNote.isValid(); }
63
65 bool isPlayingButReleased() const noexcept;
66
70 virtual void noteStarted() = 0;
71
84 virtual void noteStopped (bool allowTailOff) = 0;
85
90 virtual void notePressureChanged() = 0;
91
99 virtual void notePitchbendChanged() = 0;
100
105 virtual void noteTimbreChanged() = 0;
106
114 virtual void noteKeyStateChanged() = 0;
115
131 virtual void renderNextBlock (AudioBuffer<float>& outputBuffer,
132 int startSample,
133 int numSamples) = 0;
134
140 virtual void renderNextBlock (AudioBuffer<double>& /*outputBuffer*/,
141 int /*startSample*/,
142 int /*numSamples*/) {}
143
152 virtual void setCurrentSampleRate (double newRate) { currentSampleRate = newRate; }
153
158
163
164protected:
165 //==============================================================================
179
180 //==============================================================================
181 double currentSampleRate = 0.0;
183
184private:
185 //==============================================================================
186 friend class MPESynthesiser;
187
189};
190
191} // namespace juce
#define noexcept
Definition DistrhoDefines.h:72
Definition juce_AudioSampleBuffer.h:34
void clearCurrentNote() noexcept
Definition juce_MPESynthesiserVoice.cpp:45
virtual void renderNextBlock(AudioBuffer< float > &outputBuffer, int startSample, int numSamples)=0
virtual void noteTimbreChanged()=0
virtual void setCurrentSampleRate(double newRate)
Definition juce_MPESynthesiserVoice.h:152
MPENote getCurrentlyPlayingNote() const noexcept
Definition juce_MPESynthesiserVoice.h:51
virtual void noteStarted()=0
double getSampleRate() const noexcept
Definition juce_MPESynthesiserVoice.h:157
uint32 noteOnTime
Definition juce_MPESynthesiserVoice.h:162
MPESynthesiserVoice()
Definition juce_MPESynthesiserVoice.cpp:26
double currentSampleRate
Definition juce_MPESynthesiserVoice.h:181
virtual void noteStopped(bool allowTailOff)=0
virtual void notePitchbendChanged()=0
MPENote currentlyPlayingNote
Definition juce_MPESynthesiserVoice.h:182
virtual void notePressureChanged()=0
virtual bool isActive() const
Definition juce_MPESynthesiserVoice.h:62
virtual void noteKeyStateChanged()=0
friend class MPESynthesiser
Definition juce_MPESynthesiserVoice.h:186
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
#define JUCE_API
Definition juce_StandardHeader.h:152
Definition carla_juce.cpp:31
unsigned int uint32
Definition juce_MathsFunctions.h:45
Definition juce_MPENote.h:40
#define const
Definition zconf.h:137