mirror of
https://github.com/yokemura/Magical8bitPlug2.git
synced 2025-11-11 07:44:17 -05:00
Added code
This commit is contained in:
49
Source/TonalVoice.h
Normal file
49
Source/TonalVoice.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
TonalVoice.h
|
||||
Created: 11 Nov 2019 9:36:34pm
|
||||
Author: 除村 武志
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "BaseVoice.h"
|
||||
|
||||
struct TonalVoice : public BaseVoice // The base for Pulse and Triangle
|
||||
{
|
||||
|
||||
TonalVoice (SettingRefs* sRefs);
|
||||
float voltageForAngle (double angle) override = 0;
|
||||
|
||||
// Vibrato
|
||||
double vibratoPhase = 0;
|
||||
double vibratoPhaseDelta = 0;
|
||||
|
||||
// BendState
|
||||
double currentBendAmount = 0;
|
||||
|
||||
// Auto Bend
|
||||
double currentAutoBendAmount = 0;
|
||||
double autoBendDelta = 0;
|
||||
|
||||
// Vibrato
|
||||
int vibratoCount;
|
||||
double currentModWheelValue;
|
||||
double getVibratoPhase();
|
||||
|
||||
// Custom Pitch/Note states
|
||||
int currentPitchSequenceFrame = 0;
|
||||
|
||||
void startNote (int midiNoteNumber, float velocity,
|
||||
SynthesiserSound*, int currentPitchWheelPosition) override;
|
||||
void advanceControlFrame() override;
|
||||
void calculateAngleDelta() override;
|
||||
void pitchWheelMoved (int) override;
|
||||
void controllerMoved (int, int) override;
|
||||
|
||||
double noteNoToHeltzDouble (double noteNoInDouble, const double frequencyOfA = 440);
|
||||
|
||||
void onFrameAdvanced() override;
|
||||
};
|
||||
Reference in New Issue
Block a user