MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / ImHandleNoteOn

Function ImHandleNoteOn

TheForceEngine/TFE_Jedi/IMuse/imuse.cpp:2277–2297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2275 }
2276
2277 void ImHandleNoteOn(ImMidiChannel* channel, s32 instrumentId, s32 velocity)
2278 {
2279 if (!channel) { return; }
2280
2281 u32 channelMask = c_channelMask[channel->channelId];
2282 if (channel->instrumentMask[instrumentId] & channelMask)
2283 {
2284 ImNoteOff(channel->channelId, instrumentId);
2285 }
2286 else
2287 {
2288 if (channel->instrumentMask2[instrumentId] & channelMask)
2289 {
2290 channel->instrumentMask2[instrumentId] &= ~channelMask;
2291 ImNoteOff(channel->channelId, instrumentId);
2292 }
2293 }
2294
2295 channel->instrumentMask[instrumentId] |= channelMask;
2296 ImNoteOn(channel->channelId, instrumentId, velocity);
2297 }
2298
2299 void ImMidi_DrumOut_NoteOn(s32 priority, s32 partNoteReq, s32 volume, s32 instrumentId, s32 velocity)
2300 {

Callers 1

ImMidiNoteOnFunction · 0.85

Calls 2

ImNoteOffFunction · 0.85
ImNoteOnFunction · 0.85

Tested by

no test coverage detected