File: listener.html

package info (click to toggle)
python-pyo 1.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 52,332 kB
  • sloc: python: 135,133; ansic: 127,822; javascript: 16,116; sh: 395; makefile: 388; cpp: 242
file content (753 lines) | stat: -rw-r--r-- 48,072 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753

<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/><meta content="Docutils 0.17.1: http://docutils.sourceforge.net/" name="generator"/>
<title>Controller listeners — Pyo 1.0.5 documentation</title>
<link href="../../_static/pygments.css" rel="stylesheet" type="text/css"/>
<link href="../../_static/agogo.css" rel="stylesheet" type="text/css"/>
<link href="../../_static/sphinx-codeautolink.css" rel="stylesheet" type="text/css"/>
<link href="../../_static/autoclasstoc.css" rel="stylesheet" type="text/css"/>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<link href="../../_static/E-PyoIcon.ico" rel="shortcut icon"/>
<link href="../../about.html" rel="author" title="About these documents"/>
<link href="../../genindex.html" rel="index" title="Index"/>
<link href="../../search.html" rel="search" title="Search"/>
<link href="_core.html" rel="next" title="Base Classes"/>
<link href="server.html" rel="prev" title="Audio Server"/>
</head><body>
<div class="header-wrapper" role="banner">
<div class="header">
<div class="headertitle"><a href="../../index.html">Pyo 1.0.5 documentation</a></div>
<div aria-label="related navigation" class="rel" role="navigation">
<a accesskey="P" href="server.html" title="Audio Server">previous</a> |
          <a accesskey="N" href="_core.html" title="Base Classes">next</a> |
          <a accesskey="I" href="../../genindex.html" title="General Index">index</a>
</div>
</div>
</div>
<div class="content-wrapper">
<div class="content">
<div class="sidebar">
<h3>Table of Contents</h3>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../about.html">About pyo</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../download.html">Installing pyo with pip</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../compiling.html">Compiling pyo from sources</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../structure.html">Structure of the library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../gettingstarted.html">Getting started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../winaudioinspect.html">Configuring the audio output (Windows)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../perftips.html">Improve performance of pyo programs</a></li>
</ul>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">API documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../constants.html">Constants</a></li>
<li class="toctree-l2"><a class="reference internal" href="../functions/index.html">Functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="../alphabetical.html">Alphabetical class reference</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Classes by category</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../examples/index.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../tutorials/index.html">Advanced tutorials</a></li>
</ul>
<div role="search">
<h3 style="margin-top: 1.5em;">Search</h3>
<form action="../../search.html" class="search" method="get">
<input name="q" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="controller-listeners">
<h1>Controller listeners<a class="headerlink" href="#controller-listeners" title="Permalink to this heading">¶</a></h1>
<p>These objects can be used to create MIDI and/or OSC listeners without the
need to boot ands start an audio server before receiving messages.</p>
<section id="objects-in-this-category">
<h2>Objects in this category<a class="headerlink" href="#objects-in-this-category" title="Permalink to this heading">¶</a></h2>
<ul class="simple">
<li><p><a class="reference internal" href="#pyo.MidiListener" title="pyo.MidiListener"><code class="xref py py-class docutils literal notranslate"><span class="pre">MidiListener</span></code></a> :     Self-contained midi listener thread.</p></li>
<li><p><a class="reference internal" href="#pyo.MidiDispatcher" title="pyo.MidiDispatcher"><code class="xref py py-class docutils literal notranslate"><span class="pre">MidiDispatcher</span></code></a> :     Self-contained midi dispatcher thread.</p></li>
<li><p><a class="reference internal" href="#pyo.OscListener" title="pyo.OscListener"><code class="xref py py-class docutils literal notranslate"><span class="pre">OscListener</span></code></a> :     Self-contained OSC listener thread.</p></li>
</ul>
</section>
<section id="midilistener">
<h2><em>MidiListener</em><a class="headerlink" href="#midilistener" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.MidiListener">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MidiListener</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mididev</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">reportdevice</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/listener.html#MidiListener"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.MidiListener" title="Permalink to this definition">¶</a></dt>
<dd><p>Self-contained midi listener thread.</p>
<p>This object allows to setup a Midi server that is independent
of the audio server (mainly to be able to receive Midi data even
when the audio server is stopped). Although it runs in a separated
thread, the same device can’t be used by this object and the audio
server at the same time. It is adviced to call the deactivateMidi()
method on the audio server to avoid conflicts.</p>
<dl class="field-list">
<dt class="field-odd">Parent</dt>
<dd class="field-odd"><p>threading.Thread</p>
</dd>
<dt class="field-even">Args</dt>
<dd class="field-even"><dl>
<dt>function: Python function (can’t be a list)</dt><dd><p>Function that will be called when a new midi event is available.
This function is called with the incoming midi data as
arguments. The signature of the function must be:</p>
<p>def myfunc(status, data1, data2)</p>
</dd>
<dt>mididev: int or list of ints, optional</dt><dd><p>Sets the midi input device (see <cite>pm_list_devices()</cite> for the
available devices). The default, -1, means the system default
device. A number greater than the highest portmidi device index
will open all available input devices. Specific devices can be
set with a list of integers.</p>
</dd>
<dt>reportdevice: boolean, optional</dt><dd><p>If True, the device ID will be reported as a fourth argument to
the callback. The signature will then be:</p>
<p>def myfunc(status, data1, data2, id)</p>
<p>Available at initialization only. Defaults to False.</p>
</dd>
</dl>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This object is available only if pyo is built with portmidi support
(see withPortmidi function).</p>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/server.html#pyo.Server" title="pyo.lib.server.Server"><span class="n">s</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/server.html#pyo.Server" title="pyo.lib.server.Server"><span class="n">Server</span></a><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">s</span><span class="o">.</span><span class="n">deactivateMidi</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">s</span><span class="o">.</span><span class="n">boot</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">midicall</span><span class="p">(</span><span class="n">status</span><span class="p">,</span> <span class="n">data1</span><span class="p">,</span> <span class="n">data2</span><span class="p">):</span>
<span class="gp">... </span>    <span class="nb">print</span><span class="p">(</span><span class="n">status</span><span class="p">,</span> <span class="n">data1</span><span class="p">,</span> <span class="n">data2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/listener.html#pyo.MidiListener" title="pyo.lib.listener.MidiListener"><span class="n">listen</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/listener.html#pyo.MidiListener" title="pyo.lib.listener.MidiListener"><span class="n">MidiListener</span></a><span class="p">(</span><span class="n">midicall</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">listen</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
</pre></div>
</div>
<div class="autoclasstoc docutils container">
<p class="rubric">Public Data Attributes:</p>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">Thread</span></code></summary><table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">name</span></code></p></td>
<td><p>A string used for identification purposes only.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ident</span></code></p></td>
<td><p>Thread identifier of this thread or None if it has not been started.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">native_id</span></code></p></td>
<td><p>Native integral thread ID of this thread, or None if it has not been started.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">daemon</span></code></p></td>
<td><p>A boolean value indicating whether this thread is a daemon thread.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Public Methods:</p>
<table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__init__</span></code>(function[, mididev, reportdevice])</p></td>
<td><p>This constructor should always be called with keyword arguments.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">run</span></code>()</p></td>
<td><p>Starts the process.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">stop</span></code>()</p></td>
<td><p>Stops the listener and properly close the midi ports.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">getDeviceInfos</span></code>()</p></td>
<td><p>Returns infos about connected midi devices.</p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">Thread</span></code></summary><table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__init__</span></code>([group, target, name, args, ...])</p></td>
<td><p>This constructor should always be called with keyword arguments.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__repr__</span></code>()</p></td>
<td><p>Return repr(self).</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">start</span></code>()</p></td>
<td><p>Start the thread's activity.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">run</span></code>()</p></td>
<td><p>Method representing the thread's activity.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">join</span></code>([timeout])</p></td>
<td><p>Wait until the thread terminates.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_alive</span></code>()</p></td>
<td><p>Return whether the thread is alive.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">isDaemon</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">setDaemon</span></code>(daemonic)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">getName</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">setName</span></code>(name)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Data Attributes:</p>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">Thread</span></code></summary><table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_initialized</span></code></p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">Thread</span></code></summary><table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_reset_internal_locks</span></code>(is_alive)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_bootstrap</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_set_ident</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_set_native_id</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_set_tstate_lock</span></code>()</p></td>
<td><p>Set a lock object which will be released by the interpreter when the underlying thread state (see pystate.h) gets deleted.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_bootstrap_inner</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_stop</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_delete</span></code>()</p></td>
<td><p>Remove current thread from the dict of currently running threads.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_wait_for_tstate_lock</span></code>([block, timeout])</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
<hr class="docutils"/>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.MidiListener.run">
<span class="sig-name descname"><span class="pre">run</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/listener.html#MidiListener.run"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.MidiListener.run" title="Permalink to this definition">¶</a></dt>
<dd><p>Starts the process. The thread runs as daemon, so no need to stop it.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.MidiListener.stop">
<span class="sig-name descname"><span class="pre">stop</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/listener.html#MidiListener.stop"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.MidiListener.stop" title="Permalink to this definition">¶</a></dt>
<dd><p>Stops the listener and properly close the midi ports.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.MidiListener.getDeviceInfos">
<span class="sig-name descname"><span class="pre">getDeviceInfos</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/listener.html#MidiListener.getDeviceInfos"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.MidiListener.getDeviceInfos" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns infos about connected midi devices.</p>
<p>This method returns a list of dictionaries, one per device.</p>
<p>Dictionary format is:</p>
<p>{“id”: device_id (int), “name”: device_name (str), “interface”: interface (str)}</p>
</dd></dl>
</dd></dl>
</section>
<section id="mididispatcher">
<h2><em>MidiDispatcher</em><a class="headerlink" href="#mididispatcher" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.MidiDispatcher">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MidiDispatcher</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mididev</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-1</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/listener.html#MidiDispatcher"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.MidiDispatcher" title="Permalink to this definition">¶</a></dt>
<dd><p>Self-contained midi dispatcher thread.</p>
<p>This object allows to setup a Midi server that is independent
of the audio server (mainly to be able to send Midi data even
when the audio server is stopped). Although it runs in a separated
thread, the same device can’t be used by this object and the audio
server at the same time. It is adviced to call the deactivateMidi()
method on the audio server to avoid conflicts.</p>
<p>Use the <cite>send</cite> method to send midi event to connected devices.</p>
<p>Use the <cite>sendx</cite> method to send sysex event to connected devices.</p>
<dl class="field-list simple">
<dt class="field-odd">Parent</dt>
<dd class="field-odd"><p>threading.Thread</p>
</dd>
<dt class="field-even">Args</dt>
<dd class="field-even"><dl class="simple">
<dt>mididev: int or list of ints, optional</dt><dd><p>Sets the midi output device (see <cite>pm_list_devices()</cite> for the
available devices). The default, -1, means the system default
device. A number greater than the highest portmidi device index
will open all available input devices. Specific devices can be
set with a list of integers.</p>
</dd>
</dl>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This object is available only if pyo is built with portmidi support
(see withPortmidi function).</p>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/server.html#pyo.Server" title="pyo.lib.server.Server"><span class="n">s</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/server.html#pyo.Server" title="pyo.lib.server.Server"><span class="n">Server</span></a><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">s</span><span class="o">.</span><span class="n">deactivateMidi</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">s</span><span class="o">.</span><span class="n">boot</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/listener.html#pyo.MidiDispatcher" title="pyo.lib.listener.MidiDispatcher"><span class="n">dispatch</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/listener.html#pyo.MidiDispatcher" title="pyo.lib.listener.MidiDispatcher"><span class="n">MidiDispatcher</span></a><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dispatch</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dispatch</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="mi">144</span><span class="p">,</span> <span class="mi">60</span><span class="p">,</span> <span class="mi">127</span><span class="p">)</span>
</pre></div>
</div>
<div class="autoclasstoc docutils container">
<p class="rubric">Public Data Attributes:</p>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">Thread</span></code></summary><table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">name</span></code></p></td>
<td><p>A string used for identification purposes only.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ident</span></code></p></td>
<td><p>Thread identifier of this thread or None if it has not been started.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">native_id</span></code></p></td>
<td><p>Native integral thread ID of this thread, or None if it has not been started.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">daemon</span></code></p></td>
<td><p>A boolean value indicating whether this thread is a daemon thread.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Public Methods:</p>
<table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__init__</span></code>([mididev])</p></td>
<td><p>This constructor should always be called with keyword arguments.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">run</span></code>()</p></td>
<td><p>Starts the process.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">send</span></code>(status, data1[, data2, timestamp, device])</p></td>
<td><p>Send a MIDI message to the selected midi output device.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">sendx</span></code>(msg[, timestamp, device])</p></td>
<td><p>Send a MIDI system exclusive message to the selected midi output device.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">getDeviceInfos</span></code>()</p></td>
<td><p>Returns infos about connected midi devices.</p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">Thread</span></code></summary><table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__init__</span></code>([group, target, name, args, ...])</p></td>
<td><p>This constructor should always be called with keyword arguments.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__repr__</span></code>()</p></td>
<td><p>Return repr(self).</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">start</span></code>()</p></td>
<td><p>Start the thread's activity.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">run</span></code>()</p></td>
<td><p>Method representing the thread's activity.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">join</span></code>([timeout])</p></td>
<td><p>Wait until the thread terminates.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_alive</span></code>()</p></td>
<td><p>Return whether the thread is alive.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">isDaemon</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">setDaemon</span></code>(daemonic)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">getName</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">setName</span></code>(name)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Data Attributes:</p>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">Thread</span></code></summary><table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_initialized</span></code></p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">Thread</span></code></summary><table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_reset_internal_locks</span></code>(is_alive)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_bootstrap</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_set_ident</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_set_native_id</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_set_tstate_lock</span></code>()</p></td>
<td><p>Set a lock object which will be released by the interpreter when the underlying thread state (see pystate.h) gets deleted.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_bootstrap_inner</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_stop</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_delete</span></code>()</p></td>
<td><p>Remove current thread from the dict of currently running threads.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_wait_for_tstate_lock</span></code>([block, timeout])</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
<hr class="docutils"/>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.MidiDispatcher.run">
<span class="sig-name descname"><span class="pre">run</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/listener.html#MidiDispatcher.run"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.MidiDispatcher.run" title="Permalink to this definition">¶</a></dt>
<dd><p>Starts the process. The thread runs as daemon, so no need to stop it.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.MidiDispatcher.send">
<span class="sig-name descname"><span class="pre">send</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">status</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data2</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timestamp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">device</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-1</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/listener.html#MidiDispatcher.send"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.MidiDispatcher.send" title="Permalink to this definition">¶</a></dt>
<dd><p>Send a MIDI message to the selected midi output device.</p>
<p>Arguments can be list of values to generate multiple events
in one call.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>status: int</dt><dd><p>Status byte.</p>
</dd>
<dt>data1: int</dt><dd><p>First data byte.</p>
</dd>
<dt>data2: int, optional</dt><dd><p>Second data byte. Defaults to 0.</p>
</dd>
<dt>timestamp: int, optional</dt><dd><p>The delay time, in milliseconds, before the note
is sent on the portmidi stream. A value of 0 means
to play the note now. Defaults to 0.</p>
</dd>
<dt>device: int, optional</dt><dd><p>The index of the device to which the message will
be sent. The default (-1) means all devices. See
<cite>getDeviceInfos()</cite> to retrieve device indexes.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.MidiDispatcher.sendx">
<span class="sig-name descname"><span class="pre">sendx</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timestamp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">device</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-1</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/listener.html#MidiDispatcher.sendx"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.MidiDispatcher.sendx" title="Permalink to this definition">¶</a></dt>
<dd><p>Send a MIDI system exclusive message to the selected midi output device.</p>
<p>Arguments can be list of values to generate multiple events
in one call.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>msg: str</dt><dd><p>A valid system exclusive message as a string. The first byte
must be 0xf0 and the last one must be 0xf7.</p>
</dd>
<dt>timestamp: int, optional</dt><dd><p>The delay time, in milliseconds, before the note
is sent on the portmidi stream. A value of 0 means
to play the note now. Defaults to 0.</p>
</dd>
<dt>device: int, optional</dt><dd><p>The index of the device to which the message will
be sent. The default (-1) means all devices. See
<cite>getDeviceInfos()</cite> to retrieve device indexes.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.MidiDispatcher.getDeviceInfos">
<span class="sig-name descname"><span class="pre">getDeviceInfos</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/listener.html#MidiDispatcher.getDeviceInfos"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.MidiDispatcher.getDeviceInfos" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns infos about connected midi devices.</p>
<p>This method returns a list of dictionaries, one per device.</p>
<p>Dictionary format is:</p>
<p>{“id”: device_id (int), “name”: device_name (str), “interface”: interface (str)}</p>
</dd></dl>
</dd></dl>
</section>
<section id="osclistener">
<h2><em>OscListener</em><a class="headerlink" href="#osclistener" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.OscListener">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">OscListener</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">9000</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/listener.html#OscListener"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.OscListener" title="Permalink to this definition">¶</a></dt>
<dd><p>Self-contained OSC listener thread.</p>
<p>This object allows to setup an OSC server that is independent
of the audio server (mainly to be able to receive OSC data even
when the audio server is stopped).</p>
<dl class="field-list">
<dt class="field-odd">Parent</dt>
<dd class="field-odd"><p>threadind.Thread</p>
</dd>
<dt class="field-even">Args</dt>
<dd class="field-even"><dl>
<dt>function: Python function (can’t be a list)</dt><dd><p>Function that will be called when a new OSC event is available.
This function is called with the incoming address and values as
arguments. The signature of the function must be:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">myfunc</span><span class="p">(</span><span class="n">address</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">)</span>
</pre></div>
</div>
</dd>
<dt>port: int, optional</dt><dd><p>The OSC port on which the values are received. Defaults to 9000.</p>
</dd>
</dl>
</dd>
</dl>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">s</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/server.html#pyo.Server" title="pyo.lib.server.Server"><span class="n">Server</span></a><span class="p">()</span><span class="o">.</span><span class="n">boot</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">call</span><span class="p">(</span><span class="n">address</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">):</span>
<span class="gp">... </span>    <span class="nb">print</span><span class="p">(</span><span class="n">address</span><span class="p">,</span> <span class="n">args</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/listener.html#pyo.OscListener" title="pyo.lib.listener.OscListener"><span class="n">listen</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/listener.html#pyo.OscListener" title="pyo.lib.listener.OscListener"><span class="n">OscListener</span></a><span class="p">(</span><span class="n">call</span><span class="p">,</span> <span class="mi">9901</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">listen</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
</pre></div>
</div>
<div class="autoclasstoc docutils container">
<p class="rubric">Public Data Attributes:</p>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">Thread</span></code></summary><table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">name</span></code></p></td>
<td><p>A string used for identification purposes only.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ident</span></code></p></td>
<td><p>Thread identifier of this thread or None if it has not been started.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">native_id</span></code></p></td>
<td><p>Native integral thread ID of this thread, or None if it has not been started.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">daemon</span></code></p></td>
<td><p>A boolean value indicating whether this thread is a daemon thread.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Public Methods:</p>
<table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__init__</span></code>(function[, port])</p></td>
<td><p>This constructor should always be called with keyword arguments.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">run</span></code>()</p></td>
<td><p>Starts the process.</p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">Thread</span></code></summary><table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__init__</span></code>([group, target, name, args, ...])</p></td>
<td><p>This constructor should always be called with keyword arguments.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__repr__</span></code>()</p></td>
<td><p>Return repr(self).</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">start</span></code>()</p></td>
<td><p>Start the thread's activity.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">run</span></code>()</p></td>
<td><p>Method representing the thread's activity.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">join</span></code>([timeout])</p></td>
<td><p>Wait until the thread terminates.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_alive</span></code>()</p></td>
<td><p>Return whether the thread is alive.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">isDaemon</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">setDaemon</span></code>(daemonic)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">getName</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">setName</span></code>(name)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Data Attributes:</p>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">Thread</span></code></summary><table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_initialized</span></code></p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_oscrecv</span></code>(address, *args)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">Thread</span></code></summary><table class="autosummary longtable docutils align-default">
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_reset_internal_locks</span></code>(is_alive)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_bootstrap</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_set_ident</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_set_native_id</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_set_tstate_lock</span></code>()</p></td>
<td><p>Set a lock object which will be released by the interpreter when the underlying thread state (see pystate.h) gets deleted.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_bootstrap_inner</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_stop</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_delete</span></code>()</p></td>
<td><p>Remove current thread from the dict of currently running threads.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_wait_for_tstate_lock</span></code>([block, timeout])</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
<hr class="docutils"/>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.OscListener.run">
<span class="sig-name descname"><span class="pre">run</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/listener.html#OscListener.run"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.OscListener.run" title="Permalink to this definition">¶</a></dt>
<dd><p>Starts the process. The thread runs as daemon, so no need to stop it.</p>
</dd></dl>
</dd></dl>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
<div class="footer-wrapper">
<div class="footer">
<div class="left">
<div aria-label="related navigaton" role="navigation">
<a href="server.html" title="Audio Server">previous</a> |
            <a href="_core.html" title="Base Classes">next</a> |
            <a href="../../genindex.html" title="General Index">index</a>
</div>
<div aria-label="source link" role="note">
</div>
</div>
<div class="right">
<div class="footer" role="contentinfo">
        © Copyright 2021, Olivier Bélanger.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
    </div>
</div>
<div class="clearer"></div>
</div>
</div>
</body>
</html>