MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / OnTimeEvent

Method OnTimeEvent

Source/Metronome.cpp:82–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void Metronome::OnTimeEvent(double time)
83{
84 int step = TheTransport->GetQuantized(time, mTransportListenerInfo);
85 if (step == 0)
86 {
87 mPhaseInc = GetPhaseInc(880);
88 mOsc.Start(gTime, 1, 0, 100, 0, 0);
89 }
90 else if (step == 2)
91 {
92 mPhaseInc = GetPhaseInc(480);
93 mOsc.Start(gTime, 1, 0, 70, 0, 0);
94 }
95 else
96 {
97 mPhaseInc = GetPhaseInc(440);
98 mOsc.Start(gTime, .8f, 0, 50, 0, 0);
99 }
100}
101
102void Metronome::DrawModule()
103{

Callers

nothing calls this directly

Calls 3

GetPhaseIncFunction · 0.85
GetQuantizedMethod · 0.80
StartMethod · 0.45

Tested by

no test coverage detected