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

Method OnKeyPressed

Source/QwertyController.cpp:45–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void QwertyController::OnKeyPressed(int key)
46{
47 if (key >= 0 && key < (int)mPressedKeys.size())
48 {
49 mPressedKeys[key] = true;
50
51 MidiNote note;
52 note.mPitch = key;
53 note.mVelocity = 127.0f;
54 note.mChannel = 0;
55 note.mDeviceName = "keyboard";
56 mListener->OnMidiNote(note);
57 }
58}
59
60void QwertyController::OnKeyReleased(int key)
61{

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80
OnMidiNoteMethod · 0.45

Tested by

no test coverage detected