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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.version +6 -0
  3. data/.yardoc/checksums +9 -0
  4. data/.yardoc/complete +0 -0
  5. data/.yardoc/object_types +0 -0
  6. data/.yardoc/objects/root.dat +0 -0
  7. data/.yardoc/proxy_types +0 -0
  8. data/.yardopts +6 -0
  9. data/LICENSE +159 -668
  10. data/README.md +6 -13
  11. data/doc/MIDICommunicationsMacOS/API/CF.html +124 -0
  12. data/doc/MIDICommunicationsMacOS/API/HostTime.html +124 -0
  13. data/doc/MIDICommunicationsMacOS/API/MIDIPacket.html +137 -0
  14. data/doc/MIDICommunicationsMacOS/API/MIDIPacketList.html +137 -0
  15. data/doc/MIDICommunicationsMacOS/API/MIDISysexSendRequest.html +137 -0
  16. data/doc/MIDICommunicationsMacOS/API.html +912 -0
  17. data/doc/MIDICommunicationsMacOS/Destination.html +1983 -0
  18. data/doc/MIDICommunicationsMacOS/Device.html +1102 -0
  19. data/doc/MIDICommunicationsMacOS/Endpoint.html +1665 -0
  20. data/doc/MIDICommunicationsMacOS/Entity.html +971 -0
  21. data/doc/MIDICommunicationsMacOS/Source.html +1784 -0
  22. data/doc/MIDICommunicationsMacOS/TypeConversion.html +393 -0
  23. data/doc/MIDICommunicationsMacOS.html +214 -0
  24. data/doc/_index.html +250 -0
  25. data/doc/class_list.html +54 -0
  26. data/doc/css/common.css +1 -0
  27. data/doc/css/full_list.css +58 -0
  28. data/doc/css/style.css +503 -0
  29. data/doc/file.README.html +275 -0
  30. data/doc/file_list.html +59 -0
  31. data/doc/frames.html +22 -0
  32. data/doc/index.html +275 -0
  33. data/doc/js/app.js +344 -0
  34. data/doc/js/full_list.js +242 -0
  35. data/doc/js/jquery.js +4 -0
  36. data/doc/method_list.html +542 -0
  37. data/doc/top-level-namespace.html +110 -0
  38. data/lib/midi-communications-macos/api.rb +7 -1
  39. data/lib/midi-communications-macos/destination.rb +86 -20
  40. data/lib/midi-communications-macos/device.rb +52 -18
  41. data/lib/midi-communications-macos/endpoint.rb +31 -5
  42. data/lib/midi-communications-macos/entity.rb +20 -6
  43. data/lib/midi-communications-macos/source.rb +79 -19
  44. data/lib/midi-communications-macos/type_conversion.rb +11 -4
  45. data/lib/midi-communications-macos/version.rb +2 -1
  46. data/lib/midi-communications-macos.rb +37 -0
  47. data/midi-communications-macos.gemspec +11 -9
  48. metadata +83 -4
@@ -0,0 +1,393 @@
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
+ Module: MIDICommunicationsMacOS::TypeConversion
8
+
9
+ &mdash; 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::TypeConversion";
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 (T)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../MIDICommunicationsMacOS.html" title="MIDICommunicationsMacOS (module)">MIDICommunicationsMacOS</a></span></span>
41
+ &raquo;
42
+ <span class="title">TypeConversion</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>Module: MIDICommunicationsMacOS::TypeConversion
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+ <dl>
73
+ <dt>Extended by:</dt>
74
+ <dd><span class='object_link'><a href="" title="MIDICommunicationsMacOS::TypeConversion (module)">TypeConversion</a></span></dd>
75
+ </dl>
76
+
77
+
78
+
79
+
80
+
81
+
82
+ <dl>
83
+ <dt>Included in:</dt>
84
+ <dd><span class='object_link'><a href="" title="MIDICommunicationsMacOS::TypeConversion (module)">TypeConversion</a></span></dd>
85
+ </dl>
86
+
87
+
88
+
89
+ <dl>
90
+ <dt>Defined in:</dt>
91
+ <dd>lib/midi-communications-macos/type_conversion.rb</dd>
92
+ </dl>
93
+
94
+ </div>
95
+
96
+ <h2>Overview</h2><div class="docstring">
97
+ <div class="discussion">
98
+ <p>Utility methods for converting between MIDI data formats.</p>
99
+
100
+
101
+ </div>
102
+ </div>
103
+ <div class="tags">
104
+
105
+
106
+ </div>
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ <h2>
115
+ Class Method Summary
116
+ <small><a href="#" class="summary_toggle">collapse</a></small>
117
+ </h2>
118
+
119
+ <ul class="summary">
120
+
121
+ <li class="public ">
122
+ <span class="summary_signature">
123
+
124
+ <a href="#numeric_bytes_to_hex_string-class_method" title="#numeric_bytes_to_hex_string (class method)">.<strong>numeric_bytes_to_hex_string</strong>(bytes) &#x21d2; String </a>
125
+
126
+
127
+
128
+ </span>
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+ <span class="summary_desc"><div class='inline'><p>Converts an array of numeric bytes to a hex string.</p>
139
+ </div></span>
140
+
141
+ </li>
142
+
143
+
144
+ </ul>
145
+
146
+ <h2>
147
+ Instance Method Summary
148
+ <small><a href="#" class="summary_toggle">collapse</a></small>
149
+ </h2>
150
+
151
+ <ul class="summary">
152
+
153
+ <li class="public ">
154
+ <span class="summary_signature">
155
+
156
+ <a href="#numeric_bytes_to_hex_string-instance_method" title="#numeric_bytes_to_hex_string (instance method)">#<strong>numeric_bytes_to_hex_string</strong>(bytes) &#x21d2; String </a>
157
+
158
+
159
+
160
+ </span>
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+ <span class="summary_desc"><div class='inline'><p>Converts an array of numeric bytes to a hex string.</p>
171
+ </div></span>
172
+
173
+ </li>
174
+
175
+
176
+ </ul>
177
+
178
+
179
+
180
+
181
+ <div id="class_method_details" class="method_details_list">
182
+ <h2>Class Method Details</h2>
183
+
184
+
185
+ <div class="method_details first">
186
+ <h3 class="signature first" id="numeric_bytes_to_hex_string-class_method">
187
+
188
+ .<strong>numeric_bytes_to_hex_string</strong>(bytes) &#x21d2; <tt>String</tt>
189
+
190
+
191
+
192
+
193
+
194
+ </h3><div class="docstring">
195
+ <div class="discussion">
196
+ <p>Converts an array of numeric bytes to a hex string.</p>
197
+
198
+
199
+ </div>
200
+ </div>
201
+ <div class="tags">
202
+
203
+ <div class="examples">
204
+ <h4 class="tag_title">Examples:</h4>
205
+
206
+
207
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="MIDICommunicationsMacOS::TypeConversion (module)">TypeConversion</a></span></span><span class='period'>.</span><span class='id identifier rubyid_numeric_bytes_to_hex_string'>numeric_bytes_to_hex_string</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='int'>0x90</span><span class='comma'>,</span> <span class='int'>0x40</span><span class='comma'>,</span> <span class='int'>0x40</span><span class='rbracket'>]</span><span class='rparen'>)</span>
208
+ <span class='comment'># =&gt; &quot;904040&quot;</span></code></pre>
209
+
210
+ </div>
211
+ <p class="tag_title">Parameters:</p>
212
+ <ul class="param">
213
+
214
+ <li>
215
+
216
+ <span class='name'>bytes</span>
217
+
218
+
219
+ <span class='type'>(<tt>Array&lt;Integer&gt;</tt>)</span>
220
+
221
+
222
+
223
+ &mdash;
224
+ <div class='inline'><p>array of numeric bytes (e.g., [0x90, 0x40, 0x40])</p>
225
+ </div>
226
+
227
+ </li>
228
+
229
+ </ul>
230
+
231
+ <p class="tag_title">Returns:</p>
232
+ <ul class="return">
233
+
234
+ <li>
235
+
236
+
237
+ <span class='type'>(<tt>String</tt>)</span>
238
+
239
+
240
+
241
+ &mdash;
242
+ <div class='inline'><p>uppercase hex string (e.g., &quot;904040&quot;)</p>
243
+ </div>
244
+
245
+ </li>
246
+
247
+ </ul>
248
+
249
+ </div><table class="source_code">
250
+ <tr>
251
+ <td>
252
+ <pre class="lines">
253
+
254
+
255
+ 16
256
+ 17
257
+ 18
258
+ 19
259
+ 20
260
+ 21
261
+ 22
262
+ 23</pre>
263
+ </td>
264
+ <td>
265
+ <pre class="code"><span class="info file"># File 'lib/midi-communications-macos/type_conversion.rb', line 16</span>
266
+
267
+ <span class='kw'>def</span> <span class='id identifier rubyid_numeric_bytes_to_hex_string'>numeric_bytes_to_hex_string</span><span class='lparen'>(</span><span class='id identifier rubyid_bytes'>bytes</span><span class='rparen'>)</span>
268
+ <span class='id identifier rubyid_string_bytes'>string_bytes</span> <span class='op'>=</span> <span class='id identifier rubyid_bytes'>bytes</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_byte'>byte</span><span class='op'>|</span>
269
+ <span class='id identifier rubyid_str'>str</span> <span class='op'>=</span> <span class='id identifier rubyid_byte'>byte</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='int'>16</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span>
270
+ <span class='id identifier rubyid_str'>str</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_str'>str</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_byte'>byte</span> <span class='op'>&lt;</span> <span class='int'>16</span>
271
+ <span class='id identifier rubyid_str'>str</span>
272
+ <span class='kw'>end</span>
273
+ <span class='id identifier rubyid_string_bytes'>string_bytes</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span>
274
+ <span class='kw'>end</span></pre>
275
+ </td>
276
+ </tr>
277
+ </table>
278
+ </div>
279
+
280
+ </div>
281
+
282
+ <div id="instance_method_details" class="method_details_list">
283
+ <h2>Instance Method Details</h2>
284
+
285
+
286
+ <div class="method_details first">
287
+ <h3 class="signature first" id="numeric_bytes_to_hex_string-instance_method">
288
+
289
+ #<strong>numeric_bytes_to_hex_string</strong>(bytes) &#x21d2; <tt>String</tt>
290
+
291
+
292
+
293
+
294
+
295
+ </h3><div class="docstring">
296
+ <div class="discussion">
297
+ <p>Converts an array of numeric bytes to a hex string.</p>
298
+
299
+
300
+ </div>
301
+ </div>
302
+ <div class="tags">
303
+
304
+ <div class="examples">
305
+ <h4 class="tag_title">Examples:</h4>
306
+
307
+
308
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="MIDICommunicationsMacOS::TypeConversion (module)">TypeConversion</a></span></span><span class='period'>.</span><span class='id identifier rubyid_numeric_bytes_to_hex_string'>numeric_bytes_to_hex_string</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='int'>0x90</span><span class='comma'>,</span> <span class='int'>0x40</span><span class='comma'>,</span> <span class='int'>0x40</span><span class='rbracket'>]</span><span class='rparen'>)</span>
309
+ <span class='comment'># =&gt; &quot;904040&quot;</span></code></pre>
310
+
311
+ </div>
312
+ <p class="tag_title">Parameters:</p>
313
+ <ul class="param">
314
+
315
+ <li>
316
+
317
+ <span class='name'>bytes</span>
318
+
319
+
320
+ <span class='type'>(<tt>Array&lt;Integer&gt;</tt>)</span>
321
+
322
+
323
+
324
+ &mdash;
325
+ <div class='inline'><p>array of numeric bytes (e.g., [0x90, 0x40, 0x40])</p>
326
+ </div>
327
+
328
+ </li>
329
+
330
+ </ul>
331
+
332
+ <p class="tag_title">Returns:</p>
333
+ <ul class="return">
334
+
335
+ <li>
336
+
337
+
338
+ <span class='type'>(<tt>String</tt>)</span>
339
+
340
+
341
+
342
+ &mdash;
343
+ <div class='inline'><p>uppercase hex string (e.g., &quot;904040&quot;)</p>
344
+ </div>
345
+
346
+ </li>
347
+
348
+ </ul>
349
+
350
+ </div><table class="source_code">
351
+ <tr>
352
+ <td>
353
+ <pre class="lines">
354
+
355
+
356
+ 16
357
+ 17
358
+ 18
359
+ 19
360
+ 20
361
+ 21
362
+ 22
363
+ 23</pre>
364
+ </td>
365
+ <td>
366
+ <pre class="code"><span class="info file"># File 'lib/midi-communications-macos/type_conversion.rb', line 16</span>
367
+
368
+ <span class='kw'>def</span> <span class='id identifier rubyid_numeric_bytes_to_hex_string'>numeric_bytes_to_hex_string</span><span class='lparen'>(</span><span class='id identifier rubyid_bytes'>bytes</span><span class='rparen'>)</span>
369
+ <span class='id identifier rubyid_string_bytes'>string_bytes</span> <span class='op'>=</span> <span class='id identifier rubyid_bytes'>bytes</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_byte'>byte</span><span class='op'>|</span>
370
+ <span class='id identifier rubyid_str'>str</span> <span class='op'>=</span> <span class='id identifier rubyid_byte'>byte</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='int'>16</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span>
371
+ <span class='id identifier rubyid_str'>str</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_str'>str</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_byte'>byte</span> <span class='op'>&lt;</span> <span class='int'>16</span>
372
+ <span class='id identifier rubyid_str'>str</span>
373
+ <span class='kw'>end</span>
374
+ <span class='id identifier rubyid_string_bytes'>string_bytes</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span>
375
+ <span class='kw'>end</span></pre>
376
+ </td>
377
+ </tr>
378
+ </table>
379
+ </div>
380
+
381
+ </div>
382
+
383
+ </div>
384
+
385
+ <div id="footer">
386
+ Generated on Tue Nov 25 11:37:07 2025 by
387
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
388
+ 0.9.37 (ruby-3.4.7).
389
+ </div>
390
+
391
+ </div>
392
+ </body>
393
+ </html>
@@ -0,0 +1,214 @@
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
+ Module: MIDICommunicationsMacOS
8
+
9
+ &mdash; 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";
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 (M)</a> &raquo;
40
+
41
+
42
+ <span class="title">MIDICommunicationsMacOS</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>Module: MIDICommunicationsMacOS
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/midi-communications-macos.rb<span class="defines">,<br />
82
+ lib/midi-communications-macos/api.rb,<br /> lib/midi-communications-macos/device.rb,<br /> lib/midi-communications-macos/entity.rb,<br /> lib/midi-communications-macos/source.rb,<br /> lib/midi-communications-macos/version.rb,<br /> lib/midi-communications-macos/endpoint.rb,<br /> lib/midi-communications-macos/destination.rb,<br /> lib/midi-communications-macos/type_conversion.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Overview</h2><div class="docstring">
89
+ <div class="discussion">
90
+ <p>macOS-specific MIDI I/O using the Core MIDI framework.</p>
91
+
92
+ <p>This library provides low-level access to MIDI devices on macOS through
93
+ Apple&#39;s Core MIDI framework via FFI bindings. It is typically used through
94
+ the higher-level <a href="https://github.com/javier-sy/midi-communications" target="_parent" title="midi-communications">midi-communications</a> gem.</p>
95
+
96
+ <p>The main classes are:</p>
97
+
98
+ <ul>
99
+ <li><span class='object_link'><a href="MIDICommunicationsMacOS/Source.html" title="MIDICommunicationsMacOS::Source (class)">Source</a></span> - MIDI input endpoints for receiving messages</li>
100
+ <li><span class='object_link'><a href="MIDICommunicationsMacOS/Destination.html" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span> - MIDI output endpoints for sending messages</li>
101
+ <li><span class='object_link'><a href="MIDICommunicationsMacOS/Device.html" title="MIDICommunicationsMacOS::Device (class)">Device</a></span> - Physical or virtual MIDI devices</li>
102
+ <li><span class='object_link'><a href="MIDICommunicationsMacOS/Entity.html" title="MIDICommunicationsMacOS::Entity (class)">Entity</a></span> - Logical groupings of endpoints within a device</li>
103
+ </ul>
104
+
105
+
106
+ </div>
107
+ </div>
108
+ <div class="tags">
109
+
110
+ <div class="examples">
111
+ <h4 class="tag_title">Examples:</h4>
112
+
113
+
114
+ <h5 class="example_title"><div class='inline'><p>List all MIDI sources (inputs)</p>
115
+ </div></h5>
116
+
117
+ <pre class="example code"><code><span class='const'>MIDICommunicationsMacOS</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="MIDICommunicationsMacOS/Source.html" title="MIDICommunicationsMacOS::Source (class)">Source</a></span></span><span class='period'>.</span><span class='id identifier rubyid_all'><span class='object_link'><a href="MIDICommunicationsMacOS/Source.html#all-class_method" title="MIDICommunicationsMacOS::Source.all (method)">all</a></span></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_source'>source</span><span class='op'>|</span>
118
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_display_name'>display_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
119
+ <span class='kw'>end</span></code></pre>
120
+
121
+
122
+ <h5 class="example_title"><div class='inline'><p>List all MIDI destinations (outputs)</p>
123
+ </div></h5>
124
+
125
+ <pre class="example code"><code><span class='const'>MIDICommunicationsMacOS</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="MIDICommunicationsMacOS/Destination.html" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span></span><span class='period'>.</span><span class='id identifier rubyid_all'><span class='object_link'><a href="MIDICommunicationsMacOS/Destination.html#all-class_method" title="MIDICommunicationsMacOS::Destination.all (method)">all</a></span></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_dest'>dest</span><span class='op'>|</span>
126
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dest'>dest</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dest'>dest</span><span class='period'>.</span><span class='id identifier rubyid_display_name'>display_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
127
+ <span class='kw'>end</span></code></pre>
128
+
129
+
130
+ <h5 class="example_title"><div class='inline'><p>Send a MIDI message</p>
131
+ </div></h5>
132
+
133
+ <pre class="example code"><code><span class='id identifier rubyid_output'>output</span> <span class='op'>=</span> <span class='const'>MIDICommunicationsMacOS</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="MIDICommunicationsMacOS/Destination.html" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span></span><span class='period'>.</span><span class='id identifier rubyid_first'><span class='object_link'><a href="MIDICommunicationsMacOS/Destination.html#first-class_method" title="MIDICommunicationsMacOS::Destination.first (method)">first</a></span></span>
134
+ <span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span>
135
+ <span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='int'>0x90</span><span class='comma'>,</span> <span class='int'>60</span><span class='comma'>,</span> <span class='int'>100</span><span class='rparen'>)</span> <span class='comment'># Note On
136
+ </span><span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='int'>0x80</span><span class='comma'>,</span> <span class='int'>60</span><span class='comma'>,</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='comment'># Note Off</span></code></pre>
137
+
138
+
139
+ <h5 class="example_title"><div class='inline'><p>Receive MIDI messages</p>
140
+ </div></h5>
141
+
142
+ <pre class="example code"><code><span class='id identifier rubyid_input'>input</span> <span class='op'>=</span> <span class='const'>MIDICommunicationsMacOS</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="MIDICommunicationsMacOS/Source.html" title="MIDICommunicationsMacOS::Source (class)">Source</a></span></span><span class='period'>.</span><span class='id identifier rubyid_first'><span class='object_link'><a href="MIDICommunicationsMacOS/Source.html#first-class_method" title="MIDICommunicationsMacOS::Source.first (method)">first</a></span></span>
143
+ <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span>
144
+ <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>
145
+ <span class='comment'># =&gt; [{ data: [144, 60, 100], timestamp: 1234567890.123 }]</span></code></pre>
146
+
147
+ </div>
148
+
149
+
150
+ <p class="tag_title">See Also:</p>
151
+ <ul class="see">
152
+
153
+ <li><a href="https://developer.apple.com/documentation/coremidi" target="_parent" title="Apple Core MIDI Documentation">Apple Core MIDI Documentation</a></li>
154
+
155
+ </ul>
156
+
157
+ </div><h2>Defined Under Namespace</h2>
158
+ <p class="children">
159
+
160
+
161
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="MIDICommunicationsMacOS/API.html" title="MIDICommunicationsMacOS::API (module)">API</a></span>, <span class='object_link'><a href="MIDICommunicationsMacOS/Endpoint.html" title="MIDICommunicationsMacOS::Endpoint (module)">Endpoint</a></span>, <span class='object_link'><a href="MIDICommunicationsMacOS/TypeConversion.html" title="MIDICommunicationsMacOS::TypeConversion (module)">TypeConversion</a></span>
162
+
163
+
164
+
165
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="MIDICommunicationsMacOS/Destination.html" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span>, <span class='object_link'><a href="MIDICommunicationsMacOS/Device.html" title="MIDICommunicationsMacOS::Device (class)">Device</a></span>, <span class='object_link'><a href="MIDICommunicationsMacOS/Entity.html" title="MIDICommunicationsMacOS::Entity (class)">Entity</a></span>, <span class='object_link'><a href="MIDICommunicationsMacOS/Source.html" title="MIDICommunicationsMacOS::Source (class)">Source</a></span>
166
+
167
+
168
+ </p>
169
+
170
+
171
+ <h2>
172
+ Constant Summary
173
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
174
+ </h2>
175
+
176
+ <dl class="constants">
177
+
178
+ <dt id="VERSION-constant" class="">VERSION =
179
+ <div class="docstring">
180
+ <div class="discussion">
181
+ <p>Current version of the midi-communications-macos gem.</p>
182
+
183
+
184
+ </div>
185
+ </div>
186
+ <div class="tags">
187
+
188
+
189
+ </div>
190
+ </dt>
191
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0.6.1</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
192
+
193
+ </dl>
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+ </div>
205
+
206
+ <div id="footer">
207
+ Generated on Tue Nov 25 11:37:07 2025 by
208
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
209
+ 0.9.37 (ruby-3.4.7).
210
+ </div>
211
+
212
+ </div>
213
+ </body>
214
+ </html>