MIDI Controller: Code Snippet

This is a snippet of our code, more specifically, it is a MIDI handler function that we wrote to handle the “On Note” MIDI event. It takes a channel as a parameter, assigns it to thee appropriate voice, and then checks if the voice is a square channel or drum channel. From here, the code handles the appropriate channel, updates the pitch of the note, and sets the attenuation of the note.































Image result for undertale dog