MCPcopy Create free account
hub / github.com/bspaans/python-mingus / programChange

Method programChange

mingus/midi/win32midi.py:113–123  ·  view source on GitHub ↗
(self, program, channel=1)

Source from the content-addressed store, hash-verified

111 )
112
113 def programChange(self, program, channel=1):
114 p = program
115 v = 0
116 midimsg = 0xC0 + ((p) * 0x100) + (v * 0x10000) + channel
117 mm = c_int(midimsg)
118 rc = self.winmm.midiOutShortMsg(self.hmidi, mm)
119 if rc != 0:
120 raise Win32MidiException(
121 "Error sending event, "
122 + self.midiOutShortErrorCodes.get(rc, "Unknown error.")
123 )
124
125 def controllerChange(self, controller, val, channel=1):
126 midimsg = 0xB0 + ((controller) * 0x100) + (val * 0x10000) + channel

Callers 1

instr_eventMethod · 0.80

Calls 1

Win32MidiExceptionClass · 0.85

Tested by

no test coverage detected