patchmaster 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/patchmaster/instrument.rb +20 -0
- metadata +1 -1
@@ -88,9 +88,29 @@ class OutputInstrument < Instrument
|
|
88
88
|
end
|
89
89
|
|
90
90
|
class MockInputPort
|
91
|
+
|
92
|
+
# For MIDIEye::Listener
|
93
|
+
def self.is_compatible?(input)
|
94
|
+
true
|
95
|
+
end
|
96
|
+
|
97
|
+
def initialize(_=nil)
|
98
|
+
end
|
99
|
+
|
91
100
|
def gets
|
92
101
|
[{:data => [], :timestamp => 0}]
|
93
102
|
end
|
103
|
+
|
104
|
+
def poll
|
105
|
+
yield gets
|
106
|
+
end
|
107
|
+
|
108
|
+
def clear_buffer
|
109
|
+
end
|
110
|
+
|
111
|
+
# add this class to the Listener class' known input types
|
112
|
+
MIDIEye::Listener.input_types << self
|
113
|
+
|
94
114
|
end
|
95
115
|
|
96
116
|
class MockOutputPort
|