FahlGrahn Audio v1.0.0
Loading...
Searching...
No Matches
SynthVoice.h
1#pragma once
2
3#include "Oscillator.h"
4#include "SynthSound.h"
5
6class SynthVoice : public juce::SynthesiserVoice
7{
8 public:
10 bool canPlaySound(juce::SynthesiserSound *) override;
11 void startNote(int midiNoteNumber, float velocity, juce::SynthesiserSound *sound,
12 int currentPitchWheelPosition) override;
13 void stopNote(float velocity, bool allowTailOff) override;
14 void controllerMoved(int controllerNumber, int newControllerValue) override;
15 void pitchWheelMoved(int newPitchWheelValue) override;
16 void renderNextBlock(juce::AudioBuffer<float> &outputBuffer, int startSample, int numSamples) override;
17 void setOscillatorType(Oscillator::OscType oscType)
18 {
19 oscillator.setType(oscType);
20 }
21
22 // Bring base class method into scope to avoid hiding it
23 using juce::SynthesiserVoice::renderNextBlock;
24
25 private:
26 Oscillator oscillator;
27};
Definition Oscillator.h:6
Definition SynthVoice.h:7