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

Method DrawModule

Source/NoteStrummer.cpp:55–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void NoteStrummer::DrawModule()
56{
57 if (Minimized() || IsVisible() == false)
58 return;
59
60 mStrumSlider->Draw();
61
62 int numNotes = (int)mNotes.size();
63 int i = 0;
64 for (auto pitch : mNotes)
65 {
66 float pos = float(i + .5f) / numNotes;
67 DrawTextNormal(NoteName(pitch), mStrumSlider->GetPosition(true).x + pos * mStrumSlider->IClickable::GetDimensions().x, mStrumSlider->GetPosition(true).y + mStrumSlider->IClickable::GetDimensions().y + 12);
68 ++i;
69 }
70}
71
72void NoteStrummer::PlayNote(double time, int pitch, int velocity, int voiceIdx, ModulationParameters modulation)
73{

Callers

nothing calls this directly

Calls 5

DrawTextNormalFunction · 0.85
NoteNameFunction · 0.85
sizeMethod · 0.80
DrawMethod · 0.45
GetPositionMethod · 0.45

Tested by

no test coverage detected