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

Method Step

Source/PulseTrain.cpp:138–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void PulseTrain::Step(double time, float velocity, int flags)
139{
140 if (!mEnabled)
141 return;
142
143 const bool isReset = (flags & kPulseFlag_Reset);
144 if (isReset)
145 mStep = 0;
146
147 if (mStep >= mLength)
148 return;
149
150 if (mStep < mLength)
151 {
152 float v = mVels[mStep] * velocity;
153
154 int new_flags = 0;
155 if (mResetOnStart && mStep == 0)
156 new_flags = kPulseFlag_Reset;
157
158 if (v > 0)
159 {
160 DispatchPulse(GetPatchCableSource(), time, v, new_flags);
161
162 if (mStep < kMaxSteps)
163 DispatchPulse(mStepCables[mStep], time, v, new_flags);
164 }
165 }
166
167 if (mStep < mLength)
168 mVelocityGrid->SetHighlightCol(time, mStep);
169 else
170 mVelocityGrid->SetHighlightCol(time, -1);
171
172 ++mStep;
173}
174
175void PulseTrain::GetModuleDimensions(float& width, float& height)
176{

Callers

nothing calls this directly

Calls 1

SetHighlightColMethod · 0.45

Tested by

no test coverage detected