- prepared Midiclock sync of voices

- buttonLed has flash() has brightness

git-svn-id: http://moon:8086/svn/software/trunk/projects/JaySynth@716 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2020-08-06 12:09:37 +00:00
parent eecd6c5005
commit 840b7a3427
8 changed files with 144 additions and 62 deletions
+15 -3
View File
@@ -87,6 +87,8 @@ public:
const float velocity, bool doTrigger);
void Voicestop (JaySynthVoice* voice, const bool allowTailOff);
void voiceSetMidiBpm(synth_float_t bpm);
void voiceSetMidiBeat(int beatcount);
int getNumVoicesPlaying (SynthesiserSound* soundToPlay);
void clearKeysPressed(void);
@@ -175,6 +177,12 @@ public:
} midi_note_info_t;
typedef struct _smidi_quarter_clock_info_t
{
uint32_t type;
uint32_t bpm;
} midi_quarter_clock_info_t;
midiCC_info_t* getLastMidiCC_infos(void)
{
return last_midiCC_info;
@@ -246,11 +254,15 @@ private:
JaySynthThread **m_ppAudioThread;
WaitableEvent **m_ppEventAudioThreadRdy;
JaySynthMonophonicMGR m_monoMGR;
uint32_t m_clockdiv;
const int m_numMidiclocksPerQuarterNote = 24;
const int m_numMidiclocksPerFourQuarterBeats = 4*m_numMidiclocksPerQuarterNote;
int m_clock_cnt_bar;
int m_numMidiClocksPerBeat;
int m_numMidiClocksPerBar;
double m_lastTime_ms;
double m_lastTimeError_ms;
double m_estimatedTime_ms;
bool m_isMidiClockStarted;
void updateMidiTiming(const MidiMessage& m);
};