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

Function ImMidiNoteOn

TheForceEngine/TFE_Jedi/IMuse/imuse.cpp:2200–2220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2198 }
2199
2200 void ImMidiNoteOn(ImMidiPlayer* player, u8 channelId, u8 arg1, u8 arg2)
2201 {
2202 s32 instrumentId = arg1;
2203 s32 velocity = arg2;
2204 ImMidiOutChannel* channel = &player->channels[channelId];
2205 if (!velocity)
2206 {
2207 ImMidiNoteOff(player, channelId, instrumentId, 0);
2208 }
2209 else if (channel->partStatus)
2210 {
2211 if (channel->data)
2212 {
2213 ImHandleNoteOn(channel->data, instrumentId, velocity);
2214 }
2215 }
2216 else
2217 {
2218 ImMidi_DrumOut_NoteOn(channel->priority, channel->partNoteReq, channel->groupVolume, instrumentId, velocity);
2219 }
2220 }
2221
2222 void ImMidiProgramChange(ImMidiPlayer* player, u8 channelId, u8 arg1, u8 arg2)
2223 {

Callers

nothing calls this directly

Calls 3

ImMidiNoteOffFunction · 0.85
ImHandleNoteOnFunction · 0.85
ImMidi_DrumOut_NoteOnFunction · 0.85

Tested by

no test coverage detected