midi-communications-windows 0.0.3

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