MCPcopy Create free account
hub / github.com/VCVRack/Rack / pressNote

Method pressNote

src/core/MIDI_Gate.cpp:144–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 }
143
144 void pressNote(uint8_t channel, uint8_t note, uint8_t vel) {
145 int c = mpeMode ? channel : 0;
146 // Learn
147 if (learningId >= 0) {
148 setLearnedNote(learningId, note);
149 learningId = -1;
150 }
151 // Find id
152 for (int i = 0; i < 16; i++) {
153 if (learnedNotes[i] == note) {
154 gates[i][c] = true;
155 if (velocityMode == VELOCITY_MODE)
156 velocities[i][c] = vel;
157 trigPulses[i][c].trigger(1e-3f);
158 }
159 }
160 }
161
162 void releaseNote(uint8_t channel, uint8_t note) {
163 int c = mpeMode ? channel : 0;

Callers

nothing calls this directly

Calls 1

triggerMethod · 0.80

Tested by

no test coverage detected