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

Method rawNoteOn

mingus/midi/win32midi.py:93–101  ·  view source on GitHub ↗
(self, pitch, channel=1, v=60)

Source from the content-addressed store, hash-verified

91 )
92
93 def rawNoteOn(self, pitch, channel=1, v=60):
94 midimsg = 0x90 + ((pitch) * 0x100) + (v * 0x10000) + channel
95 mm = c_int(midimsg)
96 rc = self.winmm.midiOutShortMsg(self.hmidi, mm)
97 if rc != 0:
98 raise Win32MidiException(
99 "Error sending event, "
100 + self.midiOutShortErrorCodes.get(rc, "Unknown error.")
101 )
102
103 def rawNoteOff(self, pitch, channel=1):
104 midimsg = 0x80 + ((pitch) * 0x100) + channel

Callers 1

play_eventMethod · 0.80

Calls 1

Win32MidiExceptionClass · 0.85

Tested by

no test coverage detected