midi-communications-macos 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.version +6 -0
- data/.yardoc/checksums +9 -0
- data/.yardoc/complete +0 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/.yardopts +6 -0
- data/LICENSE +159 -668
- data/README.md +6 -13
- data/doc/MIDICommunicationsMacOS/API/CF.html +124 -0
- data/doc/MIDICommunicationsMacOS/API/HostTime.html +124 -0
- data/doc/MIDICommunicationsMacOS/API/MIDIPacket.html +137 -0
- data/doc/MIDICommunicationsMacOS/API/MIDIPacketList.html +137 -0
- data/doc/MIDICommunicationsMacOS/API/MIDISysexSendRequest.html +137 -0
- data/doc/MIDICommunicationsMacOS/API.html +912 -0
- data/doc/MIDICommunicationsMacOS/Destination.html +1983 -0
- data/doc/MIDICommunicationsMacOS/Device.html +1102 -0
- data/doc/MIDICommunicationsMacOS/Endpoint.html +1665 -0
- data/doc/MIDICommunicationsMacOS/Entity.html +971 -0
- data/doc/MIDICommunicationsMacOS/Source.html +1784 -0
- data/doc/MIDICommunicationsMacOS/TypeConversion.html +393 -0
- data/doc/MIDICommunicationsMacOS.html +214 -0
- data/doc/_index.html +250 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +503 -0
- data/doc/file.README.html +275 -0
- data/doc/file_list.html +59 -0
- data/doc/frames.html +22 -0
- data/doc/index.html +275 -0
- data/doc/js/app.js +344 -0
- data/doc/js/full_list.js +242 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +542 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/midi-communications-macos/api.rb +7 -1
- data/lib/midi-communications-macos/destination.rb +86 -20
- data/lib/midi-communications-macos/device.rb +52 -18
- data/lib/midi-communications-macos/endpoint.rb +31 -5
- data/lib/midi-communications-macos/entity.rb +20 -6
- data/lib/midi-communications-macos/source.rb +79 -19
- data/lib/midi-communications-macos/type_conversion.rb +11 -4
- data/lib/midi-communications-macos/version.rb +2 -1
- data/lib/midi-communications-macos.rb +37 -0
- data/midi-communications-macos.gemspec +11 -9
- metadata +83 -4
|
@@ -0,0 +1,1784 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Class: MIDICommunicationsMacOS::Source
|
|
8
|
+
|
|
9
|
+
— MIDI Communications macOS API
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "MIDICommunicationsMacOS::Source";
|
|
19
|
+
relpath = '../';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="../_index.html">Index (S)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../MIDICommunicationsMacOS.html" title="MIDICommunicationsMacOS (module)">MIDICommunicationsMacOS</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">Source</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="../class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="content"><h1>Class: MIDICommunicationsMacOS::Source
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
<dl>
|
|
70
|
+
<dt>Inherits:</dt>
|
|
71
|
+
<dd>
|
|
72
|
+
<span class="inheritName">Object</span>
|
|
73
|
+
|
|
74
|
+
<ul class="fullTree">
|
|
75
|
+
<li>Object</li>
|
|
76
|
+
|
|
77
|
+
<li class="next">MIDICommunicationsMacOS::Source</li>
|
|
78
|
+
|
|
79
|
+
</ul>
|
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
81
|
+
|
|
82
|
+
</dd>
|
|
83
|
+
</dl>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
<dl>
|
|
91
|
+
<dt>Includes:</dt>
|
|
92
|
+
<dd><span class='object_link'><a href="Endpoint.html" title="MIDICommunicationsMacOS::Endpoint (module)">Endpoint</a></span></dd>
|
|
93
|
+
</dl>
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
<dl>
|
|
101
|
+
<dt>Defined in:</dt>
|
|
102
|
+
<dd>lib/midi-communications-macos/source.rb</dd>
|
|
103
|
+
</dl>
|
|
104
|
+
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<h2>Overview</h2><div class="docstring">
|
|
108
|
+
<div class="discussion">
|
|
109
|
+
<p>MIDI input endpoint for receiving MIDI messages.</p>
|
|
110
|
+
|
|
111
|
+
<p>A Source represents a MIDI input that can receive messages from
|
|
112
|
+
external MIDI devices or software. Messages are queued and can
|
|
113
|
+
be retrieved using <span class='object_link'><a href="#gets-instance_method" title="MIDICommunicationsMacOS::Source#gets (method)">#gets</a></span> or <span class='object_link'><a href="#gets_s-instance_method" title="MIDICommunicationsMacOS::Source#gets_s (method)">#gets_s</a></span>.</p>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="tags">
|
|
119
|
+
|
|
120
|
+
<div class="examples">
|
|
121
|
+
<h4 class="tag_title">Examples:</h4>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
<h5 class="example_title"><div class='inline'><p>Open and read from the first input</p>
|
|
125
|
+
</div></h5>
|
|
126
|
+
|
|
127
|
+
<pre class="example code"><code><span class='id identifier rubyid_input'>input</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../MIDICommunicationsMacOS.html" title="MIDICommunicationsMacOS (module)">MIDICommunicationsMacOS</a></span></span><span class='op'>::</span><span class='const'>Source</span><span class='period'>.</span><span class='id identifier rubyid_first'><span class='object_link'><a href="#first-class_method" title="MIDICommunicationsMacOS::Source.first (method)">first</a></span></span>
|
|
128
|
+
<span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span>
|
|
129
|
+
<span class='id identifier rubyid_messages'>messages</span> <span class='op'>=</span> <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span>
|
|
130
|
+
<span class='comment'># => [{ data: [144, 60, 100], timestamp: 1234567890.123 }]</span></code></pre>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
<h5 class="example_title"><div class='inline'><p>Read messages as hex strings</p>
|
|
134
|
+
</div></h5>
|
|
135
|
+
|
|
136
|
+
<pre class="example code"><code><span class='id identifier rubyid_messages'>messages</span> <span class='op'>=</span> <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_gets_s'>gets_s</span>
|
|
137
|
+
<span class='comment'># => [{ data: "903C64", timestamp: 1234567890.123 }]</span></code></pre>
|
|
138
|
+
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
<p class="tag_title">See Also:</p>
|
|
143
|
+
<ul class="see">
|
|
144
|
+
|
|
145
|
+
<li><span class='object_link'><a href="Destination.html" title="MIDICommunicationsMacOS::Destination (class)">For sending MIDI messages</a></span></li>
|
|
146
|
+
|
|
147
|
+
<li><span class='object_link'><a href="Endpoint.html" title="MIDICommunicationsMacOS::Endpoint (module)">For shared endpoint functionality</a></span></li>
|
|
148
|
+
|
|
149
|
+
</ul>
|
|
150
|
+
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
156
|
+
<ul class="summary">
|
|
157
|
+
|
|
158
|
+
<li class="public ">
|
|
159
|
+
<span class="summary_signature">
|
|
160
|
+
|
|
161
|
+
<a href="#enabled-instance_method" title="#enabled (instance method)">#<strong>enabled</strong> ⇒ Boolean </a>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
(also: #enabled?)
|
|
166
|
+
|
|
167
|
+
</span>
|
|
168
|
+
|
|
169
|
+
<span class="note title not_defined_here">
|
|
170
|
+
included
|
|
171
|
+
from <span class='object_link'><a href="Endpoint.html#enabled-instance_method" title="MIDICommunicationsMacOS::Endpoint#enabled (method)">Endpoint</a></span>
|
|
172
|
+
</span>
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
<span class="note title readonly">readonly</span>
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
<span class="summary_desc"><div class='inline'><p>Whether the endpoint has been initialized.</p>
|
|
188
|
+
</div></span>
|
|
189
|
+
|
|
190
|
+
</li>
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
<li class="public ">
|
|
194
|
+
<span class="summary_signature">
|
|
195
|
+
|
|
196
|
+
<a href="#entity-instance_method" title="#entity (instance method)">#<strong>entity</strong> ⇒ Entity </a>
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
</span>
|
|
201
|
+
|
|
202
|
+
<span class="note title not_defined_here">
|
|
203
|
+
included
|
|
204
|
+
from <span class='object_link'><a href="Endpoint.html#entity-instance_method" title="MIDICommunicationsMacOS::Endpoint#entity (method)">Endpoint</a></span>
|
|
205
|
+
</span>
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
<span class="note title readonly">readonly</span>
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
<span class="summary_desc"><div class='inline'><p>The parent entity.</p>
|
|
221
|
+
</div></span>
|
|
222
|
+
|
|
223
|
+
</li>
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
<li class="public ">
|
|
227
|
+
<span class="summary_signature">
|
|
228
|
+
|
|
229
|
+
<a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> ⇒ Integer </a>
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
</span>
|
|
234
|
+
|
|
235
|
+
<span class="note title not_defined_here">
|
|
236
|
+
included
|
|
237
|
+
from <span class='object_link'><a href="Endpoint.html#id-instance_method" title="MIDICommunicationsMacOS::Endpoint#id (method)">Endpoint</a></span>
|
|
238
|
+
</span>
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
<span class="summary_desc"><div class='inline'><p>Unique local numeric ID of the endpoint.</p>
|
|
252
|
+
</div></span>
|
|
253
|
+
|
|
254
|
+
</li>
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
<li class="public ">
|
|
258
|
+
<span class="summary_signature">
|
|
259
|
+
|
|
260
|
+
<a href="#resource_id-instance_method" title="#resource_id (instance method)">#<strong>resource_id</strong> ⇒ Integer </a>
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
</span>
|
|
265
|
+
|
|
266
|
+
<span class="note title not_defined_here">
|
|
267
|
+
included
|
|
268
|
+
from <span class='object_link'><a href="Endpoint.html#resource_id-instance_method" title="MIDICommunicationsMacOS::Endpoint#resource_id (method)">Endpoint</a></span>
|
|
269
|
+
</span>
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
<span class="note title readonly">readonly</span>
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
<span class="summary_desc"><div class='inline'><p>Core MIDI resource identifier.</p>
|
|
285
|
+
</div></span>
|
|
286
|
+
|
|
287
|
+
</li>
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
<li class="public ">
|
|
291
|
+
<span class="summary_signature">
|
|
292
|
+
|
|
293
|
+
<a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> ⇒ Object </a>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
</span>
|
|
298
|
+
|
|
299
|
+
<span class="note title not_defined_here">
|
|
300
|
+
included
|
|
301
|
+
from <span class='object_link'><a href="Endpoint.html#type-instance_method" title="MIDICommunicationsMacOS::Endpoint#type (method)">Endpoint</a></span>
|
|
302
|
+
</span>
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
<span class="note title readonly">readonly</span>
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
318
|
+
|
|
319
|
+
</li>
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
</ul>
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
<h2>
|
|
329
|
+
Class Method Summary
|
|
330
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
331
|
+
</h2>
|
|
332
|
+
|
|
333
|
+
<ul class="summary">
|
|
334
|
+
|
|
335
|
+
<li class="public ">
|
|
336
|
+
<span class="summary_signature">
|
|
337
|
+
|
|
338
|
+
<a href="#all-class_method" title="all (class method)">.<strong>all</strong> ⇒ Array<Source> </a>
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
</span>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
<span class="summary_desc"><div class='inline'><p>Returns all available input endpoints.</p>
|
|
353
|
+
</div></span>
|
|
354
|
+
|
|
355
|
+
</li>
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
<li class="public ">
|
|
359
|
+
<span class="summary_signature">
|
|
360
|
+
|
|
361
|
+
<a href="#first-class_method" title="first (class method)">.<strong>first</strong> ⇒ Source </a>
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
</span>
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
<span class="summary_desc"><div class='inline'><p>Returns the first available input endpoint.</p>
|
|
376
|
+
</div></span>
|
|
377
|
+
|
|
378
|
+
</li>
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
<li class="public ">
|
|
382
|
+
<span class="summary_signature">
|
|
383
|
+
|
|
384
|
+
<a href="#last-class_method" title="last (class method)">.<strong>last</strong> ⇒ Source </a>
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
</span>
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
<span class="summary_desc"><div class='inline'><p>Returns the last available input endpoint.</p>
|
|
399
|
+
</div></span>
|
|
400
|
+
|
|
401
|
+
</li>
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
</ul>
|
|
405
|
+
|
|
406
|
+
<h2>
|
|
407
|
+
Instance Method Summary
|
|
408
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
409
|
+
</h2>
|
|
410
|
+
|
|
411
|
+
<ul class="summary">
|
|
412
|
+
|
|
413
|
+
<li class="public ">
|
|
414
|
+
<span class="summary_signature">
|
|
415
|
+
|
|
416
|
+
<a href="#close-instance_method" title="#close (instance method)">#<strong>close</strong> ⇒ Boolean </a>
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
</span>
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
<span class="summary_desc"><div class='inline'><p>Closes this input.</p>
|
|
431
|
+
</div></span>
|
|
432
|
+
|
|
433
|
+
</li>
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
<li class="public ">
|
|
437
|
+
<span class="summary_signature">
|
|
438
|
+
|
|
439
|
+
<a href="#display_name-instance_method" title="#display_name (instance method)">#<strong>display_name</strong> ⇒ String </a>
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
</span>
|
|
444
|
+
|
|
445
|
+
<span class="note title not_defined_here">
|
|
446
|
+
included
|
|
447
|
+
from <span class='object_link'><a href="Endpoint.html#display_name-instance_method" title="MIDICommunicationsMacOS::Endpoint#display_name (method)">Endpoint</a></span>
|
|
448
|
+
</span>
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
<span class="summary_desc"><div class='inline'><p>Formatted display name (delegated to entity).</p>
|
|
459
|
+
</div></span>
|
|
460
|
+
|
|
461
|
+
</li>
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
<li class="public ">
|
|
465
|
+
<span class="summary_signature">
|
|
466
|
+
|
|
467
|
+
<a href="#enable-instance_method" title="#enable (instance method)">#<strong>enable</strong> {|source| ... } ⇒ Source </a>
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
(also: #open, #start)
|
|
472
|
+
|
|
473
|
+
</span>
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
<span class="summary_desc"><div class='inline'><p>Opens this input for use.</p>
|
|
484
|
+
</div></span>
|
|
485
|
+
|
|
486
|
+
</li>
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
<li class="public ">
|
|
490
|
+
<span class="summary_signature">
|
|
491
|
+
|
|
492
|
+
<a href="#gets-instance_method" title="#gets (instance method)">#<strong>gets</strong> ⇒ Array<Hash> </a>
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
(also: #read)
|
|
497
|
+
|
|
498
|
+
</span>
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
<span class="summary_desc"><div class='inline'><p>Reads MIDI messages from the input buffer.</p>
|
|
509
|
+
</div></span>
|
|
510
|
+
|
|
511
|
+
</li>
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
<li class="public ">
|
|
515
|
+
<span class="summary_signature">
|
|
516
|
+
|
|
517
|
+
<a href="#gets_s-instance_method" title="#gets_s (instance method)">#<strong>gets_s</strong> ⇒ Array<Hash> </a>
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
(also: #gets_bytestr)
|
|
522
|
+
|
|
523
|
+
</span>
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
<span class="summary_desc"><div class='inline'><p>Reads MIDI messages as hex strings.</p>
|
|
534
|
+
</div></span>
|
|
535
|
+
|
|
536
|
+
</li>
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
<li class="public ">
|
|
540
|
+
<span class="summary_signature">
|
|
541
|
+
|
|
542
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(resource_id, entity) ⇒ Object </a>
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
</span>
|
|
547
|
+
|
|
548
|
+
<span class="note title not_defined_here">
|
|
549
|
+
included
|
|
550
|
+
from <span class='object_link'><a href="Endpoint.html#initialize-instance_method" title="MIDICommunicationsMacOS::Endpoint#initialize (method)">Endpoint</a></span>
|
|
551
|
+
</span>
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
562
|
+
|
|
563
|
+
</li>
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
<li class="public ">
|
|
567
|
+
<span class="summary_signature">
|
|
568
|
+
|
|
569
|
+
<a href="#manufacturer-instance_method" title="#manufacturer (instance method)">#<strong>manufacturer</strong> ⇒ String </a>
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
</span>
|
|
574
|
+
|
|
575
|
+
<span class="note title not_defined_here">
|
|
576
|
+
included
|
|
577
|
+
from <span class='object_link'><a href="Endpoint.html#manufacturer-instance_method" title="MIDICommunicationsMacOS::Endpoint#manufacturer (method)">Endpoint</a></span>
|
|
578
|
+
</span>
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
<span class="summary_desc"><div class='inline'><p>Device manufacturer name (delegated to entity).</p>
|
|
589
|
+
</div></span>
|
|
590
|
+
|
|
591
|
+
</li>
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
<li class="public ">
|
|
595
|
+
<span class="summary_signature">
|
|
596
|
+
|
|
597
|
+
<a href="#model-instance_method" title="#model (instance method)">#<strong>model</strong> ⇒ String </a>
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
</span>
|
|
602
|
+
|
|
603
|
+
<span class="note title not_defined_here">
|
|
604
|
+
included
|
|
605
|
+
from <span class='object_link'><a href="Endpoint.html#model-instance_method" title="MIDICommunicationsMacOS::Endpoint#model (method)">Endpoint</a></span>
|
|
606
|
+
</span>
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
<span class="summary_desc"><div class='inline'><p>Device model name (delegated to entity).</p>
|
|
617
|
+
</div></span>
|
|
618
|
+
|
|
619
|
+
</li>
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
<li class="public ">
|
|
623
|
+
<span class="summary_signature">
|
|
624
|
+
|
|
625
|
+
<a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> ⇒ String </a>
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
</span>
|
|
630
|
+
|
|
631
|
+
<span class="note title not_defined_here">
|
|
632
|
+
included
|
|
633
|
+
from <span class='object_link'><a href="Endpoint.html#name-instance_method" title="MIDICommunicationsMacOS::Endpoint#name (method)">Endpoint</a></span>
|
|
634
|
+
</span>
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
<span class="summary_desc"><div class='inline'><p>Endpoint name (delegated to entity).</p>
|
|
645
|
+
</div></span>
|
|
646
|
+
|
|
647
|
+
</li>
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
<li class="public ">
|
|
651
|
+
<span class="summary_signature">
|
|
652
|
+
|
|
653
|
+
<a href="#online%3F-instance_method" title="#online? (instance method)">#<strong>online?</strong> ⇒ Boolean </a>
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
</span>
|
|
658
|
+
|
|
659
|
+
<span class="note title not_defined_here">
|
|
660
|
+
included
|
|
661
|
+
from <span class='object_link'><a href="Endpoint.html#online%3F-instance_method" title="MIDICommunicationsMacOS::Endpoint#online? (method)">Endpoint</a></span>
|
|
662
|
+
</span>
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
<span class="summary_desc"><div class='inline'><p>Is this endpoint online?.</p>
|
|
673
|
+
</div></span>
|
|
674
|
+
|
|
675
|
+
</li>
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
</ul>
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
<div id="instance_attr_details" class="attr_details">
|
|
686
|
+
<h2>Instance Attribute Details</h2>
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
<span id=""></span>
|
|
690
|
+
<div class="method_details first">
|
|
691
|
+
<h3 class="signature first" id="enabled-instance_method">
|
|
692
|
+
|
|
693
|
+
#<strong>enabled</strong> ⇒ <tt>Boolean</tt> <span class="extras">(readonly)</span>
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
<span class="aliases">Also known as:
|
|
698
|
+
<span class="names"><span id='enabled?-instance_method'>enabled?</span></span>
|
|
699
|
+
</span>
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
<span class="not_defined_here">
|
|
704
|
+
Originally defined in module
|
|
705
|
+
<span class='object_link'><a href="Endpoint.html#enabled-instance_method" title="MIDICommunicationsMacOS::Endpoint#enabled (method)">Endpoint</a></span>
|
|
706
|
+
</span>
|
|
707
|
+
|
|
708
|
+
</h3><div class="docstring">
|
|
709
|
+
<div class="discussion">
|
|
710
|
+
<p>Returns whether the endpoint has been initialized.</p>
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
</div>
|
|
714
|
+
</div>
|
|
715
|
+
<div class="tags">
|
|
716
|
+
|
|
717
|
+
<p class="tag_title">Returns:</p>
|
|
718
|
+
<ul class="return">
|
|
719
|
+
|
|
720
|
+
<li>
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
—
|
|
728
|
+
<div class='inline'><p>whether the endpoint has been initialized</p>
|
|
729
|
+
</div>
|
|
730
|
+
|
|
731
|
+
</li>
|
|
732
|
+
|
|
733
|
+
</ul>
|
|
734
|
+
|
|
735
|
+
</div>
|
|
736
|
+
</div>
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
<span id=""></span>
|
|
740
|
+
<div class="method_details ">
|
|
741
|
+
<h3 class="signature " id="entity-instance_method">
|
|
742
|
+
|
|
743
|
+
#<strong>entity</strong> ⇒ <tt><span class='object_link'><a href="Entity.html" title="MIDICommunicationsMacOS::Entity (class)">Entity</a></span></tt> <span class="extras">(readonly)</span>
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
<span class="not_defined_here">
|
|
750
|
+
Originally defined in module
|
|
751
|
+
<span class='object_link'><a href="Endpoint.html#entity-instance_method" title="MIDICommunicationsMacOS::Endpoint#entity (method)">Endpoint</a></span>
|
|
752
|
+
</span>
|
|
753
|
+
|
|
754
|
+
</h3><div class="docstring">
|
|
755
|
+
<div class="discussion">
|
|
756
|
+
<p>Returns the parent entity.</p>
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
</div>
|
|
760
|
+
</div>
|
|
761
|
+
<div class="tags">
|
|
762
|
+
|
|
763
|
+
<p class="tag_title">Returns:</p>
|
|
764
|
+
<ul class="return">
|
|
765
|
+
|
|
766
|
+
<li>
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
<span class='type'>(<tt><span class='object_link'><a href="Entity.html" title="MIDICommunicationsMacOS::Entity (class)">Entity</a></span></tt>)</span>
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
—
|
|
774
|
+
<div class='inline'><p>the parent entity</p>
|
|
775
|
+
</div>
|
|
776
|
+
|
|
777
|
+
</li>
|
|
778
|
+
|
|
779
|
+
</ul>
|
|
780
|
+
|
|
781
|
+
</div>
|
|
782
|
+
</div>
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
<span id="id=-instance_method"></span>
|
|
786
|
+
<div class="method_details ">
|
|
787
|
+
<h3 class="signature " id="id-instance_method">
|
|
788
|
+
|
|
789
|
+
#<strong>id</strong> ⇒ <tt>Integer</tt>
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
<span class="not_defined_here">
|
|
796
|
+
Originally defined in module
|
|
797
|
+
<span class='object_link'><a href="Endpoint.html#id-instance_method" title="MIDICommunicationsMacOS::Endpoint#id (method)">Endpoint</a></span>
|
|
798
|
+
</span>
|
|
799
|
+
|
|
800
|
+
</h3><div class="docstring">
|
|
801
|
+
<div class="discussion">
|
|
802
|
+
<p>Returns unique local numeric ID of the endpoint.</p>
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
</div>
|
|
806
|
+
</div>
|
|
807
|
+
<div class="tags">
|
|
808
|
+
|
|
809
|
+
<p class="tag_title">Returns:</p>
|
|
810
|
+
<ul class="return">
|
|
811
|
+
|
|
812
|
+
<li>
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
—
|
|
820
|
+
<div class='inline'><p>unique local numeric ID of the endpoint</p>
|
|
821
|
+
</div>
|
|
822
|
+
|
|
823
|
+
</li>
|
|
824
|
+
|
|
825
|
+
</ul>
|
|
826
|
+
|
|
827
|
+
</div>
|
|
828
|
+
</div>
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
<span id=""></span>
|
|
832
|
+
<div class="method_details ">
|
|
833
|
+
<h3 class="signature " id="resource_id-instance_method">
|
|
834
|
+
|
|
835
|
+
#<strong>resource_id</strong> ⇒ <tt>Integer</tt> <span class="extras">(readonly)</span>
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
<span class="not_defined_here">
|
|
842
|
+
Originally defined in module
|
|
843
|
+
<span class='object_link'><a href="Endpoint.html#resource_id-instance_method" title="MIDICommunicationsMacOS::Endpoint#resource_id (method)">Endpoint</a></span>
|
|
844
|
+
</span>
|
|
845
|
+
|
|
846
|
+
</h3><div class="docstring">
|
|
847
|
+
<div class="discussion">
|
|
848
|
+
<p>Returns Core MIDI resource identifier.</p>
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
</div>
|
|
852
|
+
</div>
|
|
853
|
+
<div class="tags">
|
|
854
|
+
|
|
855
|
+
<p class="tag_title">Returns:</p>
|
|
856
|
+
<ul class="return">
|
|
857
|
+
|
|
858
|
+
<li>
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
—
|
|
866
|
+
<div class='inline'><p>Core MIDI resource identifier</p>
|
|
867
|
+
</div>
|
|
868
|
+
|
|
869
|
+
</li>
|
|
870
|
+
|
|
871
|
+
</ul>
|
|
872
|
+
|
|
873
|
+
</div>
|
|
874
|
+
</div>
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
<span id=""></span>
|
|
878
|
+
<div class="method_details ">
|
|
879
|
+
<h3 class="signature " id="type-instance_method">
|
|
880
|
+
|
|
881
|
+
#<strong>type</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
<span class="not_defined_here">
|
|
888
|
+
Originally defined in module
|
|
889
|
+
<span class='object_link'><a href="Endpoint.html#type-instance_method" title="MIDICommunicationsMacOS::Endpoint#type (method)">Endpoint</a></span>
|
|
890
|
+
</span>
|
|
891
|
+
|
|
892
|
+
</h3><div class="docstring">
|
|
893
|
+
<div class="discussion">
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
</div>
|
|
897
|
+
</div>
|
|
898
|
+
<div class="tags">
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
</div>
|
|
902
|
+
</div>
|
|
903
|
+
|
|
904
|
+
</div>
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
<div id="class_method_details" class="method_details_list">
|
|
908
|
+
<h2>Class Method Details</h2>
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
<div class="method_details first">
|
|
912
|
+
<h3 class="signature first" id="all-class_method">
|
|
913
|
+
|
|
914
|
+
.<strong>all</strong> ⇒ <tt>Array<<span class='object_link'><a href="" title="MIDICommunicationsMacOS::Source (class)">Source</a></span>></tt>
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
</h3><div class="docstring">
|
|
921
|
+
<div class="discussion">
|
|
922
|
+
<p>Returns all available input endpoints.</p>
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
</div>
|
|
926
|
+
</div>
|
|
927
|
+
<div class="tags">
|
|
928
|
+
|
|
929
|
+
<div class="examples">
|
|
930
|
+
<h4 class="tag_title">Examples:</h4>
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
<pre class="example code"><code><span class='id identifier rubyid_inputs'>inputs</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../MIDICommunicationsMacOS.html" title="MIDICommunicationsMacOS (module)">MIDICommunicationsMacOS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Source (class)">Source</a></span></span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span>
|
|
934
|
+
<span class='id identifier rubyid_inputs'>inputs</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span> <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_display_name'>display_name</span> <span class='rbrace'>}</span></code></pre>
|
|
935
|
+
|
|
936
|
+
</div>
|
|
937
|
+
|
|
938
|
+
<p class="tag_title">Returns:</p>
|
|
939
|
+
<ul class="return">
|
|
940
|
+
|
|
941
|
+
<li>
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="" title="MIDICommunicationsMacOS::Source (class)">Source</a></span>></tt>)</span>
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
—
|
|
949
|
+
<div class='inline'><p>all sources</p>
|
|
950
|
+
</div>
|
|
951
|
+
|
|
952
|
+
</li>
|
|
953
|
+
|
|
954
|
+
</ul>
|
|
955
|
+
|
|
956
|
+
</div><table class="source_code">
|
|
957
|
+
<tr>
|
|
958
|
+
<td>
|
|
959
|
+
<pre class="lines">
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
150
|
|
963
|
+
151
|
|
964
|
+
152</pre>
|
|
965
|
+
</td>
|
|
966
|
+
<td>
|
|
967
|
+
<pre class="code"><span class="info file"># File 'lib/midi-communications-macos/source.rb', line 150</span>
|
|
968
|
+
|
|
969
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span>
|
|
970
|
+
<span class='const'><span class='object_link'><a href="Endpoint.html" title="MIDICommunicationsMacOS::Endpoint (module)">Endpoint</a></span></span><span class='period'>.</span><span class='id identifier rubyid_all_by_type'><span class='object_link'><a href="Endpoint.html#all_by_type-class_method" title="MIDICommunicationsMacOS::Endpoint.all_by_type (method)">all_by_type</a></span></span><span class='lbracket'>[</span><span class='symbol'>:source</span><span class='rbracket'>]</span>
|
|
971
|
+
<span class='kw'>end</span></pre>
|
|
972
|
+
</td>
|
|
973
|
+
</tr>
|
|
974
|
+
</table>
|
|
975
|
+
</div>
|
|
976
|
+
|
|
977
|
+
<div class="method_details ">
|
|
978
|
+
<h3 class="signature " id="first-class_method">
|
|
979
|
+
|
|
980
|
+
.<strong>first</strong> ⇒ <tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Source (class)">Source</a></span></tt>
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
|
|
986
|
+
</h3><div class="docstring">
|
|
987
|
+
<div class="discussion">
|
|
988
|
+
<p>Returns the first available input endpoint.</p>
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
</div>
|
|
992
|
+
</div>
|
|
993
|
+
<div class="tags">
|
|
994
|
+
|
|
995
|
+
<div class="examples">
|
|
996
|
+
<h4 class="tag_title">Examples:</h4>
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
<pre class="example code"><code><span class='id identifier rubyid_input'>input</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../MIDICommunicationsMacOS.html" title="MIDICommunicationsMacOS (module)">MIDICommunicationsMacOS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Source (class)">Source</a></span></span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span></code></pre>
|
|
1000
|
+
|
|
1001
|
+
</div>
|
|
1002
|
+
|
|
1003
|
+
<p class="tag_title">Returns:</p>
|
|
1004
|
+
<ul class="return">
|
|
1005
|
+
|
|
1006
|
+
<li>
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Source (class)">Source</a></span></tt>)</span>
|
|
1010
|
+
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
—
|
|
1014
|
+
<div class='inline'><p>the first source</p>
|
|
1015
|
+
</div>
|
|
1016
|
+
|
|
1017
|
+
</li>
|
|
1018
|
+
|
|
1019
|
+
</ul>
|
|
1020
|
+
|
|
1021
|
+
</div><table class="source_code">
|
|
1022
|
+
<tr>
|
|
1023
|
+
<td>
|
|
1024
|
+
<pre class="lines">
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
132
|
|
1028
|
+
133
|
|
1029
|
+
134</pre>
|
|
1030
|
+
</td>
|
|
1031
|
+
<td>
|
|
1032
|
+
<pre class="code"><span class="info file"># File 'lib/midi-communications-macos/source.rb', line 132</span>
|
|
1033
|
+
|
|
1034
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
|
1035
|
+
<span class='const'><span class='object_link'><a href="Endpoint.html" title="MIDICommunicationsMacOS::Endpoint (module)">Endpoint</a></span></span><span class='period'>.</span><span class='id identifier rubyid_first'><span class='object_link'><a href="Endpoint.html#first-class_method" title="MIDICommunicationsMacOS::Endpoint.first (method)">first</a></span></span><span class='lparen'>(</span><span class='symbol'>:source</span><span class='rparen'>)</span>
|
|
1036
|
+
<span class='kw'>end</span></pre>
|
|
1037
|
+
</td>
|
|
1038
|
+
</tr>
|
|
1039
|
+
</table>
|
|
1040
|
+
</div>
|
|
1041
|
+
|
|
1042
|
+
<div class="method_details ">
|
|
1043
|
+
<h3 class="signature " id="last-class_method">
|
|
1044
|
+
|
|
1045
|
+
.<strong>last</strong> ⇒ <tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Source (class)">Source</a></span></tt>
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
</h3><div class="docstring">
|
|
1052
|
+
<div class="discussion">
|
|
1053
|
+
<p>Returns the last available input endpoint.</p>
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
</div>
|
|
1057
|
+
</div>
|
|
1058
|
+
<div class="tags">
|
|
1059
|
+
|
|
1060
|
+
<p class="tag_title">Returns:</p>
|
|
1061
|
+
<ul class="return">
|
|
1062
|
+
|
|
1063
|
+
<li>
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Source (class)">Source</a></span></tt>)</span>
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
—
|
|
1071
|
+
<div class='inline'><p>the last source</p>
|
|
1072
|
+
</div>
|
|
1073
|
+
|
|
1074
|
+
</li>
|
|
1075
|
+
|
|
1076
|
+
</ul>
|
|
1077
|
+
|
|
1078
|
+
</div><table class="source_code">
|
|
1079
|
+
<tr>
|
|
1080
|
+
<td>
|
|
1081
|
+
<pre class="lines">
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
139
|
|
1085
|
+
140
|
|
1086
|
+
141</pre>
|
|
1087
|
+
</td>
|
|
1088
|
+
<td>
|
|
1089
|
+
<pre class="code"><span class="info file"># File 'lib/midi-communications-macos/source.rb', line 139</span>
|
|
1090
|
+
|
|
1091
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
|
1092
|
+
<span class='const'><span class='object_link'><a href="Endpoint.html" title="MIDICommunicationsMacOS::Endpoint (module)">Endpoint</a></span></span><span class='period'>.</span><span class='id identifier rubyid_last'><span class='object_link'><a href="Endpoint.html#last-class_method" title="MIDICommunicationsMacOS::Endpoint.last (method)">last</a></span></span><span class='lparen'>(</span><span class='symbol'>:source</span><span class='rparen'>)</span>
|
|
1093
|
+
<span class='kw'>end</span></pre>
|
|
1094
|
+
</td>
|
|
1095
|
+
</tr>
|
|
1096
|
+
</table>
|
|
1097
|
+
</div>
|
|
1098
|
+
|
|
1099
|
+
</div>
|
|
1100
|
+
|
|
1101
|
+
<div id="instance_method_details" class="method_details_list">
|
|
1102
|
+
<h2>Instance Method Details</h2>
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
<div class="method_details first">
|
|
1106
|
+
<h3 class="signature first" id="close-instance_method">
|
|
1107
|
+
|
|
1108
|
+
#<strong>close</strong> ⇒ <tt>Boolean</tt>
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
</h3><div class="docstring">
|
|
1115
|
+
<div class="discussion">
|
|
1116
|
+
<p>Closes this input.</p>
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
</div>
|
|
1120
|
+
</div>
|
|
1121
|
+
<div class="tags">
|
|
1122
|
+
|
|
1123
|
+
<p class="tag_title">Returns:</p>
|
|
1124
|
+
<ul class="return">
|
|
1125
|
+
|
|
1126
|
+
<li>
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
—
|
|
1134
|
+
<div class='inline'><p>true if closed, false if already closed</p>
|
|
1135
|
+
</div>
|
|
1136
|
+
|
|
1137
|
+
</li>
|
|
1138
|
+
|
|
1139
|
+
</ul>
|
|
1140
|
+
|
|
1141
|
+
</div><table class="source_code">
|
|
1142
|
+
<tr>
|
|
1143
|
+
<td>
|
|
1144
|
+
<pre class="lines">
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
109
|
|
1148
|
+
110
|
|
1149
|
+
111
|
|
1150
|
+
112
|
|
1151
|
+
113
|
|
1152
|
+
114
|
|
1153
|
+
115
|
|
1154
|
+
116
|
|
1155
|
+
117
|
|
1156
|
+
118
|
|
1157
|
+
119
|
|
1158
|
+
120
|
|
1159
|
+
121
|
|
1160
|
+
122
|
|
1161
|
+
123
|
|
1162
|
+
124</pre>
|
|
1163
|
+
</td>
|
|
1164
|
+
<td>
|
|
1165
|
+
<pre class="code"><span class="info file"># File 'lib/midi-communications-macos/source.rb', line 109</span>
|
|
1166
|
+
|
|
1167
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span>
|
|
1168
|
+
<span class='comment'>#error = API.MIDIPortDisconnectSource( @handle, @resource )
|
|
1169
|
+
</span> <span class='comment'>#raise "MIDIPortDisconnectSource returned error code #{error}" unless error.zero?
|
|
1170
|
+
</span> <span class='comment'>#error = API.MIDIClientDispose(@handle)
|
|
1171
|
+
</span> <span class='comment'>#raise "MIDIClientDispose returned error code #{error}" unless error.zero?
|
|
1172
|
+
</span> <span class='comment'>#error = API.MIDIPortDispose(@handle)
|
|
1173
|
+
</span> <span class='comment'>#raise "MIDIPortDispose returned error code #{error}" unless error.zero?
|
|
1174
|
+
</span> <span class='comment'>#error = API.MIDIEndpointDispose(@resource)
|
|
1175
|
+
</span> <span class='comment'>#raise "MIDIEndpointDispose returned error code #{error}" unless error.zero?
|
|
1176
|
+
</span> <span class='kw'>if</span> <span class='ivar'>@enabled</span>
|
|
1177
|
+
<span class='ivar'>@enabled</span> <span class='op'>=</span> <span class='kw'>false</span>
|
|
1178
|
+
<span class='kw'>true</span>
|
|
1179
|
+
<span class='kw'>else</span>
|
|
1180
|
+
<span class='kw'>false</span>
|
|
1181
|
+
<span class='kw'>end</span>
|
|
1182
|
+
<span class='kw'>end</span></pre>
|
|
1183
|
+
</td>
|
|
1184
|
+
</tr>
|
|
1185
|
+
</table>
|
|
1186
|
+
</div>
|
|
1187
|
+
|
|
1188
|
+
<div class="method_details ">
|
|
1189
|
+
<h3 class="signature " id="display_name-instance_method">
|
|
1190
|
+
|
|
1191
|
+
#<strong>display_name</strong> ⇒ <tt>String</tt>
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
<span class="not_defined_here">
|
|
1198
|
+
Originally defined in module
|
|
1199
|
+
<span class='object_link'><a href="Endpoint.html#display_name-instance_method" title="MIDICommunicationsMacOS::Endpoint#display_name (method)">Endpoint</a></span>
|
|
1200
|
+
</span>
|
|
1201
|
+
|
|
1202
|
+
</h3><div class="docstring">
|
|
1203
|
+
<div class="discussion">
|
|
1204
|
+
<p>Returns formatted display name (delegated to entity).</p>
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
</div>
|
|
1208
|
+
</div>
|
|
1209
|
+
<div class="tags">
|
|
1210
|
+
|
|
1211
|
+
<p class="tag_title">Returns:</p>
|
|
1212
|
+
<ul class="return">
|
|
1213
|
+
|
|
1214
|
+
<li>
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1218
|
+
|
|
1219
|
+
|
|
1220
|
+
|
|
1221
|
+
—
|
|
1222
|
+
<div class='inline'><p>formatted display name (delegated to entity)</p>
|
|
1223
|
+
</div>
|
|
1224
|
+
|
|
1225
|
+
</li>
|
|
1226
|
+
|
|
1227
|
+
</ul>
|
|
1228
|
+
|
|
1229
|
+
</div>
|
|
1230
|
+
</div>
|
|
1231
|
+
|
|
1232
|
+
<div class="method_details ">
|
|
1233
|
+
<h3 class="signature " id="enable-instance_method">
|
|
1234
|
+
|
|
1235
|
+
#<strong>enable</strong> {|source| ... } ⇒ <tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Source (class)">Source</a></span></tt>
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
<span class="aliases">Also known as:
|
|
1240
|
+
<span class="names"><span id='open-instance_method'>open</span>, <span id='start-instance_method'>start</span></span>
|
|
1241
|
+
</span>
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
</h3><div class="docstring">
|
|
1246
|
+
<div class="discussion">
|
|
1247
|
+
<p>Opens this input for use.</p>
|
|
1248
|
+
|
|
1249
|
+
<p>When a block is given, the input is automatically closed when
|
|
1250
|
+
the block exits.</p>
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
</div>
|
|
1254
|
+
</div>
|
|
1255
|
+
<div class="tags">
|
|
1256
|
+
|
|
1257
|
+
<div class="examples">
|
|
1258
|
+
<h4 class="tag_title">Examples:</h4>
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
<h5 class="example_title"><div class='inline'><p>Open with automatic close</p>
|
|
1262
|
+
</div></h5>
|
|
1263
|
+
|
|
1264
|
+
<pre class="example code"><code><span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
|
1265
|
+
<span class='id identifier rubyid_messages'>messages</span> <span class='op'>=</span> <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span>
|
|
1266
|
+
<span class='kw'>end</span></code></pre>
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
<h5 class="example_title"><div class='inline'><p>Open manually</p>
|
|
1270
|
+
</div></h5>
|
|
1271
|
+
|
|
1272
|
+
<pre class="example code"><code><span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span>
|
|
1273
|
+
<span class='id identifier rubyid_messages'>messages</span> <span class='op'>=</span> <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span></code></pre>
|
|
1274
|
+
|
|
1275
|
+
</div>
|
|
1276
|
+
|
|
1277
|
+
<p class="tag_title">Yields:</p>
|
|
1278
|
+
<ul class="yield">
|
|
1279
|
+
|
|
1280
|
+
<li>
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
<span class='type'>(<tt>source</tt>)</span>
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
—
|
|
1288
|
+
<div class='inline'><p>optional block to execute with the open input</p>
|
|
1289
|
+
</div>
|
|
1290
|
+
|
|
1291
|
+
</li>
|
|
1292
|
+
|
|
1293
|
+
</ul>
|
|
1294
|
+
<p class="tag_title">Yield Parameters:</p>
|
|
1295
|
+
<ul class="yieldparam">
|
|
1296
|
+
|
|
1297
|
+
<li>
|
|
1298
|
+
|
|
1299
|
+
<span class='name'>source</span>
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Source (class)">Source</a></span></tt>)</span>
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
—
|
|
1307
|
+
<div class='inline'><p>self</p>
|
|
1308
|
+
</div>
|
|
1309
|
+
|
|
1310
|
+
</li>
|
|
1311
|
+
|
|
1312
|
+
</ul>
|
|
1313
|
+
<p class="tag_title">Returns:</p>
|
|
1314
|
+
<ul class="return">
|
|
1315
|
+
|
|
1316
|
+
<li>
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Source (class)">Source</a></span></tt>)</span>
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
—
|
|
1324
|
+
<div class='inline'><p>self</p>
|
|
1325
|
+
</div>
|
|
1326
|
+
|
|
1327
|
+
</li>
|
|
1328
|
+
|
|
1329
|
+
</ul>
|
|
1330
|
+
|
|
1331
|
+
</div><table class="source_code">
|
|
1332
|
+
<tr>
|
|
1333
|
+
<td>
|
|
1334
|
+
<pre class="lines">
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
92
|
|
1338
|
+
93
|
|
1339
|
+
94
|
|
1340
|
+
95
|
|
1341
|
+
96
|
|
1342
|
+
97
|
|
1343
|
+
98
|
|
1344
|
+
99
|
|
1345
|
+
100
|
|
1346
|
+
101
|
|
1347
|
+
102</pre>
|
|
1348
|
+
</td>
|
|
1349
|
+
<td>
|
|
1350
|
+
<pre class="code"><span class="info file"># File 'lib/midi-communications-macos/source.rb', line 92</span>
|
|
1351
|
+
|
|
1352
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_enable'>enable</span>
|
|
1353
|
+
<span class='ivar'>@enabled</span> <span class='op'>||=</span> <span class='kw'>true</span>
|
|
1354
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
|
1355
|
+
<span class='kw'>begin</span>
|
|
1356
|
+
<span class='kw'>yield</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
|
|
1357
|
+
<span class='kw'>ensure</span>
|
|
1358
|
+
<span class='id identifier rubyid_close'>close</span>
|
|
1359
|
+
<span class='kw'>end</span>
|
|
1360
|
+
<span class='kw'>end</span>
|
|
1361
|
+
<span class='kw'>self</span>
|
|
1362
|
+
<span class='kw'>end</span></pre>
|
|
1363
|
+
</td>
|
|
1364
|
+
</tr>
|
|
1365
|
+
</table>
|
|
1366
|
+
</div>
|
|
1367
|
+
|
|
1368
|
+
<div class="method_details ">
|
|
1369
|
+
<h3 class="signature " id="gets-instance_method">
|
|
1370
|
+
|
|
1371
|
+
#<strong>gets</strong> ⇒ <tt>Array<Hash></tt>
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
<span class="aliases">Also known as:
|
|
1376
|
+
<span class="names"><span id='read-instance_method'>read</span></span>
|
|
1377
|
+
</span>
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
</h3><div class="docstring">
|
|
1382
|
+
<div class="discussion">
|
|
1383
|
+
<p>Reads MIDI messages from the input buffer.</p>
|
|
1384
|
+
|
|
1385
|
+
<p>Returns an array of MIDI event hashes. Each hash contains:</p>
|
|
1386
|
+
|
|
1387
|
+
<ul>
|
|
1388
|
+
<li><code>:data</code> - Array of numeric bytes (e.g., [144, 60, 100])</li>
|
|
1389
|
+
<li><code>:timestamp</code> - Float timestamp when the message was received</li>
|
|
1390
|
+
</ul>
|
|
1391
|
+
|
|
1392
|
+
<p>This method blocks until at least one message is available.</p>
|
|
1393
|
+
|
|
1394
|
+
<p>An array of MIDI event hashes as such:
|
|
1395
|
+
[
|
|
1396
|
+
{ data: [144, 60, 100], timestamp: 1024 },
|
|
1397
|
+
{ data: [128, 60, 100], timestamp: 1100 },
|
|
1398
|
+
{ data: [144, 40, 120], timestamp: 1200 }
|
|
1399
|
+
]</p>
|
|
1400
|
+
|
|
1401
|
+
<p>The data is an array of Numeric bytes
|
|
1402
|
+
The timestamp is the number of millis since this input was enabled</p>
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
</div>
|
|
1406
|
+
</div>
|
|
1407
|
+
<div class="tags">
|
|
1408
|
+
|
|
1409
|
+
<div class="examples">
|
|
1410
|
+
<h4 class="tag_title">Examples:</h4>
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
<pre class="example code"><code><span class='id identifier rubyid_messages'>messages</span> <span class='op'>=</span> <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span>
|
|
1414
|
+
<span class='comment'># => [{ data: [144, 60, 100], timestamp: 1024.5 }]</span></code></pre>
|
|
1415
|
+
|
|
1416
|
+
</div>
|
|
1417
|
+
|
|
1418
|
+
<p class="tag_title">Returns:</p>
|
|
1419
|
+
<ul class="return">
|
|
1420
|
+
|
|
1421
|
+
<li>
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
<span class='type'>(<tt>Array<Hash></tt>)</span>
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
—
|
|
1429
|
+
<div class='inline'><p>array of MIDI event hashes</p>
|
|
1430
|
+
</div>
|
|
1431
|
+
|
|
1432
|
+
</li>
|
|
1433
|
+
|
|
1434
|
+
<li>
|
|
1435
|
+
|
|
1436
|
+
|
|
1437
|
+
<span class='type'>(<tt>Array<Hash></tt>)</span>
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
</li>
|
|
1442
|
+
|
|
1443
|
+
</ul>
|
|
1444
|
+
|
|
1445
|
+
</div><table class="source_code">
|
|
1446
|
+
<tr>
|
|
1447
|
+
<td>
|
|
1448
|
+
<pre class="lines">
|
|
1449
|
+
|
|
1450
|
+
|
|
1451
|
+
50
|
|
1452
|
+
51
|
|
1453
|
+
52</pre>
|
|
1454
|
+
</td>
|
|
1455
|
+
<td>
|
|
1456
|
+
<pre class="code"><span class="info file"># File 'lib/midi-communications-macos/source.rb', line 50</span>
|
|
1457
|
+
|
|
1458
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_gets'>gets</span>
|
|
1459
|
+
<span class='id identifier rubyid_get_queue_new_messages'>get_queue_new_messages</span>
|
|
1460
|
+
<span class='kw'>end</span></pre>
|
|
1461
|
+
</td>
|
|
1462
|
+
</tr>
|
|
1463
|
+
</table>
|
|
1464
|
+
</div>
|
|
1465
|
+
|
|
1466
|
+
<div class="method_details ">
|
|
1467
|
+
<h3 class="signature " id="gets_s-instance_method">
|
|
1468
|
+
|
|
1469
|
+
#<strong>gets_s</strong> ⇒ <tt>Array<Hash></tt>
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
<span class="aliases">Also known as:
|
|
1474
|
+
<span class="names"><span id='gets_bytestr-instance_method'>gets_bytestr</span></span>
|
|
1475
|
+
</span>
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
</h3><div class="docstring">
|
|
1480
|
+
<div class="discussion">
|
|
1481
|
+
<p>Reads MIDI messages as hex strings.</p>
|
|
1482
|
+
|
|
1483
|
+
<p>Same as <span class='object_link'><a href="#gets-instance_method" title="MIDICommunicationsMacOS::Source#gets (method)">#gets</a></span> but returns message data as hex strings instead
|
|
1484
|
+
of byte arrays.</p>
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
</div>
|
|
1488
|
+
</div>
|
|
1489
|
+
<div class="tags">
|
|
1490
|
+
|
|
1491
|
+
<div class="examples">
|
|
1492
|
+
<h4 class="tag_title">Examples:</h4>
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
<pre class="example code"><code><span class='id identifier rubyid_messages'>messages</span> <span class='op'>=</span> <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_gets_s'>gets_s</span>
|
|
1496
|
+
<span class='comment'># => [{ data: "904060", timestamp: 904 },
|
|
1497
|
+
</span><span class='comment'># { data: "804060", timestamp: 1150 }]</span></code></pre>
|
|
1498
|
+
|
|
1499
|
+
</div>
|
|
1500
|
+
|
|
1501
|
+
<p class="tag_title">Returns:</p>
|
|
1502
|
+
<ul class="return">
|
|
1503
|
+
|
|
1504
|
+
<li>
|
|
1505
|
+
|
|
1506
|
+
|
|
1507
|
+
<span class='type'>(<tt>Array<Hash></tt>)</span>
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
—
|
|
1512
|
+
<div class='inline'><p>array of MIDI event hashes with hex string data</p>
|
|
1513
|
+
</div>
|
|
1514
|
+
|
|
1515
|
+
</li>
|
|
1516
|
+
|
|
1517
|
+
</ul>
|
|
1518
|
+
|
|
1519
|
+
</div><table class="source_code">
|
|
1520
|
+
<tr>
|
|
1521
|
+
<td>
|
|
1522
|
+
<pre class="lines">
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
66
|
|
1526
|
+
67
|
|
1527
|
+
68
|
|
1528
|
+
69
|
|
1529
|
+
70
|
|
1530
|
+
71
|
|
1531
|
+
72</pre>
|
|
1532
|
+
</td>
|
|
1533
|
+
<td>
|
|
1534
|
+
<pre class="code"><span class="info file"># File 'lib/midi-communications-macos/source.rb', line 66</span>
|
|
1535
|
+
|
|
1536
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_gets_s'>gets_s</span>
|
|
1537
|
+
<span class='id identifier rubyid_messages'>messages</span> <span class='op'>=</span> <span class='id identifier rubyid_gets'>gets</span>
|
|
1538
|
+
<span class='id identifier rubyid_messages'>messages</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_message'>message</span><span class='op'>|</span>
|
|
1539
|
+
<span class='id identifier rubyid_message'>message</span><span class='lbracket'>[</span><span class='symbol'>:data</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="TypeConversion.html" title="MIDICommunicationsMacOS::TypeConversion (module)">TypeConversion</a></span></span><span class='period'>.</span><span class='id identifier rubyid_numeric_bytes_to_hex_string'><span class='object_link'><a href="TypeConversion.html#numeric_bytes_to_hex_string-instance_method" title="MIDICommunicationsMacOS::TypeConversion#numeric_bytes_to_hex_string (method)">numeric_bytes_to_hex_string</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='lbracket'>[</span><span class='symbol'>:data</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
|
1540
|
+
<span class='kw'>end</span>
|
|
1541
|
+
<span class='id identifier rubyid_messages'>messages</span>
|
|
1542
|
+
<span class='kw'>end</span></pre>
|
|
1543
|
+
</td>
|
|
1544
|
+
</tr>
|
|
1545
|
+
</table>
|
|
1546
|
+
</div>
|
|
1547
|
+
|
|
1548
|
+
<div class="method_details ">
|
|
1549
|
+
<h3 class="signature " id="initialize-instance_method">
|
|
1550
|
+
|
|
1551
|
+
#<strong>initialize</strong>(resource_id, entity) ⇒ <tt>Object</tt>
|
|
1552
|
+
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
<span class="not_defined_here">
|
|
1558
|
+
Originally defined in module
|
|
1559
|
+
<span class='object_link'><a href="Endpoint.html#initialize-instance_method" title="MIDICommunicationsMacOS::Endpoint#initialize (method)">Endpoint</a></span>
|
|
1560
|
+
</span>
|
|
1561
|
+
|
|
1562
|
+
</h3><div class="docstring">
|
|
1563
|
+
<div class="discussion">
|
|
1564
|
+
|
|
1565
|
+
|
|
1566
|
+
</div>
|
|
1567
|
+
</div>
|
|
1568
|
+
<div class="tags">
|
|
1569
|
+
<p class="tag_title">Parameters:</p>
|
|
1570
|
+
<ul class="param">
|
|
1571
|
+
|
|
1572
|
+
<li>
|
|
1573
|
+
|
|
1574
|
+
<span class='name'>resource_id</span>
|
|
1575
|
+
|
|
1576
|
+
|
|
1577
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
|
1578
|
+
|
|
1579
|
+
|
|
1580
|
+
|
|
1581
|
+
</li>
|
|
1582
|
+
|
|
1583
|
+
<li>
|
|
1584
|
+
|
|
1585
|
+
<span class='name'>entity</span>
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
<span class='type'>(<tt><span class='object_link'><a href="Entity.html" title="MIDICommunicationsMacOS::Entity (class)">Entity</a></span></tt>)</span>
|
|
1589
|
+
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
</li>
|
|
1593
|
+
|
|
1594
|
+
</ul>
|
|
1595
|
+
|
|
1596
|
+
|
|
1597
|
+
</div>
|
|
1598
|
+
</div>
|
|
1599
|
+
|
|
1600
|
+
<div class="method_details ">
|
|
1601
|
+
<h3 class="signature " id="manufacturer-instance_method">
|
|
1602
|
+
|
|
1603
|
+
#<strong>manufacturer</strong> ⇒ <tt>String</tt>
|
|
1604
|
+
|
|
1605
|
+
|
|
1606
|
+
|
|
1607
|
+
|
|
1608
|
+
|
|
1609
|
+
<span class="not_defined_here">
|
|
1610
|
+
Originally defined in module
|
|
1611
|
+
<span class='object_link'><a href="Endpoint.html#manufacturer-instance_method" title="MIDICommunicationsMacOS::Endpoint#manufacturer (method)">Endpoint</a></span>
|
|
1612
|
+
</span>
|
|
1613
|
+
|
|
1614
|
+
</h3><div class="docstring">
|
|
1615
|
+
<div class="discussion">
|
|
1616
|
+
<p>Returns device manufacturer name (delegated to entity).</p>
|
|
1617
|
+
|
|
1618
|
+
|
|
1619
|
+
</div>
|
|
1620
|
+
</div>
|
|
1621
|
+
<div class="tags">
|
|
1622
|
+
|
|
1623
|
+
<p class="tag_title">Returns:</p>
|
|
1624
|
+
<ul class="return">
|
|
1625
|
+
|
|
1626
|
+
<li>
|
|
1627
|
+
|
|
1628
|
+
|
|
1629
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1630
|
+
|
|
1631
|
+
|
|
1632
|
+
|
|
1633
|
+
—
|
|
1634
|
+
<div class='inline'><p>device manufacturer name (delegated to entity)</p>
|
|
1635
|
+
</div>
|
|
1636
|
+
|
|
1637
|
+
</li>
|
|
1638
|
+
|
|
1639
|
+
</ul>
|
|
1640
|
+
|
|
1641
|
+
</div>
|
|
1642
|
+
</div>
|
|
1643
|
+
|
|
1644
|
+
<div class="method_details ">
|
|
1645
|
+
<h3 class="signature " id="model-instance_method">
|
|
1646
|
+
|
|
1647
|
+
#<strong>model</strong> ⇒ <tt>String</tt>
|
|
1648
|
+
|
|
1649
|
+
|
|
1650
|
+
|
|
1651
|
+
|
|
1652
|
+
|
|
1653
|
+
<span class="not_defined_here">
|
|
1654
|
+
Originally defined in module
|
|
1655
|
+
<span class='object_link'><a href="Endpoint.html#model-instance_method" title="MIDICommunicationsMacOS::Endpoint#model (method)">Endpoint</a></span>
|
|
1656
|
+
</span>
|
|
1657
|
+
|
|
1658
|
+
</h3><div class="docstring">
|
|
1659
|
+
<div class="discussion">
|
|
1660
|
+
<p>Returns device model name (delegated to entity).</p>
|
|
1661
|
+
|
|
1662
|
+
|
|
1663
|
+
</div>
|
|
1664
|
+
</div>
|
|
1665
|
+
<div class="tags">
|
|
1666
|
+
|
|
1667
|
+
<p class="tag_title">Returns:</p>
|
|
1668
|
+
<ul class="return">
|
|
1669
|
+
|
|
1670
|
+
<li>
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
—
|
|
1678
|
+
<div class='inline'><p>device model name (delegated to entity)</p>
|
|
1679
|
+
</div>
|
|
1680
|
+
|
|
1681
|
+
</li>
|
|
1682
|
+
|
|
1683
|
+
</ul>
|
|
1684
|
+
|
|
1685
|
+
</div>
|
|
1686
|
+
</div>
|
|
1687
|
+
|
|
1688
|
+
<div class="method_details ">
|
|
1689
|
+
<h3 class="signature " id="name-instance_method">
|
|
1690
|
+
|
|
1691
|
+
#<strong>name</strong> ⇒ <tt>String</tt>
|
|
1692
|
+
|
|
1693
|
+
|
|
1694
|
+
|
|
1695
|
+
|
|
1696
|
+
|
|
1697
|
+
<span class="not_defined_here">
|
|
1698
|
+
Originally defined in module
|
|
1699
|
+
<span class='object_link'><a href="Endpoint.html#name-instance_method" title="MIDICommunicationsMacOS::Endpoint#name (method)">Endpoint</a></span>
|
|
1700
|
+
</span>
|
|
1701
|
+
|
|
1702
|
+
</h3><div class="docstring">
|
|
1703
|
+
<div class="discussion">
|
|
1704
|
+
<p>Returns endpoint name (delegated to entity).</p>
|
|
1705
|
+
|
|
1706
|
+
|
|
1707
|
+
</div>
|
|
1708
|
+
</div>
|
|
1709
|
+
<div class="tags">
|
|
1710
|
+
|
|
1711
|
+
<p class="tag_title">Returns:</p>
|
|
1712
|
+
<ul class="return">
|
|
1713
|
+
|
|
1714
|
+
<li>
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
|
|
1721
|
+
—
|
|
1722
|
+
<div class='inline'><p>endpoint name (delegated to entity)</p>
|
|
1723
|
+
</div>
|
|
1724
|
+
|
|
1725
|
+
</li>
|
|
1726
|
+
|
|
1727
|
+
</ul>
|
|
1728
|
+
|
|
1729
|
+
</div>
|
|
1730
|
+
</div>
|
|
1731
|
+
|
|
1732
|
+
<div class="method_details ">
|
|
1733
|
+
<h3 class="signature " id="online?-instance_method">
|
|
1734
|
+
|
|
1735
|
+
#<strong>online?</strong> ⇒ <tt>Boolean</tt>
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
|
|
1740
|
+
|
|
1741
|
+
<span class="not_defined_here">
|
|
1742
|
+
Originally defined in module
|
|
1743
|
+
<span class='object_link'><a href="Endpoint.html#online%3F-instance_method" title="MIDICommunicationsMacOS::Endpoint#online? (method)">Endpoint</a></span>
|
|
1744
|
+
</span>
|
|
1745
|
+
|
|
1746
|
+
</h3><div class="docstring">
|
|
1747
|
+
<div class="discussion">
|
|
1748
|
+
<p>Is this endpoint online?</p>
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
</div>
|
|
1752
|
+
</div>
|
|
1753
|
+
<div class="tags">
|
|
1754
|
+
|
|
1755
|
+
<p class="tag_title">Returns:</p>
|
|
1756
|
+
<ul class="return">
|
|
1757
|
+
|
|
1758
|
+
<li>
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
1762
|
+
|
|
1763
|
+
|
|
1764
|
+
|
|
1765
|
+
</li>
|
|
1766
|
+
|
|
1767
|
+
</ul>
|
|
1768
|
+
|
|
1769
|
+
</div>
|
|
1770
|
+
</div>
|
|
1771
|
+
|
|
1772
|
+
</div>
|
|
1773
|
+
|
|
1774
|
+
</div>
|
|
1775
|
+
|
|
1776
|
+
<div id="footer">
|
|
1777
|
+
Generated on Tue Nov 25 11:37:07 2025 by
|
|
1778
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1779
|
+
0.9.37 (ruby-3.4.7).
|
|
1780
|
+
</div>
|
|
1781
|
+
|
|
1782
|
+
</div>
|
|
1783
|
+
</body>
|
|
1784
|
+
</html>
|