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,1983 @@
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::Destination
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::Destination";
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 (D)</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">Destination</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::Destination
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::Destination</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/destination.rb</dd>
103
+ </dl>
104
+
105
+ </div>
106
+
107
+ <h2>Overview</h2><div class="docstring">
108
+ <div class="discussion">
109
+ <p>MIDI output endpoint for sending MIDI messages.</p>
110
+
111
+ <p>A Destination represents a MIDI output that can send messages to
112
+ external MIDI devices or software. Messages can be sent as numeric
113
+ bytes, hex strings, or arrays.</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>Send a Note On/Off sequence</p>
125
+ </div></h5>
126
+
127
+ <pre class="example code"><code><span class='id identifier rubyid_output'>output</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'>Destination</span><span class='period'>.</span><span class='id identifier rubyid_first'><span class='object_link'><a href="#first-class_method" title="MIDICommunicationsMacOS::Destination.first (method)">first</a></span></span>
128
+ <span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span>
129
+ <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, middle C, velocity 100
130
+ </span><span class='id identifier rubyid_sleep'>sleep</span><span class='lparen'>(</span><span class='float'>0.5</span><span class='rparen'>)</span>
131
+ <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>
132
+
133
+
134
+ <h5 class="example_title"><div class='inline'><p>Send as hex string</p>
135
+ </div></h5>
136
+
137
+ <pre class="example code"><code><span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_puts_s'>puts_s</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>903C64</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='comment'># Note On
138
+ </span><span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_puts_s'>puts_s</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>803C00</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='comment'># Note Off</span></code></pre>
139
+
140
+ </div>
141
+
142
+
143
+ <p class="tag_title">See Also:</p>
144
+ <ul class="see">
145
+
146
+ <li><span class='object_link'><a href="Source.html" title="MIDICommunicationsMacOS::Source (class)">For receiving MIDI messages</a></span></li>
147
+
148
+ <li><span class='object_link'><a href="Endpoint.html" title="MIDICommunicationsMacOS::Endpoint (module)">For shared endpoint functionality</a></span></li>
149
+
150
+ </ul>
151
+
152
+ </div>
153
+
154
+
155
+
156
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
157
+ <ul class="summary">
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#enabled-instance_method" title="#enabled (instance method)">#<strong>enabled</strong> &#x21d2; Boolean </a>
163
+
164
+
165
+
166
+ (also: #enabled?)
167
+
168
+ </span>
169
+
170
+ <span class="note title not_defined_here">
171
+ included
172
+ from <span class='object_link'><a href="Endpoint.html#enabled-instance_method" title="MIDICommunicationsMacOS::Endpoint#enabled (method)">Endpoint</a></span>
173
+ </span>
174
+
175
+
176
+
177
+
178
+ <span class="note title readonly">readonly</span>
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+ <span class="summary_desc"><div class='inline'><p>Whether the endpoint has been initialized.</p>
189
+ </div></span>
190
+
191
+ </li>
192
+
193
+
194
+ <li class="public ">
195
+ <span class="summary_signature">
196
+
197
+ <a href="#entity-instance_method" title="#entity (instance method)">#<strong>entity</strong> &#x21d2; Object </a>
198
+
199
+
200
+
201
+ </span>
202
+
203
+
204
+
205
+
206
+ <span class="note title readonly">readonly</span>
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+ <span class="summary_desc"><div class='inline'></div></span>
217
+
218
+ </li>
219
+
220
+
221
+ <li class="public ">
222
+ <span class="summary_signature">
223
+
224
+ <a href="#entity-instance_method" title="#entity (instance method)">#<strong>entity</strong> &#x21d2; Entity </a>
225
+
226
+
227
+
228
+ </span>
229
+
230
+ <span class="note title not_defined_here">
231
+ included
232
+ from <span class='object_link'><a href="Endpoint.html#entity-instance_method" title="MIDICommunicationsMacOS::Endpoint#entity (method)">Endpoint</a></span>
233
+ </span>
234
+
235
+
236
+
237
+
238
+ <span class="note title readonly">readonly</span>
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+ <span class="summary_desc"><div class='inline'><p>The parent entity.</p>
249
+ </div></span>
250
+
251
+ </li>
252
+
253
+
254
+ <li class="public ">
255
+ <span class="summary_signature">
256
+
257
+ <a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> &#x21d2; Integer </a>
258
+
259
+
260
+
261
+ </span>
262
+
263
+ <span class="note title not_defined_here">
264
+ included
265
+ from <span class='object_link'><a href="Endpoint.html#id-instance_method" title="MIDICommunicationsMacOS::Endpoint#id (method)">Endpoint</a></span>
266
+ </span>
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+ <span class="summary_desc"><div class='inline'><p>Unique local numeric ID of the endpoint.</p>
280
+ </div></span>
281
+
282
+ </li>
283
+
284
+
285
+ <li class="public ">
286
+ <span class="summary_signature">
287
+
288
+ <a href="#resource_id-instance_method" title="#resource_id (instance method)">#<strong>resource_id</strong> &#x21d2; Integer </a>
289
+
290
+
291
+
292
+ </span>
293
+
294
+ <span class="note title not_defined_here">
295
+ included
296
+ from <span class='object_link'><a href="Endpoint.html#resource_id-instance_method" title="MIDICommunicationsMacOS::Endpoint#resource_id (method)">Endpoint</a></span>
297
+ </span>
298
+
299
+
300
+
301
+
302
+ <span class="note title readonly">readonly</span>
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+ <span class="summary_desc"><div class='inline'><p>Core MIDI resource identifier.</p>
313
+ </div></span>
314
+
315
+ </li>
316
+
317
+
318
+ <li class="public ">
319
+ <span class="summary_signature">
320
+
321
+ <a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> &#x21d2; Object </a>
322
+
323
+
324
+
325
+ </span>
326
+
327
+ <span class="note title not_defined_here">
328
+ included
329
+ from <span class='object_link'><a href="Endpoint.html#type-instance_method" title="MIDICommunicationsMacOS::Endpoint#type (method)">Endpoint</a></span>
330
+ </span>
331
+
332
+
333
+
334
+
335
+ <span class="note title readonly">readonly</span>
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+ <span class="summary_desc"><div class='inline'></div></span>
346
+
347
+ </li>
348
+
349
+
350
+ </ul>
351
+
352
+
353
+
354
+
355
+
356
+ <h2>
357
+ Class Method Summary
358
+ <small><a href="#" class="summary_toggle">collapse</a></small>
359
+ </h2>
360
+
361
+ <ul class="summary">
362
+
363
+ <li class="public ">
364
+ <span class="summary_signature">
365
+
366
+ <a href="#all-class_method" title="all (class method)">.<strong>all</strong> &#x21d2; Array&lt;Destination&gt; </a>
367
+
368
+
369
+
370
+ </span>
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+ <span class="summary_desc"><div class='inline'><p>Returns all available output endpoints.</p>
381
+ </div></span>
382
+
383
+ </li>
384
+
385
+
386
+ <li class="public ">
387
+ <span class="summary_signature">
388
+
389
+ <a href="#first-class_method" title="first (class method)">.<strong>first</strong> &#x21d2; Destination </a>
390
+
391
+
392
+
393
+ </span>
394
+
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+ <span class="summary_desc"><div class='inline'><p>Returns the first available output endpoint.</p>
404
+ </div></span>
405
+
406
+ </li>
407
+
408
+
409
+ <li class="public ">
410
+ <span class="summary_signature">
411
+
412
+ <a href="#last-class_method" title="last (class method)">.<strong>last</strong> &#x21d2; Destination </a>
413
+
414
+
415
+
416
+ </span>
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+ <span class="summary_desc"><div class='inline'><p>Returns the last available output endpoint.</p>
427
+ </div></span>
428
+
429
+ </li>
430
+
431
+
432
+ </ul>
433
+
434
+ <h2>
435
+ Instance Method Summary
436
+ <small><a href="#" class="summary_toggle">collapse</a></small>
437
+ </h2>
438
+
439
+ <ul class="summary">
440
+
441
+ <li class="public ">
442
+ <span class="summary_signature">
443
+
444
+ <a href="#close-instance_method" title="#close (instance method)">#<strong>close</strong> &#x21d2; Boolean </a>
445
+
446
+
447
+
448
+ </span>
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+ <span class="summary_desc"><div class='inline'><p>Closes this output.</p>
459
+ </div></span>
460
+
461
+ </li>
462
+
463
+
464
+ <li class="public ">
465
+ <span class="summary_signature">
466
+
467
+ <a href="#display_name-instance_method" title="#display_name (instance method)">#<strong>display_name</strong> &#x21d2; String </a>
468
+
469
+
470
+
471
+ </span>
472
+
473
+ <span class="note title not_defined_here">
474
+ included
475
+ from <span class='object_link'><a href="Endpoint.html#display_name-instance_method" title="MIDICommunicationsMacOS::Endpoint#display_name (method)">Endpoint</a></span>
476
+ </span>
477
+
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+ <span class="summary_desc"><div class='inline'><p>Formatted display name (delegated to entity).</p>
487
+ </div></span>
488
+
489
+ </li>
490
+
491
+
492
+ <li class="public ">
493
+ <span class="summary_signature">
494
+
495
+ <a href="#enable-instance_method" title="#enable (instance method)">#<strong>enable</strong> {|destination| ... } &#x21d2; Destination </a>
496
+
497
+
498
+
499
+ (also: #open, #start)
500
+
501
+ </span>
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+ <span class="summary_desc"><div class='inline'><p>Opens this output for use.</p>
512
+ </div></span>
513
+
514
+ </li>
515
+
516
+
517
+ <li class="public ">
518
+ <span class="summary_signature">
519
+
520
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(resource_id, entity) &#x21d2; Object </a>
521
+
522
+
523
+
524
+ </span>
525
+
526
+ <span class="note title not_defined_here">
527
+ included
528
+ from <span class='object_link'><a href="Endpoint.html#initialize-instance_method" title="MIDICommunicationsMacOS::Endpoint#initialize (method)">Endpoint</a></span>
529
+ </span>
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+ <span class="summary_desc"><div class='inline'></div></span>
540
+
541
+ </li>
542
+
543
+
544
+ <li class="public ">
545
+ <span class="summary_signature">
546
+
547
+ <a href="#manufacturer-instance_method" title="#manufacturer (instance method)">#<strong>manufacturer</strong> &#x21d2; String </a>
548
+
549
+
550
+
551
+ </span>
552
+
553
+ <span class="note title not_defined_here">
554
+ included
555
+ from <span class='object_link'><a href="Endpoint.html#manufacturer-instance_method" title="MIDICommunicationsMacOS::Endpoint#manufacturer (method)">Endpoint</a></span>
556
+ </span>
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+ <span class="summary_desc"><div class='inline'><p>Device manufacturer name (delegated to entity).</p>
567
+ </div></span>
568
+
569
+ </li>
570
+
571
+
572
+ <li class="public ">
573
+ <span class="summary_signature">
574
+
575
+ <a href="#model-instance_method" title="#model (instance method)">#<strong>model</strong> &#x21d2; String </a>
576
+
577
+
578
+
579
+ </span>
580
+
581
+ <span class="note title not_defined_here">
582
+ included
583
+ from <span class='object_link'><a href="Endpoint.html#model-instance_method" title="MIDICommunicationsMacOS::Endpoint#model (method)">Endpoint</a></span>
584
+ </span>
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+
594
+ <span class="summary_desc"><div class='inline'><p>Device model name (delegated to entity).</p>
595
+ </div></span>
596
+
597
+ </li>
598
+
599
+
600
+ <li class="public ">
601
+ <span class="summary_signature">
602
+
603
+ <a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> &#x21d2; String </a>
604
+
605
+
606
+
607
+ </span>
608
+
609
+ <span class="note title not_defined_here">
610
+ included
611
+ from <span class='object_link'><a href="Endpoint.html#name-instance_method" title="MIDICommunicationsMacOS::Endpoint#name (method)">Endpoint</a></span>
612
+ </span>
613
+
614
+
615
+
616
+
617
+
618
+
619
+
620
+
621
+
622
+ <span class="summary_desc"><div class='inline'><p>Endpoint name (delegated to entity).</p>
623
+ </div></span>
624
+
625
+ </li>
626
+
627
+
628
+ <li class="public ">
629
+ <span class="summary_signature">
630
+
631
+ <a href="#online%3F-instance_method" title="#online? (instance method)">#<strong>online?</strong> &#x21d2; Boolean </a>
632
+
633
+
634
+
635
+ </span>
636
+
637
+ <span class="note title not_defined_here">
638
+ included
639
+ from <span class='object_link'><a href="Endpoint.html#online%3F-instance_method" title="MIDICommunicationsMacOS::Endpoint#online? (method)">Endpoint</a></span>
640
+ </span>
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+ <span class="summary_desc"><div class='inline'><p>Is this endpoint online?.</p>
651
+ </div></span>
652
+
653
+ </li>
654
+
655
+
656
+ <li class="public ">
657
+ <span class="summary_signature">
658
+
659
+ <a href="#puts-instance_method" title="#puts (instance method)">#<strong>puts</strong>(*args) &#x21d2; Boolean </a>
660
+
661
+
662
+
663
+ (also: #write)
664
+
665
+ </span>
666
+
667
+
668
+
669
+
670
+
671
+
672
+
673
+
674
+
675
+ <span class="summary_desc"><div class='inline'><p>Sends a MIDI message in any supported format.</p>
676
+ </div></span>
677
+
678
+ </li>
679
+
680
+
681
+ <li class="public ">
682
+ <span class="summary_signature">
683
+
684
+ <a href="#puts_bytes-instance_method" title="#puts_bytes (instance method)">#<strong>puts_bytes</strong>(*data) &#x21d2; Boolean </a>
685
+
686
+
687
+
688
+ </span>
689
+
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+ <span class="summary_desc"><div class='inline'><p>Sends a MIDI message as numeric bytes.</p>
699
+ </div></span>
700
+
701
+ </li>
702
+
703
+
704
+ <li class="public ">
705
+ <span class="summary_signature">
706
+
707
+ <a href="#puts_s-instance_method" title="#puts_s (instance method)">#<strong>puts_s</strong>(data) &#x21d2; Boolean </a>
708
+
709
+
710
+
711
+ (also: #puts_bytestr, #puts_hex)
712
+
713
+ </span>
714
+
715
+
716
+
717
+
718
+
719
+
720
+
721
+
722
+
723
+ <span class="summary_desc"><div class='inline'><p>Sends a MIDI message as a hex string.</p>
724
+ </div></span>
725
+
726
+ </li>
727
+
728
+
729
+ </ul>
730
+
731
+
732
+
733
+
734
+
735
+
736
+ <div id="instance_attr_details" class="attr_details">
737
+ <h2>Instance Attribute Details</h2>
738
+
739
+
740
+ <span id=""></span>
741
+ <div class="method_details first">
742
+ <h3 class="signature first" id="enabled-instance_method">
743
+
744
+ #<strong>enabled</strong> &#x21d2; <tt>Boolean</tt> <span class="extras">(readonly)</span>
745
+
746
+
747
+
748
+ <span class="aliases">Also known as:
749
+ <span class="names"><span id='enabled?-instance_method'>enabled?</span></span>
750
+ </span>
751
+
752
+
753
+
754
+ <span class="not_defined_here">
755
+ Originally defined in module
756
+ <span class='object_link'><a href="Endpoint.html#enabled-instance_method" title="MIDICommunicationsMacOS::Endpoint#enabled (method)">Endpoint</a></span>
757
+ </span>
758
+
759
+ </h3><div class="docstring">
760
+ <div class="discussion">
761
+ <p>Returns whether the endpoint has been initialized.</p>
762
+
763
+
764
+ </div>
765
+ </div>
766
+ <div class="tags">
767
+
768
+ <p class="tag_title">Returns:</p>
769
+ <ul class="return">
770
+
771
+ <li>
772
+
773
+
774
+ <span class='type'>(<tt>Boolean</tt>)</span>
775
+
776
+
777
+
778
+ &mdash;
779
+ <div class='inline'><p>whether the endpoint has been initialized</p>
780
+ </div>
781
+
782
+ </li>
783
+
784
+ </ul>
785
+
786
+ </div>
787
+ </div>
788
+
789
+
790
+ <span id=""></span>
791
+ <div class="method_details ">
792
+ <h3 class="signature " id="entity-instance_method">
793
+
794
+ #<strong>entity</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
795
+
796
+
797
+
798
+
799
+
800
+ </h3><div class="docstring">
801
+ <div class="discussion">
802
+
803
+
804
+ </div>
805
+ </div>
806
+ <div class="tags">
807
+
808
+
809
+ </div><table class="source_code">
810
+ <tr>
811
+ <td>
812
+ <pre class="lines">
813
+
814
+
815
+ 26
816
+ 27
817
+ 28</pre>
818
+ </td>
819
+ <td>
820
+ <pre class="code"><span class="info file"># File 'lib/midi-communications-macos/destination.rb', line 26</span>
821
+
822
+ <span class='kw'>def</span> <span class='id identifier rubyid_entity'>entity</span>
823
+ <span class='ivar'>@entity</span>
824
+ <span class='kw'>end</span></pre>
825
+ </td>
826
+ </tr>
827
+ </table>
828
+ </div>
829
+
830
+
831
+ <span id=""></span>
832
+ <div class="method_details ">
833
+ <h3 class="signature " id="entity-instance_method">
834
+
835
+ #<strong>entity</strong> &#x21d2; <tt><span class='object_link'><a href="Entity.html" title="MIDICommunicationsMacOS::Entity (class)">Entity</a></span></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#entity-instance_method" title="MIDICommunicationsMacOS::Endpoint#entity (method)">Endpoint</a></span>
844
+ </span>
845
+
846
+ </h3><div class="docstring">
847
+ <div class="discussion">
848
+ <p>Returns the parent entity.</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><span class='object_link'><a href="Entity.html" title="MIDICommunicationsMacOS::Entity (class)">Entity</a></span></tt>)</span>
862
+
863
+
864
+
865
+ &mdash;
866
+ <div class='inline'><p>the parent entity</p>
867
+ </div>
868
+
869
+ </li>
870
+
871
+ </ul>
872
+
873
+ </div>
874
+ </div>
875
+
876
+
877
+ <span id="id=-instance_method"></span>
878
+ <div class="method_details ">
879
+ <h3 class="signature " id="id-instance_method">
880
+
881
+ #<strong>id</strong> &#x21d2; <tt>Integer</tt>
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#id-instance_method" title="MIDICommunicationsMacOS::Endpoint#id (method)">Endpoint</a></span>
890
+ </span>
891
+
892
+ </h3><div class="docstring">
893
+ <div class="discussion">
894
+ <p>Returns unique local numeric ID of the endpoint.</p>
895
+
896
+
897
+ </div>
898
+ </div>
899
+ <div class="tags">
900
+
901
+ <p class="tag_title">Returns:</p>
902
+ <ul class="return">
903
+
904
+ <li>
905
+
906
+
907
+ <span class='type'>(<tt>Integer</tt>)</span>
908
+
909
+
910
+
911
+ &mdash;
912
+ <div class='inline'><p>unique local numeric ID of the endpoint</p>
913
+ </div>
914
+
915
+ </li>
916
+
917
+ </ul>
918
+
919
+ </div>
920
+ </div>
921
+
922
+
923
+ <span id=""></span>
924
+ <div class="method_details ">
925
+ <h3 class="signature " id="resource_id-instance_method">
926
+
927
+ #<strong>resource_id</strong> &#x21d2; <tt>Integer</tt> <span class="extras">(readonly)</span>
928
+
929
+
930
+
931
+
932
+
933
+ <span class="not_defined_here">
934
+ Originally defined in module
935
+ <span class='object_link'><a href="Endpoint.html#resource_id-instance_method" title="MIDICommunicationsMacOS::Endpoint#resource_id (method)">Endpoint</a></span>
936
+ </span>
937
+
938
+ </h3><div class="docstring">
939
+ <div class="discussion">
940
+ <p>Returns Core MIDI resource identifier.</p>
941
+
942
+
943
+ </div>
944
+ </div>
945
+ <div class="tags">
946
+
947
+ <p class="tag_title">Returns:</p>
948
+ <ul class="return">
949
+
950
+ <li>
951
+
952
+
953
+ <span class='type'>(<tt>Integer</tt>)</span>
954
+
955
+
956
+
957
+ &mdash;
958
+ <div class='inline'><p>Core MIDI resource identifier</p>
959
+ </div>
960
+
961
+ </li>
962
+
963
+ </ul>
964
+
965
+ </div>
966
+ </div>
967
+
968
+
969
+ <span id=""></span>
970
+ <div class="method_details ">
971
+ <h3 class="signature " id="type-instance_method">
972
+
973
+ #<strong>type</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
974
+
975
+
976
+
977
+
978
+
979
+ <span class="not_defined_here">
980
+ Originally defined in module
981
+ <span class='object_link'><a href="Endpoint.html#type-instance_method" title="MIDICommunicationsMacOS::Endpoint#type (method)">Endpoint</a></span>
982
+ </span>
983
+
984
+ </h3><div class="docstring">
985
+ <div class="discussion">
986
+
987
+
988
+ </div>
989
+ </div>
990
+ <div class="tags">
991
+
992
+
993
+ </div>
994
+ </div>
995
+
996
+ </div>
997
+
998
+
999
+ <div id="class_method_details" class="method_details_list">
1000
+ <h2>Class Method Details</h2>
1001
+
1002
+
1003
+ <div class="method_details first">
1004
+ <h3 class="signature first" id="all-class_method">
1005
+
1006
+ .<strong>all</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span>&gt;</tt>
1007
+
1008
+
1009
+
1010
+
1011
+
1012
+ </h3><div class="docstring">
1013
+ <div class="discussion">
1014
+ <p>Returns all available output endpoints.</p>
1015
+
1016
+
1017
+ </div>
1018
+ </div>
1019
+ <div class="tags">
1020
+
1021
+ <div class="examples">
1022
+ <h4 class="tag_title">Examples:</h4>
1023
+
1024
+
1025
+ <pre class="example code"><code><span class='id identifier rubyid_outputs'>outputs</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::Destination (class)">Destination</a></span></span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span>
1026
+ <span class='id identifier rubyid_outputs'>outputs</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_o'>o</span><span class='op'>|</span> <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_o'>o</span><span class='period'>.</span><span class='id identifier rubyid_display_name'>display_name</span> <span class='rbrace'>}</span></code></pre>
1027
+
1028
+ </div>
1029
+
1030
+ <p class="tag_title">Returns:</p>
1031
+ <ul class="return">
1032
+
1033
+ <li>
1034
+
1035
+
1036
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span>&gt;</tt>)</span>
1037
+
1038
+
1039
+
1040
+ &mdash;
1041
+ <div class='inline'><p>all destinations</p>
1042
+ </div>
1043
+
1044
+ </li>
1045
+
1046
+ </ul>
1047
+
1048
+ </div><table class="source_code">
1049
+ <tr>
1050
+ <td>
1051
+ <pre class="lines">
1052
+
1053
+
1054
+ 152
1055
+ 153
1056
+ 154</pre>
1057
+ </td>
1058
+ <td>
1059
+ <pre class="code"><span class="info file"># File 'lib/midi-communications-macos/destination.rb', line 152</span>
1060
+
1061
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span>
1062
+ <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'>:destination</span><span class='rbracket'>]</span>
1063
+ <span class='kw'>end</span></pre>
1064
+ </td>
1065
+ </tr>
1066
+ </table>
1067
+ </div>
1068
+
1069
+ <div class="method_details ">
1070
+ <h3 class="signature " id="first-class_method">
1071
+
1072
+ .<strong>first</strong> &#x21d2; <tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span></tt>
1073
+
1074
+
1075
+
1076
+
1077
+
1078
+ </h3><div class="docstring">
1079
+ <div class="discussion">
1080
+ <p>Returns the first available output endpoint.</p>
1081
+
1082
+
1083
+ </div>
1084
+ </div>
1085
+ <div class="tags">
1086
+
1087
+ <div class="examples">
1088
+ <h4 class="tag_title">Examples:</h4>
1089
+
1090
+
1091
+ <pre class="example code"><code><span class='id identifier rubyid_output'>output</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::Destination (class)">Destination</a></span></span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span></code></pre>
1092
+
1093
+ </div>
1094
+
1095
+ <p class="tag_title">Returns:</p>
1096
+ <ul class="return">
1097
+
1098
+ <li>
1099
+
1100
+
1101
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span></tt>)</span>
1102
+
1103
+
1104
+
1105
+ &mdash;
1106
+ <div class='inline'><p>the first destination</p>
1107
+ </div>
1108
+
1109
+ </li>
1110
+
1111
+ </ul>
1112
+
1113
+ </div><table class="source_code">
1114
+ <tr>
1115
+ <td>
1116
+ <pre class="lines">
1117
+
1118
+
1119
+ 134
1120
+ 135
1121
+ 136</pre>
1122
+ </td>
1123
+ <td>
1124
+ <pre class="code"><span class="info file"># File 'lib/midi-communications-macos/destination.rb', line 134</span>
1125
+
1126
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
1127
+ <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'>:destination</span><span class='rparen'>)</span>
1128
+ <span class='kw'>end</span></pre>
1129
+ </td>
1130
+ </tr>
1131
+ </table>
1132
+ </div>
1133
+
1134
+ <div class="method_details ">
1135
+ <h3 class="signature " id="last-class_method">
1136
+
1137
+ .<strong>last</strong> &#x21d2; <tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span></tt>
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+ </h3><div class="docstring">
1144
+ <div class="discussion">
1145
+ <p>Returns the last available output endpoint.</p>
1146
+
1147
+
1148
+ </div>
1149
+ </div>
1150
+ <div class="tags">
1151
+
1152
+ <p class="tag_title">Returns:</p>
1153
+ <ul class="return">
1154
+
1155
+ <li>
1156
+
1157
+
1158
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span></tt>)</span>
1159
+
1160
+
1161
+
1162
+ &mdash;
1163
+ <div class='inline'><p>the last destination</p>
1164
+ </div>
1165
+
1166
+ </li>
1167
+
1168
+ </ul>
1169
+
1170
+ </div><table class="source_code">
1171
+ <tr>
1172
+ <td>
1173
+ <pre class="lines">
1174
+
1175
+
1176
+ 141
1177
+ 142
1178
+ 143</pre>
1179
+ </td>
1180
+ <td>
1181
+ <pre class="code"><span class="info file"># File 'lib/midi-communications-macos/destination.rb', line 141</span>
1182
+
1183
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
1184
+ <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'>:destination</span><span class='rparen'>)</span>
1185
+ <span class='kw'>end</span></pre>
1186
+ </td>
1187
+ </tr>
1188
+ </table>
1189
+ </div>
1190
+
1191
+ </div>
1192
+
1193
+ <div id="instance_method_details" class="method_details_list">
1194
+ <h2>Instance Method Details</h2>
1195
+
1196
+
1197
+ <div class="method_details first">
1198
+ <h3 class="signature first" id="close-instance_method">
1199
+
1200
+ #<strong>close</strong> &#x21d2; <tt>Boolean</tt>
1201
+
1202
+
1203
+
1204
+
1205
+
1206
+ </h3><div class="docstring">
1207
+ <div class="discussion">
1208
+ <p>Closes this output.</p>
1209
+
1210
+
1211
+ </div>
1212
+ </div>
1213
+ <div class="tags">
1214
+
1215
+ <p class="tag_title">Returns:</p>
1216
+ <ul class="return">
1217
+
1218
+ <li>
1219
+
1220
+
1221
+ <span class='type'>(<tt>Boolean</tt>)</span>
1222
+
1223
+
1224
+
1225
+ &mdash;
1226
+ <div class='inline'><p>true if closed, false if already closed</p>
1227
+ </div>
1228
+
1229
+ </li>
1230
+
1231
+ </ul>
1232
+
1233
+ </div><table class="source_code">
1234
+ <tr>
1235
+ <td>
1236
+ <pre class="lines">
1237
+
1238
+
1239
+ 31
1240
+ 32
1241
+ 33
1242
+ 34
1243
+ 35
1244
+ 36
1245
+ 37
1246
+ 38</pre>
1247
+ </td>
1248
+ <td>
1249
+ <pre class="code"><span class="info file"># File 'lib/midi-communications-macos/destination.rb', line 31</span>
1250
+
1251
+ <span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span>
1252
+ <span class='kw'>if</span> <span class='ivar'>@enabled</span>
1253
+ <span class='ivar'>@enabled</span> <span class='op'>=</span> <span class='kw'>false</span>
1254
+ <span class='kw'>true</span>
1255
+ <span class='kw'>else</span>
1256
+ <span class='kw'>false</span>
1257
+ <span class='kw'>end</span>
1258
+ <span class='kw'>end</span></pre>
1259
+ </td>
1260
+ </tr>
1261
+ </table>
1262
+ </div>
1263
+
1264
+ <div class="method_details ">
1265
+ <h3 class="signature " id="display_name-instance_method">
1266
+
1267
+ #<strong>display_name</strong> &#x21d2; <tt>String</tt>
1268
+
1269
+
1270
+
1271
+
1272
+
1273
+ <span class="not_defined_here">
1274
+ Originally defined in module
1275
+ <span class='object_link'><a href="Endpoint.html#display_name-instance_method" title="MIDICommunicationsMacOS::Endpoint#display_name (method)">Endpoint</a></span>
1276
+ </span>
1277
+
1278
+ </h3><div class="docstring">
1279
+ <div class="discussion">
1280
+ <p>Returns formatted display name (delegated to entity).</p>
1281
+
1282
+
1283
+ </div>
1284
+ </div>
1285
+ <div class="tags">
1286
+
1287
+ <p class="tag_title">Returns:</p>
1288
+ <ul class="return">
1289
+
1290
+ <li>
1291
+
1292
+
1293
+ <span class='type'>(<tt>String</tt>)</span>
1294
+
1295
+
1296
+
1297
+ &mdash;
1298
+ <div class='inline'><p>formatted display name (delegated to entity)</p>
1299
+ </div>
1300
+
1301
+ </li>
1302
+
1303
+ </ul>
1304
+
1305
+ </div>
1306
+ </div>
1307
+
1308
+ <div class="method_details ">
1309
+ <h3 class="signature " id="enable-instance_method">
1310
+
1311
+ #<strong>enable</strong> {|destination| ... } &#x21d2; <tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span></tt>
1312
+
1313
+
1314
+
1315
+ <span class="aliases">Also known as:
1316
+ <span class="names"><span id='open-instance_method'>open</span>, <span id='start-instance_method'>start</span></span>
1317
+ </span>
1318
+
1319
+
1320
+
1321
+ </h3><div class="docstring">
1322
+ <div class="discussion">
1323
+ <p>Opens this output for use.</p>
1324
+
1325
+ <p>When a block is given, the output is automatically closed when
1326
+ the block exits.</p>
1327
+
1328
+
1329
+ </div>
1330
+ </div>
1331
+ <div class="tags">
1332
+
1333
+ <div class="examples">
1334
+ <h4 class="tag_title">Examples:</h4>
1335
+
1336
+
1337
+ <h5 class="example_title"><div class='inline'><p>Open with automatic close</p>
1338
+ </div></h5>
1339
+
1340
+ <pre class="example code"><code><span class='id identifier rubyid_output'>output</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_o'>o</span><span class='op'>|</span>
1341
+ <span class='id identifier rubyid_o'>o</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>
1342
+ <span class='kw'>end</span></code></pre>
1343
+
1344
+ </div>
1345
+
1346
+ <p class="tag_title">Yields:</p>
1347
+ <ul class="yield">
1348
+
1349
+ <li>
1350
+
1351
+
1352
+ <span class='type'>(<tt>destination</tt>)</span>
1353
+
1354
+
1355
+
1356
+ &mdash;
1357
+ <div class='inline'><p>optional block to execute with the open output</p>
1358
+ </div>
1359
+
1360
+ </li>
1361
+
1362
+ </ul>
1363
+ <p class="tag_title">Yield Parameters:</p>
1364
+ <ul class="yieldparam">
1365
+
1366
+ <li>
1367
+
1368
+ <span class='name'>destination</span>
1369
+
1370
+
1371
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span></tt>)</span>
1372
+
1373
+
1374
+
1375
+ &mdash;
1376
+ <div class='inline'><p>self</p>
1377
+ </div>
1378
+
1379
+ </li>
1380
+
1381
+ </ul>
1382
+ <p class="tag_title">Returns:</p>
1383
+ <ul class="return">
1384
+
1385
+ <li>
1386
+
1387
+
1388
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MIDICommunicationsMacOS::Destination (class)">Destination</a></span></tt>)</span>
1389
+
1390
+
1391
+
1392
+ &mdash;
1393
+ <div class='inline'><p>self</p>
1394
+ </div>
1395
+
1396
+ </li>
1397
+
1398
+ </ul>
1399
+
1400
+ </div><table class="source_code">
1401
+ <tr>
1402
+ <td>
1403
+ <pre class="lines">
1404
+
1405
+
1406
+ 114
1407
+ 115
1408
+ 116
1409
+ 117
1410
+ 118
1411
+ 119
1412
+ 120
1413
+ 121
1414
+ 122
1415
+ 123
1416
+ 124</pre>
1417
+ </td>
1418
+ <td>
1419
+ <pre class="code"><span class="info file"># File 'lib/midi-communications-macos/destination.rb', line 114</span>
1420
+
1421
+ <span class='kw'>def</span> <span class='id identifier rubyid_enable'>enable</span>
1422
+ <span class='ivar'>@enabled</span> <span class='op'>||=</span> <span class='kw'>true</span>
1423
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1424
+ <span class='kw'>begin</span>
1425
+ <span class='kw'>yield</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
1426
+ <span class='kw'>ensure</span>
1427
+ <span class='id identifier rubyid_close'>close</span>
1428
+ <span class='kw'>end</span>
1429
+ <span class='kw'>end</span>
1430
+ <span class='kw'>self</span>
1431
+ <span class='kw'>end</span></pre>
1432
+ </td>
1433
+ </tr>
1434
+ </table>
1435
+ </div>
1436
+
1437
+ <div class="method_details ">
1438
+ <h3 class="signature " id="initialize-instance_method">
1439
+
1440
+ #<strong>initialize</strong>(resource_id, entity) &#x21d2; <tt>Object</tt>
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+ <span class="not_defined_here">
1447
+ Originally defined in module
1448
+ <span class='object_link'><a href="Endpoint.html#initialize-instance_method" title="MIDICommunicationsMacOS::Endpoint#initialize (method)">Endpoint</a></span>
1449
+ </span>
1450
+
1451
+ </h3><div class="docstring">
1452
+ <div class="discussion">
1453
+
1454
+
1455
+ </div>
1456
+ </div>
1457
+ <div class="tags">
1458
+ <p class="tag_title">Parameters:</p>
1459
+ <ul class="param">
1460
+
1461
+ <li>
1462
+
1463
+ <span class='name'>resource_id</span>
1464
+
1465
+
1466
+ <span class='type'>(<tt>Integer</tt>)</span>
1467
+
1468
+
1469
+
1470
+ </li>
1471
+
1472
+ <li>
1473
+
1474
+ <span class='name'>entity</span>
1475
+
1476
+
1477
+ <span class='type'>(<tt><span class='object_link'><a href="Entity.html" title="MIDICommunicationsMacOS::Entity (class)">Entity</a></span></tt>)</span>
1478
+
1479
+
1480
+
1481
+ </li>
1482
+
1483
+ </ul>
1484
+
1485
+
1486
+ </div>
1487
+ </div>
1488
+
1489
+ <div class="method_details ">
1490
+ <h3 class="signature " id="manufacturer-instance_method">
1491
+
1492
+ #<strong>manufacturer</strong> &#x21d2; <tt>String</tt>
1493
+
1494
+
1495
+
1496
+
1497
+
1498
+ <span class="not_defined_here">
1499
+ Originally defined in module
1500
+ <span class='object_link'><a href="Endpoint.html#manufacturer-instance_method" title="MIDICommunicationsMacOS::Endpoint#manufacturer (method)">Endpoint</a></span>
1501
+ </span>
1502
+
1503
+ </h3><div class="docstring">
1504
+ <div class="discussion">
1505
+ <p>Returns device manufacturer name (delegated to entity).</p>
1506
+
1507
+
1508
+ </div>
1509
+ </div>
1510
+ <div class="tags">
1511
+
1512
+ <p class="tag_title">Returns:</p>
1513
+ <ul class="return">
1514
+
1515
+ <li>
1516
+
1517
+
1518
+ <span class='type'>(<tt>String</tt>)</span>
1519
+
1520
+
1521
+
1522
+ &mdash;
1523
+ <div class='inline'><p>device manufacturer name (delegated to entity)</p>
1524
+ </div>
1525
+
1526
+ </li>
1527
+
1528
+ </ul>
1529
+
1530
+ </div>
1531
+ </div>
1532
+
1533
+ <div class="method_details ">
1534
+ <h3 class="signature " id="model-instance_method">
1535
+
1536
+ #<strong>model</strong> &#x21d2; <tt>String</tt>
1537
+
1538
+
1539
+
1540
+
1541
+
1542
+ <span class="not_defined_here">
1543
+ Originally defined in module
1544
+ <span class='object_link'><a href="Endpoint.html#model-instance_method" title="MIDICommunicationsMacOS::Endpoint#model (method)">Endpoint</a></span>
1545
+ </span>
1546
+
1547
+ </h3><div class="docstring">
1548
+ <div class="discussion">
1549
+ <p>Returns device model name (delegated to entity).</p>
1550
+
1551
+
1552
+ </div>
1553
+ </div>
1554
+ <div class="tags">
1555
+
1556
+ <p class="tag_title">Returns:</p>
1557
+ <ul class="return">
1558
+
1559
+ <li>
1560
+
1561
+
1562
+ <span class='type'>(<tt>String</tt>)</span>
1563
+
1564
+
1565
+
1566
+ &mdash;
1567
+ <div class='inline'><p>device model name (delegated to entity)</p>
1568
+ </div>
1569
+
1570
+ </li>
1571
+
1572
+ </ul>
1573
+
1574
+ </div>
1575
+ </div>
1576
+
1577
+ <div class="method_details ">
1578
+ <h3 class="signature " id="name-instance_method">
1579
+
1580
+ #<strong>name</strong> &#x21d2; <tt>String</tt>
1581
+
1582
+
1583
+
1584
+
1585
+
1586
+ <span class="not_defined_here">
1587
+ Originally defined in module
1588
+ <span class='object_link'><a href="Endpoint.html#name-instance_method" title="MIDICommunicationsMacOS::Endpoint#name (method)">Endpoint</a></span>
1589
+ </span>
1590
+
1591
+ </h3><div class="docstring">
1592
+ <div class="discussion">
1593
+ <p>Returns endpoint name (delegated to entity).</p>
1594
+
1595
+
1596
+ </div>
1597
+ </div>
1598
+ <div class="tags">
1599
+
1600
+ <p class="tag_title">Returns:</p>
1601
+ <ul class="return">
1602
+
1603
+ <li>
1604
+
1605
+
1606
+ <span class='type'>(<tt>String</tt>)</span>
1607
+
1608
+
1609
+
1610
+ &mdash;
1611
+ <div class='inline'><p>endpoint name (delegated to entity)</p>
1612
+ </div>
1613
+
1614
+ </li>
1615
+
1616
+ </ul>
1617
+
1618
+ </div>
1619
+ </div>
1620
+
1621
+ <div class="method_details ">
1622
+ <h3 class="signature " id="online?-instance_method">
1623
+
1624
+ #<strong>online?</strong> &#x21d2; <tt>Boolean</tt>
1625
+
1626
+
1627
+
1628
+
1629
+
1630
+ <span class="not_defined_here">
1631
+ Originally defined in module
1632
+ <span class='object_link'><a href="Endpoint.html#online%3F-instance_method" title="MIDICommunicationsMacOS::Endpoint#online? (method)">Endpoint</a></span>
1633
+ </span>
1634
+
1635
+ </h3><div class="docstring">
1636
+ <div class="discussion">
1637
+ <p>Is this endpoint online?</p>
1638
+
1639
+
1640
+ </div>
1641
+ </div>
1642
+ <div class="tags">
1643
+
1644
+ <p class="tag_title">Returns:</p>
1645
+ <ul class="return">
1646
+
1647
+ <li>
1648
+
1649
+
1650
+ <span class='type'>(<tt>Boolean</tt>)</span>
1651
+
1652
+
1653
+
1654
+ </li>
1655
+
1656
+ </ul>
1657
+
1658
+ </div>
1659
+ </div>
1660
+
1661
+ <div class="method_details ">
1662
+ <h3 class="signature " id="puts-instance_method">
1663
+
1664
+ #<strong>puts</strong>(*args) &#x21d2; <tt>Boolean</tt>
1665
+
1666
+
1667
+
1668
+ <span class="aliases">Also known as:
1669
+ <span class="names"><span id='write-instance_method'>write</span></span>
1670
+ </span>
1671
+
1672
+
1673
+
1674
+ </h3><div class="docstring">
1675
+ <div class="discussion">
1676
+ <p>Sends a MIDI message in any supported format.</p>
1677
+
1678
+ <p>Accepts multiple formats:</p>
1679
+
1680
+ <ul>
1681
+ <li>Numeric bytes: <code>puts(0x90, 0x40, 0x40)</code></li>
1682
+ <li>Array of bytes: <code>puts([0x90, 0x40, 0x40])</code></li>
1683
+ <li>Hex string: <code>puts(&quot;904040&quot;)</code></li>
1684
+ </ul>
1685
+
1686
+
1687
+ </div>
1688
+ </div>
1689
+ <div class="tags">
1690
+
1691
+ <div class="examples">
1692
+ <h4 class="tag_title">Examples:</h4>
1693
+
1694
+
1695
+ <h5 class="example_title"><div class='inline'><p>Send as bytes</p>
1696
+ </div></h5>
1697
+
1698
+ <pre class="example code"><code><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></code></pre>
1699
+
1700
+
1701
+ <h5 class="example_title"><div class='inline'><p>Send as array</p>
1702
+ </div></h5>
1703
+
1704
+ <pre class="example code"><code><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='lbracket'>[</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='rbracket'>]</span><span class='rparen'>)</span></code></pre>
1705
+
1706
+
1707
+ <h5 class="example_title"><div class='inline'><p>Send as hex string</p>
1708
+ </div></h5>
1709
+
1710
+ <pre class="example code"><code><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='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>903C64</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span></code></pre>
1711
+
1712
+ </div>
1713
+ <p class="tag_title">Parameters:</p>
1714
+ <ul class="param">
1715
+
1716
+ <li>
1717
+
1718
+ <span class='name'>args</span>
1719
+
1720
+
1721
+ <span class='type'>(<tt>Array&lt;Integer&gt;</tt>, <tt>Array&lt;String&gt;</tt>, <tt>Integer</tt>, <tt>String</tt>)</span>
1722
+
1723
+
1724
+
1725
+ &mdash;
1726
+ <div class='inline'><p>MIDI data</p>
1727
+ </div>
1728
+
1729
+ </li>
1730
+
1731
+ </ul>
1732
+
1733
+ <p class="tag_title">Returns:</p>
1734
+ <ul class="return">
1735
+
1736
+ <li>
1737
+
1738
+
1739
+ <span class='type'>(<tt>Boolean</tt>)</span>
1740
+
1741
+
1742
+
1743
+ &mdash;
1744
+ <div class='inline'><p>true on success</p>
1745
+ </div>
1746
+
1747
+ </li>
1748
+
1749
+ </ul>
1750
+
1751
+ </div><table class="source_code">
1752
+ <tr>
1753
+ <td>
1754
+ <pre class="lines">
1755
+
1756
+
1757
+ 92
1758
+ 93
1759
+ 94
1760
+ 95
1761
+ 96
1762
+ 97
1763
+ 98</pre>
1764
+ </td>
1765
+ <td>
1766
+ <pre class="code"><span class="info file"># File 'lib/midi-communications-macos/destination.rb', line 92</span>
1767
+
1768
+ <span class='kw'>def</span> <span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
1769
+ <span class='kw'>case</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
1770
+ <span class='kw'>when</span> <span class='const'>Array</span> <span class='kw'>then</span> <span class='id identifier rubyid_args'>args</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_arg'>arg</span><span class='op'>|</span> <span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1771
+ <span class='kw'>when</span> <span class='const'>Integer</span> <span class='kw'>then</span> <span class='id identifier rubyid_puts_bytes'>puts_bytes</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
1772
+ <span class='kw'>when</span> <span class='const'>String</span> <span class='kw'>then</span> <span class='id identifier rubyid_puts_bytestr'>puts_bytestr</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
1773
+ <span class='kw'>end</span>
1774
+ <span class='kw'>end</span></pre>
1775
+ </td>
1776
+ </tr>
1777
+ </table>
1778
+ </div>
1779
+
1780
+ <div class="method_details ">
1781
+ <h3 class="signature " id="puts_bytes-instance_method">
1782
+
1783
+ #<strong>puts_bytes</strong>(*data) &#x21d2; <tt>Boolean</tt>
1784
+
1785
+
1786
+
1787
+
1788
+
1789
+ </h3><div class="docstring">
1790
+ <div class="discussion">
1791
+ <p>Sends a MIDI message as numeric bytes.</p>
1792
+
1793
+
1794
+ </div>
1795
+ </div>
1796
+ <div class="tags">
1797
+
1798
+ <div class="examples">
1799
+ <h4 class="tag_title">Examples:</h4>
1800
+
1801
+
1802
+ <pre class="example code"><code><span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_puts_bytes'>puts_bytes</span><span class='lparen'>(</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='rparen'>)</span> <span class='comment'># Note On</span></code></pre>
1803
+
1804
+ </div>
1805
+ <p class="tag_title">Parameters:</p>
1806
+ <ul class="param">
1807
+
1808
+ <li>
1809
+
1810
+ <span class='name'>data</span>
1811
+
1812
+
1813
+ <span class='type'>(<tt>Integer</tt>)</span>
1814
+
1815
+
1816
+
1817
+ &mdash;
1818
+ <div class='inline'><p>numeric bytes (e.g., 0x90, 0x40, 0x40)</p>
1819
+ </div>
1820
+
1821
+ </li>
1822
+
1823
+ </ul>
1824
+
1825
+ <p class="tag_title">Returns:</p>
1826
+ <ul class="return">
1827
+
1828
+ <li>
1829
+
1830
+
1831
+ <span class='type'>(<tt>Boolean</tt>)</span>
1832
+
1833
+
1834
+
1835
+ &mdash;
1836
+ <div class='inline'><p>true on success</p>
1837
+ </div>
1838
+
1839
+ </li>
1840
+
1841
+ </ul>
1842
+
1843
+ </div><table class="source_code">
1844
+ <tr>
1845
+ <td>
1846
+ <pre class="lines">
1847
+
1848
+
1849
+ 67
1850
+ 68
1851
+ 69
1852
+ 70
1853
+ 71
1854
+ 72</pre>
1855
+ </td>
1856
+ <td>
1857
+ <pre class="code"><span class="info file"># File 'lib/midi-communications-macos/destination.rb', line 67</span>
1858
+
1859
+ <span class='kw'>def</span> <span class='id identifier rubyid_puts_bytes'>puts_bytes</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
1860
+ <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='id identifier rubyid_sysex?'>sysex?</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='symbol'>:sysex</span> <span class='op'>:</span> <span class='symbol'>:small</span>
1861
+ <span class='id identifier rubyid_bytes'>bytes</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="API.html" title="MIDICommunicationsMacOS::API (module)">API</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get_midi_packet'><span class='object_link'><a href="API.html#get_midi_packet-class_method" title="MIDICommunicationsMacOS::API.get_midi_packet (method)">get_midi_packet</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
1862
+ <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>puts_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_bytes'>bytes</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='rparen'>)</span>
1863
+ <span class='kw'>true</span>
1864
+ <span class='kw'>end</span></pre>
1865
+ </td>
1866
+ </tr>
1867
+ </table>
1868
+ </div>
1869
+
1870
+ <div class="method_details ">
1871
+ <h3 class="signature " id="puts_s-instance_method">
1872
+
1873
+ #<strong>puts_s</strong>(data) &#x21d2; <tt>Boolean</tt>
1874
+
1875
+
1876
+
1877
+ <span class="aliases">Also known as:
1878
+ <span class="names"><span id='puts_bytestr-instance_method'>puts_bytestr</span>, <span id='puts_hex-instance_method'>puts_hex</span></span>
1879
+ </span>
1880
+
1881
+
1882
+
1883
+ </h3><div class="docstring">
1884
+ <div class="discussion">
1885
+ <p>Sends a MIDI message as a hex string.</p>
1886
+
1887
+
1888
+ </div>
1889
+ </div>
1890
+ <div class="tags">
1891
+
1892
+ <div class="examples">
1893
+ <h4 class="tag_title">Examples:</h4>
1894
+
1895
+
1896
+ <pre class="example code"><code><span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_puts_s'>puts_s</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>904060</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='comment'># Note On
1897
+ </span><span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_puts_s'>puts_s</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>804060</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='comment'># Note Off</span></code></pre>
1898
+
1899
+ </div>
1900
+ <p class="tag_title">Parameters:</p>
1901
+ <ul class="param">
1902
+
1903
+ <li>
1904
+
1905
+ <span class='name'>data</span>
1906
+
1907
+
1908
+ <span class='type'>(<tt>String</tt>)</span>
1909
+
1910
+
1911
+
1912
+ &mdash;
1913
+ <div class='inline'><p>hex string (e.g., &quot;904040&quot; for Note On)</p>
1914
+ </div>
1915
+
1916
+ </li>
1917
+
1918
+ </ul>
1919
+
1920
+ <p class="tag_title">Returns:</p>
1921
+ <ul class="return">
1922
+
1923
+ <li>
1924
+
1925
+
1926
+ <span class='type'>(<tt>Boolean</tt>)</span>
1927
+
1928
+
1929
+
1930
+ &mdash;
1931
+ <div class='inline'><p>true on success</p>
1932
+ </div>
1933
+
1934
+ </li>
1935
+
1936
+ </ul>
1937
+
1938
+ </div><table class="source_code">
1939
+ <tr>
1940
+ <td>
1941
+ <pre class="lines">
1942
+
1943
+
1944
+ 48
1945
+ 49
1946
+ 50
1947
+ 51
1948
+ 52
1949
+ 53
1950
+ 54
1951
+ 55
1952
+ 56</pre>
1953
+ </td>
1954
+ <td>
1955
+ <pre class="code"><span class="info file"># File 'lib/midi-communications-macos/destination.rb', line 48</span>
1956
+
1957
+ <span class='kw'>def</span> <span class='id identifier rubyid_puts_s'>puts_s</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
1958
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
1959
+ <span class='id identifier rubyid_bytes'>bytes</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1960
+ <span class='kw'>until</span> <span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_slice!'>slice!</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='int'>2</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_eql?'>eql?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1961
+ <span class='id identifier rubyid_bytes'>bytes</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_str'>str</span><span class='period'>.</span><span class='id identifier rubyid_hex'>hex</span>
1962
+ <span class='kw'>end</span>
1963
+ <span class='id identifier rubyid_puts_bytes'>puts_bytes</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_bytes'>bytes</span><span class='rparen'>)</span>
1964
+ <span class='kw'>true</span>
1965
+ <span class='kw'>end</span></pre>
1966
+ </td>
1967
+ </tr>
1968
+ </table>
1969
+ </div>
1970
+
1971
+ </div>
1972
+
1973
+ </div>
1974
+
1975
+ <div id="footer">
1976
+ Generated on Tue Nov 25 11:37:07 2025 by
1977
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1978
+ 0.9.37 (ruby-3.4.7).
1979
+ </div>
1980
+
1981
+ </div>
1982
+ </body>
1983
+ </html>