File: events.html

package info (click to toggle)
python-pyo 1.0.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 53,696 kB
  • sloc: python: 135,133; ansic: 128,013; javascript: 16,116; sh: 395; makefile: 389; cpp: 242
file content (3100 lines) | stat: -rw-r--r-- 227,457 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
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100

<!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>Events framework — 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="expression.html" rel="next" title="Prefix expression evaluators"/>
<link href="effects.html" rel="prev" title="Special Effects"/>
</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="effects.html" title="Special Effects">previous</a> |
          <a accesskey="N" href="expression.html" title="Prefix expression evaluators">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="events-framework">
<h1>Events framework<a class="headerlink" href="#events-framework" title="Permalink to this heading">¶</a></h1>
<p>Set of tools to generate sequence of events.</p>
<p>The purpose of the Event framework is to allow the user to generate a
sequence of events with as few as possible parameters to specify.</p>
<p><a class="reference internal" href="#pyo.Events" title="pyo.Events"><code class="xref py py-class docutils literal notranslate"><span class="pre">Events</span></code></a> is the heart of the framework. An Events object computes
parameters, generally designed with event generator objects, builds the events
and plays the sequence.</p>
<p>See the <strong>Events framework</strong> examples in the documentation for different use cases.</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.EventCall" title="pyo.EventCall"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventCall</span></code></a> :     Calls a function, with any number of arguments, and uses its return value.</p></li>
<li><p><a class="reference internal" href="#pyo.EventChoice" title="pyo.EventChoice"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventChoice</span></code></a> :     Plays values randomly chosen from a list.</p></li>
<li><p><a class="reference internal" href="#pyo.EventConditional" title="pyo.EventConditional"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventConditional</span></code></a> :     Executes one generator or the other depending on the result of a condition.</p></li>
<li><p><a class="reference internal" href="#pyo.EventDrunk" title="pyo.EventDrunk"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventDrunk</span></code></a> :     Performs a random walk over a list of values.</p></li>
<li><p><a class="reference internal" href="#pyo.EventDummy" title="pyo.EventDummy"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventDummy</span></code></a> : An EventGenerator created internally to handle arithmetic on Events.</p></li>
<li><p><a class="reference internal" href="#pyo.EventFilter" title="pyo.EventFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventFilter</span></code></a> : An EventGenerator created internally to handle simple filter on Events.</p></li>
<li><p><a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a> :     Base class for all event generators.</p></li>
<li><p><a class="reference internal" href="#pyo.EventIndex" title="pyo.EventIndex"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventIndex</span></code></a> :     Plays values from a list based on a position index.</p></li>
<li><p><a class="reference internal" href="#pyo.EventInstrument" title="pyo.EventInstrument"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventInstrument</span></code></a> :     Base class for an Events instrument. All attributes given to the Events</p></li>
<li><p><a class="reference internal" href="#pyo.EventKey" title="pyo.EventKey"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventKey</span></code></a> :     An EventGenerator that allow to retrieve the value of another parameter.</p></li>
<li><p><a class="reference internal" href="#pyo.EventMarkov" title="pyo.EventMarkov"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventMarkov</span></code></a> :     Applies a Markov algorithm to a list of values.</p></li>
<li><p><a class="reference internal" href="#pyo.EventNoise" title="pyo.EventNoise"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventNoise</span></code></a> :     Return a random value between -1.0 and 1.0.</p></li>
<li><p><a class="reference internal" href="#pyo.EventScale" title="pyo.EventScale"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventScale</span></code></a> :     Musical scale builder.</p></li>
<li><p><a class="reference internal" href="#pyo.EventSeq" title="pyo.EventSeq"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventSeq</span></code></a> :     Plays through an entire list of values many times.</p></li>
<li><p><a class="reference internal" href="#pyo.EventSlide" title="pyo.EventSlide"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventSlide</span></code></a> :     Plays overlapping segments from a list of values.</p></li>
<li><p><a class="reference internal" href="#pyo.Events" title="pyo.Events"><code class="xref py py-class docutils literal notranslate"><span class="pre">Events</span></code></a> :     Sequencing user-defined events to form musical phrases.</p></li>
</ul>
</section>
<section id="eventscale">
<h2><em>EventScale</em><a class="headerlink" href="#eventscale" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventScale">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventScale</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">root</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'C'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scale</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'major'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">first</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">4</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">octaves</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventScale"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventScale" title="Permalink to this definition">¶</a></dt>
<dd><p>Musical scale builder.</p>
<p>EventScale constructs a list of pitches according to its arguments.</p>
<p>EventScale works similarly to list, ie. uses slicing with square brackets
to access data, with the first element at index 0.</p>
<p>It also accept the len() function, which returns the number of elements in
the scale.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>root: str, optional</dt><dd><p>The base note (fundamental) of the scale. Possible values are:
‘C’, ‘C#’, ‘Db’, ‘D’, ‘D#’, ‘Eb’, ‘E’, ‘F’, ‘F#’,
‘Gb’, ‘G’, ‘G#’, ‘Ab’, ‘A’, ‘A#’, ‘Bb’, ‘B’.
Defaults to ‘C’.</p>
</dd>
<dt>scale: str, optional</dt><dd><p>The scale name to construct. Possible scales are:
‘major’, ‘minorH’, ‘minorM’, ‘ionian’, ‘dorian’, ‘phrygian’,
‘lydian’, ‘mixolydian’, ‘aeolian’, ‘locrian’, ‘wholeTone’,
‘majorPenta’, ‘minorPenta’, ‘egyptian’, ‘majorBlues’, ‘minorBlues’,
‘minorHungarian’.
Defaults to ‘major’.</p>
</dd>
<dt>first: int, optional</dt><dd><p>The first octave of the generated scale, in multiple of 12. A value
of 4, for a root of ‘C’ means the first note of the scale will be 48.
Defaults to 4.</p>
</dd>
<dt>octaves: int, optional</dt><dd><p>The number of octaves in the generated scale. Defaults to 2.</p>
</dd>
<dt>type: int, optional</dt><dd><dl class="simple">
<dt>The unit type in which the values are stored. Possible types are:</dt><dd><p>0: MIDI note
1: Hertz
2: octave.degree notation (MIDI note 48 is 4.00 in octave.degrees)</p>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Here is a table showing the relationship between the three unit types that
EventScale can handle.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 33%"/>
<col style="width: 33%"/>
<col style="width: 33%"/>
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>midi</p></th>
<th class="head"><p>oct.deg</p></th>
<th class="head"><p>Hertz</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>48</p></td>
<td><p>4.00</p></td>
<td><p>130.81</p></td>
</tr>
<tr class="row-odd"><td><p>50</p></td>
<td><p>4.02</p></td>
<td><p>146.83</p></td>
</tr>
<tr class="row-even"><td><p>52</p></td>
<td><p>4.04</p></td>
<td><p>164.81</p></td>
</tr>
<tr class="row-odd"><td><p>53</p></td>
<td><p>4.05</p></td>
<td><p>174.61</p></td>
</tr>
<tr class="row-even"><td><p>55</p></td>
<td><p>4.07</p></td>
<td><p>195.99</p></td>
</tr>
<tr class="row-odd"><td><p>57</p></td>
<td><p>4.09</p></td>
<td><p>220.00</p></td>
</tr>
<tr class="row-even"><td><p>59</p></td>
<td><p>4.11</p></td>
<td><p>246.94</p></td>
</tr>
<tr class="row-odd"><td><p>60</p></td>
<td><p>5.00</p></td>
<td><p>261.62</p></td>
</tr>
</tbody>
</table>
</div>
<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="n">s</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventScale" title="pyo.lib.events.EventScale"><span class="n">scl</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventScale" title="pyo.lib.events.EventScale"><span class="n">EventScale</span></a><span class="p">(</span><span class="n">root</span><span class="o">=</span><span class="s2">"C"</span><span class="p">,</span> <span class="n">scale</span><span class="o">=</span><span class="s2">"major"</span><span class="p">,</span> <span class="n">first</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">octaves</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.Events" title="pyo.lib.events.Events"><span class="n">Events</span></a><span class="p">(</span><span class="n">degree</span><span class="o">=</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventDrunk" title="pyo.lib.events.EventDrunk"><span class="n">EventDrunk</span></a><span class="p">(</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventScale" title="pyo.lib.events.EventScale"><span class="n">scl</span></a><span class="p">,</span> <span class="n">maxStep</span><span class="o">=-</span><span class="mi">2</span><span class="p">),</span> <span class="n">beat</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="mf">4.</span><span class="p">,</span> <span class="n">db</span><span class="o">=-</span><span class="mi">6</span><span class="p">)</span><span class="o">.</span><span class="n">play</span><span class="p">()</span>
</pre></div>
</div>
<div class="autoclasstoc docutils container">
<p class="rubric">Public Data Attributes:</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><a class="reference internal" href="#pyo.EventScale.root" title="pyo.EventScale.root"><code class="xref py py-obj docutils literal notranslate"><span class="pre">root</span></code></a></p></td>
<td><p>string.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyo.EventScale.scale" title="pyo.EventScale.scale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code></a></p></td>
<td><p>string.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyo.EventScale.first" title="pyo.EventScale.first"><code class="xref py py-obj docutils literal notranslate"><span class="pre">first</span></code></a></p></td>
<td><p>int.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyo.EventScale.octaves" title="pyo.EventScale.octaves"><code class="xref py py-obj docutils literal notranslate"><span class="pre">octaves</span></code></a></p></td>
<td><p>int.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyo.EventScale.type" title="pyo.EventScale.type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">type</span></code></a></p></td>
<td><p>int.</p></td>
</tr>
</tbody>
</table>
</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>([root, scale, first, octaves, type])</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">__len__</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">__getitem__</span></code>(key)</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">__setitem__</span></code>(key, item)</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">setRoot</span></code>(x)</p></td>
<td><p>Replace the <cite>root</cite> attribute and reconstruct the scale.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">setScale</span></code>(x)</p></td>
<td><p>Replace the <cite>scale</cite> attribute and reconstruct the scale.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">setFirst</span></code>(x)</p></td>
<td><p>Replace the <cite>first</cite> attribute and reconstruct the scale.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">setOctaves</span></code>(x)</p></td>
<td><p>Replace the <cite>octaves</cite> attribute and reconstruct the scale.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">setType</span></code>(x)</p></td>
<td><p>Replace the <cite>type</cite> attribute and reconstruct the scale.</p></td>
</tr>
</tbody>
</table>
</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">_populate</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</div>
<hr class="docutils"/>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventScale.setRoot">
<span class="sig-name descname"><span class="pre">setRoot</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventScale.setRoot"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventScale.setRoot" title="Permalink to this definition">¶</a></dt>
<dd><p>Replace the <cite>root</cite> attribute and reconstruct the scale.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>x: string</dt><dd><p>New <cite>root</cite> attribute.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventScale.setScale">
<span class="sig-name descname"><span class="pre">setScale</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventScale.setScale"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventScale.setScale" title="Permalink to this definition">¶</a></dt>
<dd><p>Replace the <cite>scale</cite> attribute and reconstruct the scale.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>x: string</dt><dd><p>New <cite>scale</cite> attribute.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventScale.setFirst">
<span class="sig-name descname"><span class="pre">setFirst</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventScale.setFirst"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventScale.setFirst" title="Permalink to this definition">¶</a></dt>
<dd><p>Replace the <cite>first</cite> attribute and reconstruct the scale.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>x: int</dt><dd><p>New <cite>int</cite> attribute.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventScale.setOctaves">
<span class="sig-name descname"><span class="pre">setOctaves</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventScale.setOctaves"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventScale.setOctaves" title="Permalink to this definition">¶</a></dt>
<dd><p>Replace the <cite>octaves</cite> attribute and reconstruct the scale.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>x: int</dt><dd><p>New <cite>octaves</cite> attribute.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventScale.setType">
<span class="sig-name descname"><span class="pre">setType</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventScale.setType"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventScale.setType" title="Permalink to this definition">¶</a></dt>
<dd><p>Replace the <cite>type</cite> attribute and reconstruct the scale.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>x: int</dt><dd><p>New <cite>type</cite> attribute.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="pyo.EventScale.root">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">root</span></span><a class="headerlink" href="#pyo.EventScale.root" title="Permalink to this definition">¶</a></dt>
<dd><p>string. Name of the fundamental key.</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="pyo.EventScale.scale">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">scale</span></span><a class="headerlink" href="#pyo.EventScale.scale" title="Permalink to this definition">¶</a></dt>
<dd><p>string. Name of scale to generate.</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="pyo.EventScale.first">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">first</span></span><a class="headerlink" href="#pyo.EventScale.first" title="Permalink to this definition">¶</a></dt>
<dd><p>int. First octave to generate.</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="pyo.EventScale.octaves">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">octaves</span></span><a class="headerlink" href="#pyo.EventScale.octaves" title="Permalink to this definition">¶</a></dt>
<dd><p>int. Number of octaves to generate.</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="pyo.EventScale.type">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">type</span></span><a class="headerlink" href="#pyo.EventScale.type" title="Permalink to this definition">¶</a></dt>
<dd><p>int. Unit in which pitch values are stored.</p>
</dd></dl>
</dd></dl>
</section>
<section id="eventgenerator">
<h2><em>EventGenerator</em><a class="headerlink" href="#eventgenerator" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventGenerator">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventGenerator</span></span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventGenerator"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventGenerator" title="Permalink to this definition">¶</a></dt>
<dd><p>Base class for all event generators.</p>
<p>This class contains the common behaviours of all event generators.</p>
<p>Each EventGenerator contains a particular algorithm that can produce a
sequence of values triggered by an Events mecanism for one of its arguments.</p>
<p>The EventGenerator allows very flexible control of the algorithm parameters.
It can be a single value, another EventGenerator or an audio signal (PyoObject).</p>
<p>Arithmetic operations are allowed on EventGenerator. An EventDummy is
then created to apply the operation to each value produced by the generator.</p>
<p>Arithmetic operators are:</p>
<blockquote>
<div><dl class="simple">
<dt>+: float, PyoObject or EventGenerator</dt><dd><p>Addition.</p>
</dd>
<dt>-: float, PyoObject or EventGenerator</dt><dd><p>Substraction</p>
</dd>
<dt><a href="#id1"><span class="problematic" id="id2">*</span></a>: float, PyoObject or EventGenerator</dt><dd><p>Multiplication</p>
</dd>
<dt>/: float, PyoObject or EventGenerator</dt><dd><p>Division</p>
</dd>
<dt>%:  float, PyoObject or EventGenerator</dt><dd><p>Modulo (remaining of the division)</p>
</dd>
<dt><a href="#id3"><span class="problematic" id="id4">**</span></a>: float, PyoObject or EventGenerator</dt><dd><p>Exponent</p>
</dd>
<dt>//: float, PyoObject or EventGenerator</dt><dd><p>Quantizer (returns te nearest multiple of its argument)</p>
</dd>
</dl>
</div></blockquote>
<p>EventGenerator has a number of filter methods that can be applied on
any generator to modify its output values. Available filter methods are:</p>
<blockquote>
<div><dl class="simple">
<dt>floor:</dt><dd><p>Return an EventFilter computing the largest integer less than or
equal to its input value.</p>
</dd>
<dt>ceil:</dt><dd><p>Return an EventFilter computing the smallest integer greater than
or equal to its input value.</p>
</dd>
<dt>round:</dt><dd><p>Return an EventFilter computing the nearest integer to its input value.</p>
</dd>
<dt>snap:</dt><dd><p>Return an EventFilter which choose the nearest value of its input
value in a list of choices.</p>
</dd>
<dt>deviate:</dt><dd><p>Return an EventFilter which randomly move, up or down, its input value.</p>
</dd>
<dt>clip:</dt><dd><p>Return an EventFilter which clips its input value between predefined
limits.</p>
</dd>
<dt>scale:</dt><dd><p>Return an EventFilter which maps its input value, in the range 0 to 1,
to an output range, with a scaling curve.</p>
</dd>
<dt>rescale:</dt><dd><p>Return an EventFilter which maps its input value, given in an input
range, to an output range with a scaling curve.</p>
</dd>
<dt>iftrue:</dt><dd><p>Return an EventFilter which compares its input value to a comparison
value and outputs it if the comparison is True.</p>
</dd>
</dl>
</div></blockquote>
<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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</div>
<hr class="docutils"/>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventGenerator.floor">
<span class="sig-name descname"><span class="pre">floor</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventGenerator.floor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventGenerator.floor" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an EventFilter computing the largest integer less than or
equal to its input value.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventGenerator.ceil">
<span class="sig-name descname"><span class="pre">ceil</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventGenerator.ceil"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventGenerator.ceil" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an EventFilter computing the smallest integer greater than or
equal to its input value.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventGenerator.round">
<span class="sig-name descname"><span class="pre">round</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventGenerator.round"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventGenerator.round" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an EventFilter computing the nearest integer to its input value.
If two values are equally close, rounding is done toward the even choice.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventGenerator.abs">
<span class="sig-name descname"><span class="pre">abs</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventGenerator.abs"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventGenerator.abs" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an EventFilter computing the absolute value of its input value.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventGenerator.snap">
<span class="sig-name descname"><span class="pre">snap</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">choice</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventGenerator.snap"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventGenerator.snap" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an EventFilter which choose the nearest value of its input value
in the <cite>choice</cite> list.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>choice: list of floats</dt><dd><p>Possible values to output.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventGenerator.deviate">
<span class="sig-name descname"><span class="pre">deviate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">depth</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventGenerator.deviate"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventGenerator.deviate" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an EventFilter which randomly move, up or down, its input value
according to the argument <cite>depth</cite>, in percent.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>depth: float or PyoObject</dt><dd><p>Percentage of deviation, between 0 and 100.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventGenerator.clip">
<span class="sig-name descname"><span class="pre">clip</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mini</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">maxi</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventGenerator.clip"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventGenerator.clip" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an EventFilter which clips its input value between the limits
<cite>mini</cite> and <cite>maxi</cite>.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>mini: float or PyoObject</dt><dd><p>Minimum output value.</p>
</dd>
<dt>maxi: float or PyoObject</dt><dd><p>Maximum output value.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventGenerator.scale">
<span class="sig-name descname"><span class="pre">scale</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mini</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">maxi</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expon</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventGenerator.scale"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventGenerator.scale" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an EventFilter which maps its input value, in the range 0 to 1,
to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>mini: float or PyoObject</dt><dd><p>Minimum output value.</p>
</dd>
<dt>maxi: float or PyoObject</dt><dd><p>Maximum output value.</p>
</dd>
<dt>expon: float or PyoObject</dt><dd><p>Exponent value, specifies the nature of the scaling curve.
Values between 0 and 1 give a logarithmic curve, and values
higher than 1 give an exponential curve.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventGenerator.rescale">
<span class="sig-name descname"><span class="pre">rescale</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inmin</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">inmax</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outmin</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outmax</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expon</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventGenerator.rescale"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventGenerator.rescale" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite>
to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling
curve deternimed bu the <cite>expon</cite> value.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>inmin: float or PyoObject</dt><dd><p>Minimum input value.</p>
</dd>
<dt>inmax: float or PyoObject</dt><dd><p>Maximum input value.</p>
</dd>
<dt>outmin: float or PyoObject</dt><dd><p>Minimum output value.</p>
</dd>
<dt>outmax: float or PyoObject</dt><dd><p>Maximum output value.</p>
</dd>
<dt>expon: float or PyoObject</dt><dd><p>Exponent value, specifies the nature of the scaling curve.
Values between 0 and 1 give a logarithmic curve, and values
higher than 1 give an exponential curve.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.EventGenerator.iftrue">
<span class="sig-name descname"><span class="pre">iftrue</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">op</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventGenerator.iftrue"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventGenerator.iftrue" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an EventFilter which compares its input value to the value
given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>. If
the result is True, the input value is sent to the output, otherwise,
the last valid value is sent again.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>op: string</dt><dd><p>The comparison operator. Valid operators are:
‘&lt;’, ‘&lt;=’, ‘&gt;’, ‘&gt;=’, ‘==’, ‘!=’.</p>
</dd>
<dt>comp: float or PyoObject</dt><dd><p>Comparison value.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</dd></dl>
</section>
<section id="eventdummy">
<h2><em>EventDummy</em><a class="headerlink" href="#eventdummy" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventDummy">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventDummy</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">generator1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">generator2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventDummy"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventDummy" title="Permalink to this definition">¶</a></dt>
<dd><p>An EventGenerator created internally to handle arithmetic on Events.</p>
<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>(generator1, generator2, type)</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">next</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
</dd></dl>
</section>
<hr class="docutils"/>
<section id="eventfilter">
<h2><em>EventFilter</em><a class="headerlink" href="#eventfilter" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventFilter">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventFilter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">generator</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventFilter"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>An EventGenerator created internally to handle simple filter on Events.</p>
<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>(generator, type, *args)</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">next</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
</dd></dl>
</section>
<hr class="docutils"/>
<section id="eventkey">
<h2><em>EventKey</em><a class="headerlink" href="#eventkey" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventKey">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventKey</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">master</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventKey"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventKey" title="Permalink to this definition">¶</a></dt>
<dd><p>An EventGenerator that allow to retrieve the value of another parameter.</p>
<p>EventKey returns the current value of another parameter of the Events
object where it is used. From there, other processes can be applied
(arithmetics, filters) to transform this value.</p>
<p>EventKey can also read parameter values from another Events object when
one is passed as <cite>master</cite> argument.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>key: string</dt><dd><p>The name of the parameter to read from.</p>
</dd>
<dt>master: Events, optional</dt><dd><p>The Events object from which to read the parameter value. If
None (the default), the current Events object is used.</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="n">s</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c1"># The lower the pitch value, the louder is the note.</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dbkey</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventKey" title="pyo.lib.events.EventKey"><span class="n">EventKey</span></a><span class="p">(</span><span class="s2">"midinote"</span><span class="p">)</span><span class="o">.</span><span class="n">rescale</span><span class="p">(</span><span class="mi">48</span><span class="p">,</span><span class="mi">84</span><span class="p">,</span><span class="o">-</span><span class="mi">3</span><span class="p">,</span><span class="o">-</span><span class="mi">32</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.Events" title="pyo.lib.events.Events"><span class="n">Events</span></a><span class="p">(</span><span class="n">midinote</span><span class="o">=</span><span class="nb">list</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">48</span><span class="p">,</span><span class="mi">84</span><span class="p">,</span><span class="mi">2</span><span class="p">)),</span> <span class="n">beat</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="mf">4.</span><span class="p">,</span> <span class="n">db</span><span class="o">=</span><span class="n">dbkey</span><span class="p">)</span><span class="o">.</span><span class="n">play</span><span class="p">()</span>
</pre></div>
</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>(key[, master])</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">getKey</span></code>()</p></td>
<td><p>Returns the key, as a string, of the parameter to read from.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">reset</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">next</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</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.EventKey.getKey">
<span class="sig-name descname"><span class="pre">getKey</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventKey.getKey"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventKey.getKey" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the key, as a string, of the parameter to read from.</p>
</dd></dl>
</dd></dl>
</section>
<section id="eventseq">
<h2><em>EventSeq</em><a class="headerlink" href="#eventseq" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventSeq">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventSeq</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">values</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">occurrences</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">inf</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stopEventsWhenDone</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventSeq"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventSeq" title="Permalink to this definition">¶</a></dt>
<dd><p>Plays through an entire list of values many times.</p>
<p>EventSeq will loop over its list of values a number of times
defined by the occurrences argument.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>values: EventScale or list</dt><dd><p>List of values to loop over. Values in list can be floats,
PyoObject or other EventGenerator.</p>
</dd>
<dt>occurrences: int, optional</dt><dd><p>Number of times the sequence is entirely played in loop.
Defaults to inf (infinite).</p>
</dd>
<dt>stopEventsWhenDone: bool, optional</dt><dd><p>If True, the Events playback will stop if this generator reaches
its end. If False, the Events will ignore this signal and probably
get None as value for the given parameter. It’s the user
responsability to handle this case correctly. Defaults to True.</p>
</dd>
</dl>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If an Events argument receives a single value or a list, it will be
automatically converted to an EventSeq.</p>
</div>
<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="n">s</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.Events" title="pyo.lib.events.Events"><span class="n">Events</span></a><span class="p">(</span><span class="n">freq</span><span class="o">=</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventSeq" title="pyo.lib.events.EventSeq"><span class="n">EventSeq</span></a><span class="p">(</span><a class="sphinx-codeautolink-a" href="../../api/functions/conv.html#pyo.midiToHz" title="pyo.midiToHz"><span class="n">midiToHz</span></a><span class="p">([</span><span class="mi">60</span><span class="p">,</span> <span class="mi">64</span><span class="p">,</span> <span class="mi">67</span><span class="p">,</span> <span class="mi">72</span><span class="p">])),</span> <span class="n">beat</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="mf">4.</span><span class="p">)</span><span class="o">.</span><span class="n">play</span><span class="p">()</span>
</pre></div>
</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>(values[, occurrences, ...])</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">__len__</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">reset</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">next</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
</dd></dl>
</section>
<hr class="docutils"/>
<section id="eventslide">
<h2><em>EventSlide</em><a class="headerlink" href="#eventslide" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventSlide">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventSlide</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">values</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">segment</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">step</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">startpos</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">wraparound</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">occurrences</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">inf</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stopEventsWhenDone</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventSlide"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventSlide" title="Permalink to this definition">¶</a></dt>
<dd><p>Plays overlapping segments from a list of values.</p>
<p>EventSlide will play a segment of length <cite>segment</cite> from startpos,
then another segment with a start position incremented by <cite>step</cite>,
and so on.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>values: EventScale or list</dt><dd><p>List of values to read. Values in list can be floats,
PyoObject or other EventGenerator.</p>
</dd>
<dt>segment: int, PyoObject or EventGenerator</dt><dd><p>Number of values of each segment.</p>
</dd>
<dt>step: int, PyoObject or EventGenerator</dt><dd><p>How far to step the start of each segment from the previous. A
negative value will step backward.</p>
</dd>
<dt>startpos: int, optional</dt><dd><p>The start position of the first segment. A negative value sets
the position backward starting from the end of the list.
Defaults to 0.</p>
</dd>
<dt>wraparound: bool, optional</dt><dd><p>If ‘wraparound’ if True, indexing wraps around if goes past the
beginning or the end of the list. If False, the playback stops
if it goes outside the list bounds. Defaults to True.</p>
</dd>
<dt>occurrences: int, optional</dt><dd><p>Number of entire segments to play. Defaults to inf (infinite).</p>
</dd>
<dt>stopEventsWhenDone: bool, optional</dt><dd><p>If True, the Events playback will stop if this generator reaches
its end. If False, the Events will ignore this signal and probably
get None as value for the given parameter. It’s the user
responsability to handle this case correctly. Defaults to True.</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="n">s</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">scl</span> <span class="o">=</span> <span class="p">[</span><span class="mf">5.00</span><span class="p">,</span> <span class="mf">5.02</span><span class="p">,</span> <span class="mf">5.03</span><span class="p">,</span> <span class="mf">5.05</span><span class="p">,</span> <span class="mf">5.07</span><span class="p">,</span> <span class="mf">5.08</span><span class="p">,</span> <span class="mf">5.10</span><span class="p">,</span> <span class="mf">6.00</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.Events" title="pyo.lib.events.Events"><span class="n">Events</span></a><span class="p">(</span><span class="n">degree</span><span class="o">=</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventSlide" title="pyo.lib.events.EventSlide"><span class="n">EventSlide</span></a><span class="p">(</span><span class="n">scl</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">beat</span> <span class="o">=</span> <span class="mi">1</span><span class="o">/</span><span class="mf">4.</span><span class="p">,</span> <span class="n">db</span> <span class="o">=</span> <span class="o">-</span><span class="mi">6</span><span class="p">)</span><span class="o">.</span><span class="n">play</span><span class="p">()</span>
</pre></div>
</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>(values, segment, step[, startpos, ...])</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">__len__</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">reset</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">getStepValue</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">getSegmentValue</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">next</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
</dd></dl>
</section>
<hr class="docutils"/>
<section id="eventindex">
<h2><em>EventIndex</em><a class="headerlink" href="#eventindex" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventIndex">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventIndex</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">values</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">index</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">occurrences</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">inf</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stopEventsWhenDone</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventIndex"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventIndex" title="Permalink to this definition">¶</a></dt>
<dd><p>Plays values from a list based on a position index.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>values: EventScale or list</dt><dd><p>List of values to read. Values in list can be floats,
PyoObject or other EventGenerator.</p>
</dd>
<dt>index: int, PyoObject or EventGenerator</dt><dd><p>Position to read in the list, starting at 0.</p>
</dd>
<dt>occurrences: int, optional</dt><dd><p>Number of values to play. Defaults to inf (infinite).</p>
</dd>
<dt>stopEventsWhenDone: bool, optional</dt><dd><p>If True, the Events playback will stop if this generator reaches
its end. If False, the Events will ignore this signal and probably
get None as value for the given parameter. It’s the user
responsability to handle this case correctly. Defaults to True.</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="n">s</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">scl</span> <span class="o">=</span> <span class="p">[</span><span class="mf">5.00</span><span class="p">,</span> <span class="mf">5.02</span><span class="p">,</span> <span class="mf">5.03</span><span class="p">,</span> <span class="mf">5.05</span><span class="p">,</span> <span class="mf">5.07</span><span class="p">,</span> <span class="mf">5.08</span><span class="p">,</span> <span class="mf">5.10</span><span class="p">,</span> <span class="mf">6.00</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventSeq" title="pyo.lib.events.EventSeq"><span class="n">arp</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventSeq" title="pyo.lib.events.EventSeq"><span class="n">EventSeq</span></a><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">1</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.Events" title="pyo.lib.events.Events"><span class="n">Events</span></a><span class="p">(</span><span class="n">degree</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventIndex" title="pyo.lib.events.EventIndex"><span class="n">EventIndex</span></a><span class="p">(</span><span class="n">scl</span><span class="p">,</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventSeq" title="pyo.lib.events.EventSeq"><span class="n">arp</span></a><span class="p">),</span> <span class="n">beat</span> <span class="o">=</span> <span class="mi">1</span><span class="o">/</span><span class="mf">4.</span><span class="p">,</span> <span class="n">db</span> <span class="o">=</span> <span class="o">-</span><span class="mi">6</span><span class="p">)</span><span class="o">.</span><span class="n">play</span><span class="p">()</span>
</pre></div>
</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>(values, index[, occurrences, ...])</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">__len__</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">reset</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">getIndexValue</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">next</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
</dd></dl>
</section>
<hr class="docutils"/>
<section id="eventmarkov">
<h2><em>EventMarkov</em><a class="headerlink" href="#eventmarkov" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventMarkov">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventMarkov</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">values</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">order</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">occurrences</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">inf</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stopEventsWhenDone</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventMarkov"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventMarkov" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies a Markov algorithm to a list of values.</p>
<p>A Markov chain is a stochastic model describing a sequence of possible events
in which the probability of each event depends only on the state attained in
the previous events.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>values: EventScale or list</dt><dd><p>Original list of values.</p>
</dd>
<dt>order: int, PyoObject or EventGenerator, optional</dt><dd><p>Order of the Markov chain, between 1 and 10. Determines how many past
values will be used to build the probability table for the next note.
Defaults to 2.</p>
</dd>
<dt>occurrences: int, optional</dt><dd><p>Number of values to play. Defaults to inf (infinite).</p>
</dd>
<dt>stopEventsWhenDone: bool, optional</dt><dd><p>If True, the Events playback will stop if this generator reaches
its end. If False, the Events will ignore this signal and probably
get None as value for the given parameter. It’s the user
responsability to handle this case correctly. Defaults to True.</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="n">s</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">jesus</span> <span class="o">=</span>  <span class="p">[</span><span class="mi">67</span><span class="p">,</span><span class="mi">69</span><span class="p">,</span><span class="mi">71</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">72</span><span class="p">,</span><span class="mi">72</span><span class="p">,</span><span class="mi">76</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">79</span><span class="p">,</span><span class="mi">78</span><span class="p">,</span><span class="mi">79</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">71</span><span class="p">,</span><span class="mi">67</span><span class="p">,</span><span class="mi">69</span><span class="p">,</span><span class="mi">71</span><span class="p">,</span><span class="mi">72</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">76</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">72</span><span class="p">,</span><span class="mi">71</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">jesus</span> <span class="o">+=</span> <span class="p">[</span><span class="mi">69</span><span class="p">,</span><span class="mi">71</span><span class="p">,</span><span class="mi">67</span><span class="p">,</span><span class="mi">66</span><span class="p">,</span><span class="mi">67</span><span class="p">,</span><span class="mi">69</span><span class="p">,</span><span class="mi">62</span><span class="p">,</span><span class="mi">66</span><span class="p">,</span><span class="mi">69</span><span class="p">,</span><span class="mi">72</span><span class="p">,</span><span class="mi">71</span><span class="p">,</span><span class="mi">69</span><span class="p">,</span><span class="mi">71</span><span class="p">,</span><span class="mi">67</span><span class="p">,</span><span class="mi">69</span><span class="p">,</span><span class="mi">71</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">72</span><span class="p">,</span><span class="mi">72</span><span class="p">,</span><span class="mi">76</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">79</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">jesus</span> <span class="o">+=</span> <span class="p">[</span><span class="mi">78</span><span class="p">,</span><span class="mi">79</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">71</span><span class="p">,</span><span class="mi">67</span><span class="p">,</span><span class="mi">69</span><span class="p">,</span><span class="mi">71</span><span class="p">,</span><span class="mi">64</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">72</span><span class="p">,</span><span class="mi">71</span><span class="p">,</span><span class="mi">69</span><span class="p">,</span><span class="mi">67</span><span class="p">,</span><span class="mi">62</span><span class="p">,</span><span class="mi">67</span><span class="p">,</span><span class="mi">66</span><span class="p">,</span><span class="mi">67</span><span class="p">,</span><span class="mi">71</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">79</span><span class="p">,</span><span class="mi">74</span><span class="p">,</span><span class="mi">71</span><span class="p">,</span><span class="mi">67</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.Events" title="pyo.lib.events.Events"><span class="n">Events</span></a><span class="p">(</span><span class="n">midinote</span><span class="o">=</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventMarkov" title="pyo.lib.events.EventMarkov"><span class="n">EventMarkov</span></a><span class="p">(</span><span class="n">jesus</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="n">beat</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="mf">4.</span><span class="p">,</span> <span class="n">db</span><span class="o">=-</span><span class="mi">6</span><span class="p">)</span><span class="o">.</span><span class="n">play</span><span class="p">()</span>
</pre></div>
</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>(values[, order, occurrences, ...])</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">__len__</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">reset</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">getOrderValue</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">next</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
</dd></dl>
</section>
<hr class="docutils"/>
<section id="eventchoice">
<h2><em>EventChoice</em><a class="headerlink" href="#eventchoice" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventChoice">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventChoice</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">values</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">occurrences</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">inf</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stopEventsWhenDone</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventChoice"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventChoice" title="Permalink to this definition">¶</a></dt>
<dd><p>Plays values randomly chosen from a list.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>values: EventScale or list</dt><dd><p>List of possible values to read. Values in list can be floats,
PyoObject or other EventGenerator.</p>
</dd>
<dt>occurrences: int, optional</dt><dd><p>Number of values to play. Defaults to inf (infinite).</p>
</dd>
<dt>stopEventsWhenDone: bool, optional</dt><dd><p>If True, the Events playback will stop if this generator reaches
its end. If False, the Events will ignore this signal and probably
get None as value for the given parameter. It’s the user
responsability to handle this case correctly. Defaults to True.</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="n">s</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">scl</span> <span class="o">=</span> <span class="p">[</span><span class="mf">5.00</span><span class="p">,</span> <span class="mf">5.02</span><span class="p">,</span> <span class="mf">5.03</span><span class="p">,</span> <span class="mf">5.05</span><span class="p">,</span> <span class="mf">5.07</span><span class="p">,</span> <span class="mf">5.08</span><span class="p">,</span> <span class="mf">5.10</span><span class="p">,</span> <span class="mf">6.00</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.Events" title="pyo.lib.events.Events"><span class="n">Events</span></a><span class="p">(</span><span class="n">degree</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventChoice" title="pyo.lib.events.EventChoice"><span class="n">EventChoice</span></a><span class="p">(</span><span class="n">scl</span><span class="p">),</span> <span class="n">beat</span> <span class="o">=</span> <span class="mi">1</span><span class="o">/</span><span class="mf">4.</span><span class="p">,</span> <span class="n">db</span> <span class="o">=</span> <span class="o">-</span><span class="mi">6</span><span class="p">)</span><span class="o">.</span><span class="n">play</span><span class="p">()</span>
</pre></div>
</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>(values[, occurrences, ...])</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">__len__</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">reset</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">next</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
</dd></dl>
</section>
<hr class="docutils"/>
<section id="eventdrunk">
<h2><em>EventDrunk</em><a class="headerlink" href="#eventdrunk" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventDrunk">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventDrunk</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">values</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">maxStep</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">occurrences</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">inf</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stopEventsWhenDone</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventDrunk"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventDrunk" title="Permalink to this definition">¶</a></dt>
<dd><p>Performs a random walk over a list of values.</p>
<p>A random walk is a stochastic process that consists of a succession of
random steps, within a distance of +/- <cite>maxStep</cite> from the previous state.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>values: EventScale or list</dt><dd><p>List of values to read. Values in list can be floats,
PyoObject or other EventGenerator.</p>
</dd>
<dt>maxStep: int, PyoObject or EventGenerator, optional</dt><dd><p>Determine the larger step the walk can do between two successive
events. A negative ‘maxStep’ is the same but repetition are not
allowed. Defaults to 2.</p>
</dd>
<dt>occurrences: int, optional</dt><dd><p>Number of values to play. Defaults to inf (infinite).</p>
</dd>
<dt>stopEventsWhenDone: bool, optional</dt><dd><p>If True, the Events playback will stop if this generator reaches
its end. If False, the Events will ignore this signal and probably
get None as value for the given parameter. It’s the user
responsability to handle this case correctly. Defaults to True.</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="n">s</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">scl</span> <span class="o">=</span> <span class="p">[</span><span class="mf">5.00</span><span class="p">,</span> <span class="mf">5.02</span><span class="p">,</span> <span class="mf">5.03</span><span class="p">,</span> <span class="mf">5.05</span><span class="p">,</span> <span class="mf">5.07</span><span class="p">,</span> <span class="mf">5.08</span><span class="p">,</span> <span class="mf">5.10</span><span class="p">,</span> <span class="mf">6.00</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.Events" title="pyo.lib.events.Events"><span class="n">Events</span></a><span class="p">(</span><span class="n">degree</span><span class="o">=</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventDrunk" title="pyo.lib.events.EventDrunk"><span class="n">EventDrunk</span></a><span class="p">(</span><span class="n">scl</span><span class="p">,</span> <span class="n">maxStep</span><span class="o">=-</span><span class="mi">2</span><span class="p">),</span> <span class="n">beat</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="mf">4.</span><span class="p">,</span> <span class="n">db</span><span class="o">=-</span><span class="mi">6</span><span class="p">)</span><span class="o">.</span><span class="n">play</span><span class="p">()</span>
</pre></div>
</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>(values[, maxStep, occurrences, ...])</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">__len__</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">reset</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">getMaxStepValue</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">next</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
</dd></dl>
</section>
<hr class="docutils"/>
<section id="eventnoise">
<h2><em>EventNoise</em><a class="headerlink" href="#eventnoise" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventNoise">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventNoise</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">type</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">occurrences</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">inf</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stopEventsWhenDone</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventNoise"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventNoise" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a random value between -1.0 and 1.0.</p>
<p>EventNoise returns a random value between -1.0 and 1.0, based on one of
three common noise generators, white, pink (1/f) and brown (1/f^2).</p>
<dl class="field-list">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl>
<dt>type: int, optional</dt><dd><p>The type of noise used to generate the random sequence. Available
types are:</p>
<p>0: white noise (default)
1: pink noise
2:brown noise</p>
</dd>
<dt>occurrences: int, optional</dt><dd><p>Number of values to play. Defaults to inf (infinite).</p>
</dd>
<dt>stopEventsWhenDone: bool, optional</dt><dd><p>If True, the Events playback will stop if this generator reaches
its end. If False, the Events will ignore this signal and probably
get None as value for the given parameter. It’s the user
responsability to handle this case correctly. Defaults to True.</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="n">s</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventScale" title="pyo.lib.events.EventScale"><span class="n">scl</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventScale" title="pyo.lib.events.EventScale"><span class="n">EventScale</span></a><span class="p">(</span><span class="s2">"C"</span><span class="p">,</span> <span class="s2">"aeolian"</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">note</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventNoise" title="pyo.lib.events.EventNoise"><span class="n">EventNoise</span></a><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">rescale</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">48</span><span class="p">,</span><span class="mi">84</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">snap</span><span class="p">(</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventScale" title="pyo.lib.events.EventScale"><span class="n">scl</span></a><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.Events" title="pyo.lib.events.Events"><span class="n">Events</span></a><span class="p">(</span><span class="n">midinote</span><span class="o">=</span><span class="n">note</span><span class="p">,</span> <span class="n">beat</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="mf">4.</span><span class="p">,</span> <span class="n">db</span><span class="o">=-</span><span class="mi">6</span><span class="p">)</span><span class="o">.</span><span class="n">play</span><span class="p">()</span>
</pre></div>
</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>([type, occurrences, stopEventsWhenDone])</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">__len__</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">reset</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">getTypeValue</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">next</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
</dd></dl>
</section>
<hr class="docutils"/>
<section id="eventcall">
<h2><em>EventCall</em><a class="headerlink" href="#eventcall" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventCall">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventCall</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="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventCall"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventCall" title="Permalink to this definition">¶</a></dt>
<dd><p>Calls a function, with any number of arguments, and uses its return value.</p>
<p>EventCall can call any function (built-in, from a module or user-defined)
and use its return as the value for the Events’s parameter where it is used.
The function <em>must</em> return a single number.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>function: callable</dt><dd><p>The function to call, which should return the value to use.</p>
</dd>
<dt>args: int, PyoObject or EventGenerator, optional</dt><dd><p>Any number of arguments to pass to the function call. If given a
PyoObject or an EventGenerator, these will be resolved for each
event and the result passed, as number, to the function.</p>
</dd>
<dt>occurrences: int, optional</dt><dd><p>Number of values to play. Defaults to inf (infinite).</p>
</dd>
<dt>stopEventsWhenDone: bool, optional</dt><dd><p>If True, the Events playback will stop if this generator reaches
its end. If False, the Events will ignore this signal and probably
get None as value for the given parameter. It’s the user
responsability to handle this case correctly. Defaults to True.</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="n">s</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">random</span> <span class="kn">import</span> <span class="n">randrange</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.Events" title="pyo.lib.events.Events"><span class="n">Events</span></a><span class="p">(</span><span class="n">midinote</span><span class="o">=</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventCall" title="pyo.lib.events.EventCall"><span class="n">EventCall</span></a><span class="p">(</span><span class="n">randrange</span><span class="p">,</span> <span class="mi">48</span><span class="p">,</span> <span class="mi">72</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="n">beat</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="mf">4.</span><span class="p">,</span> <span class="n">db</span><span class="o">=-</span><span class="mi">6</span><span class="p">)</span><span class="o">.</span><span class="n">play</span><span class="p">()</span>
</pre></div>
</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, *args, **kwargs)</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">__len__</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">reset</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">next</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
</dd></dl>
</section>
<hr class="docutils"/>
<section id="eventconditional">
<h2><em>EventConditional</em><a class="headerlink" href="#eventconditional" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventConditional">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventConditional</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">condition</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">iftrue</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">iffalse</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">occurrences</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">inf</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stopEventsWhenDone</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventConditional"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventConditional" title="Permalink to this definition">¶</a></dt>
<dd><p>Executes one generator or the other depending on the result of a condition.</p>
<p>EventConditional takes three values or generators as arguments and if the
value of <cite>condition</cite> is True (anything that python considers True), the
<cite>iftrue</cite> argument is used to produce the value for the event, otherwise
th <cite>iffalse</cite> argument is used.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>condition: int, PyoObject or EventGenerator</dt><dd><p>Conditional value. True for everything python considers True.</p>
</dd>
<dt>iftrue: int, PyoObject or EventGenerator</dt><dd><p>Output value if the condition is True.</p>
</dd>
<dt>iffalse: int, PyoObject or EventGenerator</dt><dd><p>Output value if the condition is False.</p>
</dd>
<dt>occurrences: int, optional</dt><dd><p>Number of values to play. Defaults to inf (infinite).</p>
</dd>
<dt>stopEventsWhenDone: bool, optional</dt><dd><p>If True, the Events playback will stop if this generator reaches
its end. If False, the Events will ignore this signal and probably
get None as value for the given parameter. It’s the user
responsability to handle this case correctly. Defaults to True.</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="n">s</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">random</span> <span class="kn">import</span> <span class="n">randrange</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventScale" title="pyo.lib.events.EventScale"><span class="n">scl</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventScale" title="pyo.lib.events.EventScale"><span class="n">EventScale</span></a><span class="p">(</span><span class="s2">"C"</span><span class="p">,</span> <span class="s2">"aeolian"</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventChoice" title="pyo.lib.events.EventChoice"><span class="n">bit</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventChoice" title="pyo.lib.events.EventChoice"><span class="n">EventChoice</span></a><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventSlide" title="pyo.lib.events.EventSlide"><span class="n">pittrue</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventSlide" title="pyo.lib.events.EventSlide"><span class="n">EventSlide</span></a><span class="p">(</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventScale" title="pyo.lib.events.EventScale"><span class="n">scl</span></a><span class="p">,</span> <span class="n">segment</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">startpos</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventDrunk" title="pyo.lib.events.EventDrunk"><span class="n">veltrue</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventDrunk" title="pyo.lib.events.EventDrunk"><span class="n">EventDrunk</span></a><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">64</span><span class="p">,</span> <span class="mi">127</span><span class="p">),</span> <span class="n">maxStep</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventConditional" title="pyo.lib.events.EventConditional"><span class="n">pit</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventConditional" title="pyo.lib.events.EventConditional"><span class="n">EventConditional</span></a><span class="p">(</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventChoice" title="pyo.lib.events.EventChoice"><span class="n">bit</span></a><span class="p">,</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventSlide" title="pyo.lib.events.EventSlide"><span class="n">pittrue</span></a><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventConditional" title="pyo.lib.events.EventConditional"><span class="n">vel</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventConditional" title="pyo.lib.events.EventConditional"><span class="n">EventConditional</span></a><span class="p">(</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventChoice" title="pyo.lib.events.EventChoice"><span class="n">bit</span></a><span class="p">,</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventDrunk" title="pyo.lib.events.EventDrunk"><span class="n">veltrue</span></a><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.Events" title="pyo.lib.events.Events"><span class="n">Events</span></a><span class="p">(</span><span class="n">midinote</span><span class="o">=</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventConditional" title="pyo.lib.events.EventConditional"><span class="n">pit</span></a><span class="p">,</span> <span class="n">beat</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="mf">4.</span><span class="p">,</span> <span class="n">midivel</span><span class="o">=</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventConditional" title="pyo.lib.events.EventConditional"><span class="n">vel</span></a><span class="p">)</span><span class="o">.</span><span class="n">play</span><span class="p">()</span>
</pre></div>
</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>(condition, iftrue, iffalse[, ...])</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">__len__</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">reset</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">getConditionValue</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">getIftrueValue</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">getIffalseValue</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">next</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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>()</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">__add__</span></code>(generator)</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">__sub__</span></code>(generator)</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">__mul__</span></code>(generator)</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">__div__</span></code>(generator)</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">__truediv__</span></code>(generator)</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">__pow__</span></code>(generator)</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">__mod__</span></code>(generator)</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">__floordiv__</span></code>(generator)</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">setMaster</span></code>(master)</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">copy</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">reset</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">next</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">resetEmbeddedGenerator</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">floor</span></code>()</p></td>
<td><p>Return an EventFilter computing the largest integer less than or equal to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceil</span></code>()</p></td>
<td><p>Return an EventFilter computing the smallest integer greater than or equal to its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">round</span></code>()</p></td>
<td><p>Return an EventFilter computing the nearest integer to its input value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">abs</span></code>()</p></td>
<td><p>Return an EventFilter computing the absolute value of its input value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">snap</span></code>(choice)</p></td>
<td><p>Return an EventFilter which choose the nearest value of its input value in the <cite>choice</cite> list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">deviate</span></code>(depth)</p></td>
<td><p>Return an EventFilter which randomly move, up or down, its input value according to the argument <cite>depth</cite>, in percent.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip</span></code>(mini, maxi)</p></td>
<td><p>Return an EventFilter which clips its input value between the limits <cite>mini</cite> and <cite>maxi</cite>.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">scale</span></code>(mini, maxi, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range 0 to 1, to an output range, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">rescale</span></code>(inmin, inmax, outmin, outmax, expon)</p></td>
<td><p>Return an EventFilter which maps its input value, in the range <cite>inmin</cite> to <cite>inmax</cite>, to an output range, <cite>outmin</cite> to <cite>outmax</cite>, with a scaling curve deternimed bu the <cite>expon</cite> value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">iftrue</span></code>(op, comp)</p></td>
<td><p>Return an EventFilter which compares its input value to the value given to <cite>comp</cite> argument, using the comparison operator <cite>op</cite>.</p></td>
</tr>
</tbody>
</table>
</details></div>
<div class="autoclasstoc docutils container">
<p class="rubric">Private Methods:</p>
<details><summary>Inherited from <a class="reference internal" href="#pyo.EventGenerator" title="pyo.EventGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventGenerator</span></code></a></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">_inspect_generator</span></code>(generator)</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">_inspect_values</span></code>(values)</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">_inspect_occurrences</span></code>(occurrences)</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">_internalGeneratorNextCall</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">_checkValueTypeAndIncrementCount</span></code>(value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</details></div>
</dd></dl>
</section>
<hr class="docutils"/>
<section id="eventinstrument">
<h2><em>EventInstrument</em><a class="headerlink" href="#eventinstrument" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.EventInstrument">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EventInstrument</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#EventInstrument"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.EventInstrument" title="Permalink to this definition">¶</a></dt>
<dd><p>Base class for an Events instrument. All attributes given to the Events
object can be accessed as self.attribute_name inside the instrument.</p>
<p>This base class constructs an envelope, named self.env, according to the
value given to ‘envelope’ (ex.: a LinTable object) or to ‘attack’, ‘decay’,
‘sustain’ and ‘release’ attributes of the event. The envelope is also
scaled by the value of self.amp, defined by ‘amp’, ‘db’ or ‘midivel’
arguments of the Events object.</p>
<p>This base class also creates a self.freq variable based on ‘freq’, ‘degree’
or ‘midinote’ arguments. This variable can be used in the instrument to
control the pitch of the sound.</p>
<p>All resources are automatically destroyed when the lifetime of the event
is over. The lifetime of the event is set as self.dur + self.tail (‘dur’
or ‘beat’ and ‘tail’ arguments of Events).</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The user has almost no reason to instantiate an EventInstrument object
himself. Instead, he should use it as a parent class for its own instruments.</p>
</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>(**args)</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">clear</span></code>()</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</div>
</dd></dl>
</section>
<hr class="docutils"/>
<section id="events">
<h2><em>Events</em><a class="headerlink" href="#events" title="Permalink to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="pyo.Events">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Events</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#Events"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.Events" title="Permalink to this definition">¶</a></dt>
<dd><p>Sequencing user-defined events to form musical phrases.</p>
<p>The Events object is the primary tool in the events framework. It uses
generators (derived from EventGenerator) as value for its arguments to
build a sequence of events, each of them with their own parameters.</p>
<p>Each time Events needs to produce a new event, it collects values from
the generators given to its arguments, builds a parameter dictionary
and gives it to a new instance of the audio instrument referenced to
its ‘instr’ argument.</p>
<p>The object produces new events until one of its generators reaches the
end of its sequence.</p>
<p>Events is a child of the dictionary class, which means that every argument
given at its initialization will become a new key (with its associated
value) in its memory. These keys will serve to create the parameter
dictionary passed to the audio instrument instance playing this event.
Inside the instrument instance, the value associated to these keys will
be retrieved as instance’s attributes, with the syntax self.key_name.</p>
<p>The user can create as many new keys as needed to control its instrument,
but there is already a number of pre-defined keys for which Events will
do some processing and build useful parameters. Here is the list, grouped
by themes, of pre-defined keys to overwrite:</p>
<dl class="simple">
<dt><strong>Instrument</strong></dt><dd><ul class="simple">
<li><dl class="simple">
<dt>instr: class, optional</dt><dd><p>Reference to a custom class with which the events will be played.
Defaults to DefaultInstrument.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>signal: string, optional</dt><dd><p>Name of the attribute in the instrument defintion retrieved as the
output signal of the Events object. The sig() method returns the
sum, as an audio signal, of all active instances. This can be useful
to do post-processing on the signal produced by the events. Defaults
to None.</p>
</dd>
</dl>
</li>
</ul>
</dd>
<dt><strong>Constants</strong></dt><dd><ul class="simple">
<li><dl class="simple">
<dt>bpm: int, optional</dt><dd><p>Beat-Per-Minute value used by the <cite>beat</cite> key to compute event’s duration.
Defaults to 120.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>outs: int, optional</dt><dd><p>Number of output channels in the audio signal returned by the sig() method.
This value should match the number of audio streams produced by the instrument.
Defaults to 2.</p>
</dd>
</dl>
</li>
</ul>
</dd>
<dt><strong>Duration keys</strong></dt><dd><ul class="simple">
<li><dl class="simple">
<dt>dur: float, PyoObject or EventGenerator, optional</dt><dd><p>Duration, in seconds, before the next event. Defaults to 1.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>beat: float, PyoObject or EventGenerator, optional</dt><dd><p>Duration, in beat value, before the next event (1 beat = quarter note at BPM).
If defined, this value will be used to compute the duration in seconds for the
<cite>dur</cite> key. Defaults to None.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>durmul: float, PyoObject or EventGenerator, optional</dt><dd><p>Event duration multiplier (only affects the duration of the event’s lifetime,
not the time to wait before the next event). Defaults to 1.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>tail: float, PyoObject or EventGenerator, optional</dt><dd><p>Duration, in seconds, to wait before deleting the instrument’s instance when
its envelope has ended. Useful to let a reverb tail to finish before cleaning-up
the instance. Defaults to 2.</p>
</dd>
</dl>
</li>
</ul>
</dd>
<dt><strong>Amplitude keys</strong></dt><dd><ul class="simple">
<li><dl class="simple">
<dt>amp: float, PyoObject or EventGenerator, optional</dt><dd><p>Linear gain for the event (1 is nominal gain). Defaults to 0.7.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>dB: float, PyoObject or EventGenerator, optional</dt><dd><p>Gain, in decibels, for the event. If defined, this value will be used to compute
the linear gain for the <cite>amp</cite> key. Defaults to None.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>midivel: float, PyoObject or EventGenerator, optional</dt><dd><p>Midi velocity, between 0 and 127, for the event. If defined, this value will be
used to compute the linear gain for the <cite>amp</cite> key. Defaults to None.</p>
</dd>
</dl>
</li>
</ul>
</dd>
<dt><strong>Envelope keys</strong></dt><dd><ul class="simple">
<li><dl class="simple">
<dt>envelope: PyoTableObject, optional</dt><dd><p>User-defined envelope as a PyoTableObject. If defined, this will be the envelope
created for the event. Defaults to None.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>attack: float, PyoObject or EventGenerator, optional</dt><dd><p>Rising time, in seconds, of an ASR or ADSR envelope. This envelope is created if
<cite>envelope</cite> is None. Defaults to 0.005.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>decay: float, PyoObject or EventGenerator, optional</dt><dd><p>If defined, its the decay time, in seconds, of an ADSR envelope, otherwise the
envelope will be an ASR (Attack - Sustain - Release). Defaults to None.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>sustain: float, PyoObject or EventGenerator, optional</dt><dd><p>Sustain linear gain of an ADSR or ASR envelope. Defaults to 0.7.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>release: float, PyoObject or EventGenerator, optional</dt><dd><p>Release time, in seconds, of an ASR or ADSR envelope. This envelope is created if
<cite>envelope</cite> is None. Defaults to 0.05.</p>
</dd>
</dl>
</li>
</ul>
</dd>
<dt><strong>Pitch keys</strong></dt><dd><ul class="simple">
<li><dl class="simple">
<dt>freq: float, PyoObject or EventGenerator, optional</dt><dd><p>Frequency, in cycle per seconds, for the event. Defaults to 250.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>midinote: float, PyoObject or EventGenerator, optional</dt><dd><p>Midi pitch, between 0 and 127, for the event. If defined, this value will be used
to compute the frequency in cycles per second for the <cite>freq</cite> key. Defaults to None.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>degree: float, PyoObject or EventGenerator, optional</dt><dd><p>Octave.degree pitch notation (ex.: 6.00, 6.04, 6.07). If defined, this value will be
used to compute the frequency in cycles per second for the <cite>freq</cite> key. Defaults to None.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>transpo: float, PyoObject or EventGenerator, optional</dt><dd><p>Transposition, in midi note value (-12 is an octave lower), automatically computed in
the value of the <cite>freq</cite> key. Defaults to 0.</p>
</dd>
</dl>
</li>
</ul>
</dd>
<dt><strong>Ending keys</strong></dt><dd><ul class="simple">
<li><dl class="simple">
<dt>atend: python callable, optional</dt><dd><p>If defined, a function to call when all events are played. This can be useful to sequence
multiple Events objects. Defaults to None</p>
</dd>
</dl>
</li>
</ul>
</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="n">s</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/tables.html#pyo.CosTable" title="pyo.lib.tables.CosTable"><span class="n">env</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/tables.html#pyo.CosTable" title="pyo.lib.tables.CosTable"><span class="n">CosTable</span></a><span class="p">([(</span><span class="mi">0</span><span class="p">,</span><span class="mf">0.0</span><span class="p">),(</span><span class="mi">64</span><span class="p">,</span><span class="mf">1.0</span><span class="p">),(</span><span class="mi">8191</span><span class="p">,</span><span class="mf">0.0</span><span class="p">)])</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventScale" title="pyo.lib.events.EventScale"><span class="n">scl</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventScale" title="pyo.lib.events.EventScale"><span class="n">EventScale</span></a><span class="p">(</span><span class="n">root</span><span class="o">=</span><span class="s2">"C"</span><span class="p">,</span> <span class="n">scale</span><span class="o">=</span><span class="s2">"egyptian"</span><span class="p">,</span> <span class="n">first</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">octaves</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/randoms.html#pyo.RandInt" title="pyo.lib.randoms.RandInt"><span class="n">seg</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/randoms.html#pyo.RandInt" title="pyo.lib.randoms.RandInt"><span class="n">RandInt</span></a><span class="p">(</span><span class="nb">max</span><span class="o">=</span><span class="mi">6</span><span class="p">,</span> <span class="n">freq</span><span class="o">=</span><span class="mf">0.5</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/randoms.html#pyo.RandInt" title="pyo.lib.randoms.RandInt"><span class="n">step</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/randoms.html#pyo.RandInt" title="pyo.lib.randoms.RandInt"><span class="n">RandInt</span></a><span class="p">(</span><span class="nb">max</span><span class="o">=</span><span class="mi">6</span><span class="p">,</span> <span class="n">freq</span><span class="o">=</span><span class="mf">0.75</span><span class="p">,</span> <span class="n">add</span><span class="o">=-</span><span class="mi">3</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventSlide" title="pyo.lib.events.EventSlide"><span class="n">note</span></a> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventSlide" title="pyo.lib.events.EventSlide"><span class="n">EventSlide</span></a><span class="p">(</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventScale" title="pyo.lib.events.EventScale"><span class="n">scl</span></a><span class="p">,</span> <a class="sphinx-codeautolink-a" href="../../api/classes/randoms.html#pyo.RandInt" title="pyo.lib.randoms.RandInt"><span class="n">seg</span></a><span class="p">,</span> <a class="sphinx-codeautolink-a" href="../../api/classes/randoms.html#pyo.RandInt" title="pyo.lib.randoms.RandInt"><span class="n">step</span></a><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.Events" title="pyo.lib.events.Events"><span class="n">Events</span></a><span class="p">(</span><span class="n">midinote</span><span class="o">=</span><a class="sphinx-codeautolink-a" href="../../api/classes/events.html#pyo.EventSlide" title="pyo.lib.events.EventSlide"><span class="n">note</span></a><span class="p">,</span> <span class="n">beat</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="mf">4.</span><span class="p">,</span> <span class="n">db</span><span class="o">=</span><span class="p">[</span><span class="o">-</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">9</span><span class="p">,</span> <span class="o">-</span><span class="mi">9</span><span class="p">],</span> <span class="n">envelope</span><span class="o">=</span><a class="sphinx-codeautolink-a" href="../../api/classes/tables.html#pyo.CosTable" title="pyo.lib.tables.CosTable"><span class="n">env</span></a><span class="p">,</span> <span class="n">durmul</span><span class="o">=</span><span class="mf">1.25</span><span class="p">)</span><span class="o">.</span><span class="n">play</span><span class="p">()</span>
</pre></div>
</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>(**args)</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">events</span></code>()</p></td>
<td><p>Return a copy of this Events object.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">play</span></code>([dur, delay])</p></td>
<td><p>Start the events playback.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">stop</span></code>([wait])</p></td>
<td><p>Stop the events playback.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">getCurrentDict</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">sig</span></code>()</p></td>
<td><p>Return the audio output signal (sum of all active instances), if defined.</p></td>
</tr>
</tbody>
</table>
<details><summary>Inherited from <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</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">__repr__</span></code>()</p></td>
<td><p>Return repr(self).</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__getattribute__</span></code>(name, /)</p></td>
<td><p>Return getattr(self, name).</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__lt__</span></code>(value, /)</p></td>
<td><p>Return self&lt;value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__le__</span></code>(value, /)</p></td>
<td><p>Return self&lt;=value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__eq__</span></code>(value, /)</p></td>
<td><p>Return self==value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__ne__</span></code>(value, /)</p></td>
<td><p>Return self!=value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__gt__</span></code>(value, /)</p></td>
<td><p>Return self&gt;value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__ge__</span></code>(value, /)</p></td>
<td><p>Return self&gt;=value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__iter__</span></code>()</p></td>
<td><p>Implement iter(self).</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__init__</span></code>(**args)</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">__or__</span></code>(value, /)</p></td>
<td><p>Return self|value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__ror__</span></code>(value, /)</p></td>
<td><p>Return value|self.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__ior__</span></code>(value, /)</p></td>
<td><p>Return self|=value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__len__</span></code>()</p></td>
<td><p>Return len(self).</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__getitem__</span></code></p></td>
<td><p>x.__getitem__(y) &lt;==&gt; x[y]</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__setitem__</span></code>(key, value, /)</p></td>
<td><p>Set self[key] to value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__delitem__</span></code>(key, /)</p></td>
<td><p>Delete self[key].</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__contains__</span></code>(key, /)</p></td>
<td><p>True if the dictionary has the specified key, else False.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__sizeof__</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">get</span></code>(key[, default])</p></td>
<td><p>Return the value for key if key is in the dictionary, else default.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">setdefault</span></code>(key[, default])</p></td>
<td><p>Insert key with a value of default if key is not in the dictionary.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">pop</span></code>(k[,d])</p></td>
<td><p>If key is not found, default is returned if given, otherwise KeyError is raised</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">popitem</span></code>()</p></td>
<td><p>Remove and return a (key, value) pair as a 2-tuple.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">keys</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">items</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">values</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">update</span></code>([E, ]**F)</p></td>
<td><p>If E is present and has a .keys() method, then does:  for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does:  for k, v in E: D[k] = v In either case, this is followed by: for k in F:  D[k] = F[k]</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">fromkeys</span></code>([value])</p></td>
<td><p>Create a new dictionary with keys from iterable and values set to value.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">clear</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">copy</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">__reversed__</span></code>()</p></td>
<td><p>Return a reverse iterator over the dict keys.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">__class_getitem__</span></code></p></td>
<td><p>See PEP 585</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">_processEvent</span></code>()</p></td>
<td><p>Create instrument instances and add them to the active list.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">_remove</span></code>(instanceId)</p></td>
<td><p>Removes an instrument instance from the active list.</p></td>
</tr>
</tbody>
</table>
</div>
<hr class="docutils"/>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.Events.events">
<span class="sig-name descname"><span class="pre">events</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#Events.events"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.Events.events" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a copy of this Events object.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.Events.play">
<span class="sig-name descname"><span class="pre">play</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dur</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">delay</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#Events.play"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.Events.play" title="Permalink to this definition">¶</a></dt>
<dd><p>Start the events playback.</p>
<p>This method returns <cite>self</cite>, allowing it to be applied at the object
creation.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>dur: float, optional</dt><dd><p>Duration, in seconds, of the object’s activation. The default
is 0 and means infinite duration.</p>
</dd>
<dt>delay: float, optional</dt><dd><p>Delay, in seconds, before the object’s activation. Defaults to 0.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.Events.stop">
<span class="sig-name descname"><span class="pre">stop</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">wait</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#Events.stop"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.Events.stop" title="Permalink to this definition">¶</a></dt>
<dd><p>Stop the events playback.</p>
<dl class="field-list simple">
<dt class="field-odd">Args</dt>
<dd class="field-odd"><dl class="simple">
<dt>wait: float, optional</dt><dd><p>Delay, in seconds, before the process is actually stopped.
Defaults to 0.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyo.Events.sig">
<span class="sig-name descname"><span class="pre">sig</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyo/lib/events.html#Events.sig"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyo.Events.sig" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the audio output signal (sum of all active instances), if defined.</p>
<p>The audio output signal of an Events object is the sum of the active
instrument instances’s attribute whose name is the same as given to
the ‘signal’ key. The number of audio streams in the output signal is
determined by the value for the key ‘outs’, it should match the number
of audio streams produced by the instrument.</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="effects.html" title="Special Effects">previous</a> |
            <a href="expression.html" title="Prefix expression evaluators">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>