-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMidiInStream.py
52 lines (30 loc) · 957 Bytes
/
MidiInStream.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- coding: ISO-8859-1 -*-
from MidiOutStream import MidiOutStream
class MidiInStream:
"""
Takes midi events from the midi input and calls the apropriate
method in the eventhandler object
"""
def __init__(self, midiOutStream, device):
"""
Sets a default output stream, and sets the device from where
the input comes
"""
if midiOutStream is None:
self.midiOutStream = MidiOutStream()
else:
self.midiOutStream = midiOutStream
def close(self):
"""
Stop the MidiInstream
"""
def read(self, time=0):
"""
Start the MidiInstream.
"time" sets timer to specific start value.
"""
def resetTimer(self, time=0):
"""
Resets the timer, probably a good idea if there is some kind
of looping going on
"""