теперь работает MIDI Pitch Bend с диапазоном +- 2 полутона
This commit is contained in:
+10
-3
@@ -16,7 +16,11 @@ class Voice{
|
||||
public:
|
||||
Voice(){
|
||||
note = 0;
|
||||
|
||||
envelope_value = 0.0;
|
||||
pan = 0.0;
|
||||
base_frequency = 440.0;
|
||||
multiplier_ = 1.0;
|
||||
|
||||
active = false;
|
||||
}
|
||||
@@ -24,11 +28,15 @@ class Voice{
|
||||
void note_on(uint8_t note, uint8_t velocity);
|
||||
void note_off();
|
||||
void set_pan(double value);
|
||||
void set_pitch_bend(double multiplier);
|
||||
|
||||
StereoSample generate();
|
||||
|
||||
double get_volume() const;
|
||||
|
||||
bool is_active() const;
|
||||
bool is_playing(uint8_t note_) const;
|
||||
bool is_released() const;
|
||||
|
||||
private:
|
||||
Envelope envelope;
|
||||
@@ -38,11 +46,10 @@ class Voice{
|
||||
|
||||
double envelope_value;
|
||||
double pan;
|
||||
double base_frequency;
|
||||
double multiplier_;
|
||||
|
||||
bool active;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user