fake-bpy-module 20240326__py3-none-any.whl → 20240329__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fake-bpy-module might be problematic. Click here for more details.
- aud/__init__.pyi +34 -96
- bgl/__init__.pyi +1265 -2417
- bl_math/__init__.pyi +3 -14
- bl_operators/presets/__init__.pyi +167 -0
- bl_operators/view3d/__init__.pyi +248 -0
- bl_ui/space_toolsystem_toolbar/__init__.pyi +3 -0
- blf/__init__.pyi +13 -50
- bmesh/ops/__init__.pyi +68 -142
- bmesh/types/__init__.pyi +18 -44
- bmesh/utils/__init__.pyi +2 -6
- bpy/app/icons/__init__.pyi +2 -4
- bpy/app/timers/__init__.pyi +2 -6
- bpy/ops/action/__init__.pyi +92 -93
- bpy/ops/anim/__init__.pyi +104 -104
- bpy/ops/armature/__init__.pyi +108 -112
- bpy/ops/asset/__init__.pyi +32 -32
- bpy/ops/boid/__init__.pyi +18 -18
- bpy/ops/brush/__init__.pyi +18 -18
- bpy/ops/buttons/__init__.pyi +12 -12
- bpy/ops/cachefile/__init__.pyi +10 -10
- bpy/ops/camera/__init__.pyi +4 -4
- bpy/ops/clip/__init__.pyi +194 -195
- bpy/ops/cloth/__init__.pyi +2 -2
- bpy/ops/collection/__init__.pyi +10 -10
- bpy/ops/console/__init__.pyi +42 -42
- bpy/ops/constraint/__init__.pyi +36 -36
- bpy/ops/curve/__init__.pyi +114 -118
- bpy/ops/curves/__init__.pyi +55 -53
- bpy/ops/cycles/__init__.pyi +6 -6
- bpy/ops/dpaint/__init__.pyi +12 -12
- bpy/ops/ed/__init__.pyi +24 -24
- bpy/ops/export_anim/__init__.pyi +2 -2
- bpy/ops/export_mesh/__init__.pyi +2 -2
- bpy/ops/export_scene/__init__.pyi +7 -7
- bpy/ops/file/__init__.pyi +80 -83
- bpy/ops/fluid/__init__.pyi +28 -28
- bpy/ops/font/__init__.pyi +46 -46
- bpy/ops/geometry/__init__.pyi +38 -38
- bpy/ops/gizmogroup/__init__.pyi +4 -4
- bpy/ops/gpencil/__init__.pyi +308 -309
- bpy/ops/graph/__init__.pyi +150 -151
- bpy/ops/grease_pencil/__init__.pyi +114 -115
- bpy/ops/image/__init__.pyi +100 -100
- bpy/ops/import_anim/__init__.pyi +2 -2
- bpy/ops/import_curve/__init__.pyi +2 -2
- bpy/ops/import_mesh/__init__.pyi +2 -2
- bpy/ops/import_scene/__init__.pyi +6 -6
- bpy/ops/info/__init__.pyi +14 -14
- bpy/ops/lattice/__init__.pyi +16 -16
- bpy/ops/marker/__init__.pyi +22 -22
- bpy/ops/mask/__init__.pyi +90 -91
- bpy/ops/material/__init__.pyi +6 -6
- bpy/ops/mball/__init__.pyi +20 -21
- bpy/ops/mesh/__init__.pyi +429 -427
- bpy/ops/nla/__init__.pyi +90 -91
- bpy/ops/node/__init__.pyi +242 -243
- bpy/ops/object/__init__.pyi +572 -567
- bpy/ops/outliner/__init__.pyi +142 -142
- bpy/ops/paint/__init__.pyi +182 -126
- bpy/ops/paintcurve/__init__.pyi +20 -20
- bpy/ops/palette/__init__.pyi +14 -14
- bpy/ops/particle/__init__.pyi +72 -72
- bpy/ops/pose/__init__.pyi +90 -90
- bpy/ops/poselib/__init__.pyi +18 -18
- bpy/ops/preferences/__init__.pyi +76 -76
- bpy/ops/ptcache/__init__.pyi +14 -14
- bpy/ops/render/__init__.pyi +24 -24
- bpy/ops/rigidbody/__init__.pyi +34 -34
- bpy/ops/scene/__init__.pyi +86 -86
- bpy/ops/screen/__init__.pyi +84 -84
- bpy/ops/script/__init__.pyi +6 -6
- bpy/ops/sculpt/__init__.pyi +80 -62
- bpy/ops/sculpt_curves/__init__.pyi +8 -8
- bpy/ops/sequencer/__init__.pyi +184 -185
- bpy/ops/sound/__init__.pyi +16 -16
- bpy/ops/spreadsheet/__init__.pyi +8 -8
- bpy/ops/surface/__init__.pyi +12 -12
- bpy/ops/text/__init__.pyi +86 -86
- bpy/ops/text_editor/__init__.pyi +2 -2
- bpy/ops/texture/__init__.pyi +8 -8
- bpy/ops/transform/__init__.pyi +112 -112
- bpy/ops/ui/__init__.pyi +64 -64
- bpy/ops/uilist/__init__.pyi +6 -6
- bpy/ops/uv/__init__.pyi +104 -105
- bpy/ops/view2d/__init__.pyi +28 -28
- bpy/ops/view3d/__init__.pyi +134 -134
- bpy/ops/wm/__init__.pyi +253 -230
- bpy/ops/workspace/__init__.pyi +14 -14
- bpy/ops/world/__init__.pyi +2 -2
- bpy/props/__init__.pyi +29 -52
- bpy/types/__init__.pyi +4648 -3095
- bpy/utils/__init__.pyi +3 -6
- bpy/utils/units/__init__.pyi +3 -6
- bpy_extras/io_utils/__init__.pyi +8 -0
- bpy_types/__init__.pyi +3 -0
- {fake_bpy_module-20240326.dist-info → fake_bpy_module-20240329.dist-info}/METADATA +1 -1
- {fake_bpy_module-20240326.dist-info → fake_bpy_module-20240329.dist-info}/RECORD +117 -117
- freestyle/chainingiterators/__init__.pyi +5 -12
- freestyle/functions/__init__.pyi +19 -73
- freestyle/predicates/__init__.pyi +8 -21
- freestyle/shaders/__init__.pyi +32 -81
- freestyle/types/__init__.pyi +100 -270
- freestyle/utils/ContextFunctions/__init__.pyi +7 -27
- freestyle/utils/__init__.pyi +1 -2
- gpu/capabilities/__init__.pyi +15 -32
- gpu/matrix/__init__.pyi +1 -2
- gpu/state/__init__.pyi +4 -10
- gpu/types/__init__.pyi +29 -87
- gpu_extras/presets/__init__.pyi +4 -16
- imbuf/types/__init__.pyi +4 -10
- mathutils/__init__.pyi +106 -257
- mathutils/bvhtree/__init__.pyi +7 -15
- mathutils/geometry/__init__.pyi +9 -18
- mathutils/kdtree/__init__.pyi +4 -11
- mathutils/noise/__init__.pyi +41 -82
- {fake_bpy_module-20240326.dist-info → fake_bpy_module-20240329.dist-info}/WHEEL +0 -0
- {fake_bpy_module-20240326.dist-info → fake_bpy_module-20240329.dist-info}/top_level.txt +0 -0
aud/__init__.pyi
CHANGED
|
@@ -96,17 +96,14 @@ class DynamicMusic:
|
|
|
96
96
|
:param scene: The scene sound.
|
|
97
97
|
:type scene: Sound
|
|
98
98
|
:return: The new scene id.
|
|
99
|
-
:rtype: int
|
|
100
99
|
"""
|
|
101
100
|
...
|
|
102
101
|
|
|
103
|
-
def addTransition(self, ini
|
|
102
|
+
def addTransition(self, ini, end, transition: Sound) -> Sound:
|
|
104
103
|
"""Adds a new scene.
|
|
105
104
|
|
|
106
105
|
:param ini: the initial scene foor the transition.
|
|
107
|
-
:type ini: int
|
|
108
106
|
:param end: The final scene for the transition.
|
|
109
|
-
:type end: int
|
|
110
107
|
:param transition: The transition sound.
|
|
111
108
|
:type transition: Sound
|
|
112
109
|
:return: false if the ini or end scenes don't exist, true othrwise.
|
|
@@ -163,17 +160,13 @@ class HRTF:
|
|
|
163
160
|
"""
|
|
164
161
|
...
|
|
165
162
|
|
|
166
|
-
def addImpulseResponseFromSound(
|
|
167
|
-
self, sound: Sound, azimuth: float, elevation: float
|
|
168
|
-
) -> float:
|
|
163
|
+
def addImpulseResponseFromSound(self, sound: Sound, azimuth, elevation):
|
|
169
164
|
"""Adds a new hrtf to the HRTF object
|
|
170
165
|
|
|
171
166
|
:param sound: The sound that contains the hrtf.
|
|
172
167
|
:type sound: Sound
|
|
173
168
|
:param azimuth: The azimuth angle of the hrtf.
|
|
174
|
-
:type azimuth: float
|
|
175
169
|
:param elevation: The elevation angle of the hrtf.
|
|
176
|
-
:type elevation: float
|
|
177
170
|
:return: Whether the action succeeded.
|
|
178
171
|
:rtype: bool
|
|
179
172
|
"""
|
|
@@ -272,13 +265,11 @@ class ImpulseResponse:
|
|
|
272
265
|
class PlaybackManager:
|
|
273
266
|
"""A PlabackManager object allows to easily control groups os sounds organized in categories."""
|
|
274
267
|
|
|
275
|
-
def addCategory(self, volume
|
|
268
|
+
def addCategory(self, volume):
|
|
276
269
|
"""Adds a category with a custom volume.
|
|
277
270
|
|
|
278
271
|
:param volume: The volume for ther new category.
|
|
279
|
-
:type volume: float
|
|
280
272
|
:return: The key of the new category.
|
|
281
|
-
:rtype: int
|
|
282
273
|
"""
|
|
283
274
|
...
|
|
284
275
|
|
|
@@ -286,66 +277,57 @@ class PlaybackManager:
|
|
|
286
277
|
"""Cleans all the invalid and finished sound from the playback manager."""
|
|
287
278
|
...
|
|
288
279
|
|
|
289
|
-
def getVolume(self, catKey
|
|
280
|
+
def getVolume(self, catKey):
|
|
290
281
|
"""Retrieves the volume of a category.
|
|
291
282
|
|
|
292
283
|
:param catKey: the key of the category.
|
|
293
|
-
:type catKey: int
|
|
294
284
|
:return: The volume of the cateogry.
|
|
295
|
-
:rtype: float
|
|
296
285
|
"""
|
|
297
286
|
...
|
|
298
287
|
|
|
299
|
-
def pause(self, catKey
|
|
288
|
+
def pause(self, catKey):
|
|
300
289
|
"""Pauses playback of the category.
|
|
301
290
|
|
|
302
291
|
:param catKey: the key of the category.
|
|
303
|
-
:type catKey: int
|
|
304
292
|
:return: Whether the action succeeded.
|
|
305
293
|
:rtype: bool
|
|
306
294
|
"""
|
|
307
295
|
...
|
|
308
296
|
|
|
309
|
-
def play(self, sound: Sound, catKey
|
|
297
|
+
def play(self, sound: Sound, catKey):
|
|
310
298
|
"""Plays a sound through the playback manager and assigns it to a category.
|
|
311
299
|
|
|
312
300
|
:param sound: The sound to play.
|
|
313
301
|
:type sound: Sound
|
|
314
302
|
:param catKey: the key of the category in which the sound will be added,
|
|
315
303
|
if it doesn't exist, a new one will be created.
|
|
316
|
-
:type catKey: int
|
|
317
304
|
:return: The playback handle with which playback can be controlled with.
|
|
318
305
|
:rtype: Handle
|
|
319
306
|
"""
|
|
320
307
|
...
|
|
321
308
|
|
|
322
|
-
def resume(self, catKey
|
|
309
|
+
def resume(self, catKey):
|
|
323
310
|
"""Resumes playback of the catgory.
|
|
324
311
|
|
|
325
312
|
:param catKey: the key of the category.
|
|
326
|
-
:type catKey: int
|
|
327
313
|
:return: Whether the action succeeded.
|
|
328
314
|
:rtype: bool
|
|
329
315
|
"""
|
|
330
316
|
...
|
|
331
317
|
|
|
332
|
-
def setVolume(self, volume
|
|
318
|
+
def setVolume(self, volume, catKey):
|
|
333
319
|
"""Changes the volume of a category.
|
|
334
320
|
|
|
335
321
|
:param volume: the new volume value.
|
|
336
|
-
:type volume: float
|
|
337
322
|
:param catKey: the key of the category.
|
|
338
|
-
:type catKey: int
|
|
339
323
|
:return: Whether the action succeeded.
|
|
340
|
-
:rtype: int
|
|
341
324
|
"""
|
|
342
325
|
...
|
|
343
326
|
|
|
344
|
-
def stop(self, catKey
|
|
327
|
+
def stop(self, catKey):
|
|
345
328
|
"""Stops playback of the category.
|
|
346
329
|
|
|
347
330
|
:param catKey: the key of the category.
|
|
348
|
-
:type catKey: int
|
|
349
331
|
:return: Whether the action succeeded.
|
|
350
332
|
:rtype: bool
|
|
351
333
|
"""
|
|
@@ -482,87 +464,72 @@ class Sound:
|
|
|
482
464
|
...
|
|
483
465
|
|
|
484
466
|
@classmethod
|
|
485
|
-
def sawtooth(cls, frequency
|
|
467
|
+
def sawtooth(cls, frequency, rate=48000):
|
|
486
468
|
"""Creates a sawtooth sound which plays a sawtooth wave.
|
|
487
469
|
|
|
488
470
|
:param frequency: The frequency of the sawtooth wave in Hz.
|
|
489
|
-
:type frequency: float
|
|
490
471
|
:param rate: The sampling rate in Hz. It's recommended to set this
|
|
491
472
|
value to the playback device's samling rate to avoid resamping.
|
|
492
|
-
:type rate: int
|
|
493
473
|
:return: The created `Sound` object.
|
|
494
474
|
:rtype: Sound
|
|
495
475
|
"""
|
|
496
476
|
...
|
|
497
477
|
|
|
498
478
|
@classmethod
|
|
499
|
-
def silence(cls, rate
|
|
479
|
+
def silence(cls, rate=48000):
|
|
500
480
|
"""Creates a silence sound which plays simple silence.
|
|
501
481
|
|
|
502
482
|
:param rate: The sampling rate in Hz. It's recommended to set this
|
|
503
483
|
value to the playback device's samling rate to avoid resamping.
|
|
504
|
-
:type rate: int
|
|
505
484
|
:return: The created `Sound` object.
|
|
506
485
|
:rtype: Sound
|
|
507
486
|
"""
|
|
508
487
|
...
|
|
509
488
|
|
|
510
489
|
@classmethod
|
|
511
|
-
def sine(cls, frequency
|
|
490
|
+
def sine(cls, frequency, rate=48000):
|
|
512
491
|
"""Creates a sine sound which plays a sine wave.
|
|
513
492
|
|
|
514
493
|
:param frequency: The frequency of the sine wave in Hz.
|
|
515
|
-
:type frequency: float
|
|
516
494
|
:param rate: The sampling rate in Hz. It's recommended to set this
|
|
517
495
|
value to the playback device's samling rate to avoid resamping.
|
|
518
|
-
:type rate: int
|
|
519
496
|
:return: The created `Sound` object.
|
|
520
497
|
:rtype: Sound
|
|
521
498
|
"""
|
|
522
499
|
...
|
|
523
500
|
|
|
524
501
|
@classmethod
|
|
525
|
-
def square(cls, frequency
|
|
502
|
+
def square(cls, frequency, rate=48000):
|
|
526
503
|
"""Creates a square sound which plays a square wave.
|
|
527
504
|
|
|
528
505
|
:param frequency: The frequency of the square wave in Hz.
|
|
529
|
-
:type frequency: float
|
|
530
506
|
:param rate: The sampling rate in Hz. It's recommended to set this
|
|
531
507
|
value to the playback device's samling rate to avoid resamping.
|
|
532
|
-
:type rate: int
|
|
533
508
|
:return: The created `Sound` object.
|
|
534
509
|
:rtype: Sound
|
|
535
510
|
"""
|
|
536
511
|
...
|
|
537
512
|
|
|
538
513
|
@classmethod
|
|
539
|
-
def triangle(cls, frequency
|
|
514
|
+
def triangle(cls, frequency, rate=48000):
|
|
540
515
|
"""Creates a triangle sound which plays a triangle wave.
|
|
541
516
|
|
|
542
517
|
:param frequency: The frequency of the triangle wave in Hz.
|
|
543
|
-
:type frequency: float
|
|
544
518
|
:param rate: The sampling rate in Hz. It's recommended to set this
|
|
545
519
|
value to the playback device's samling rate to avoid resamping.
|
|
546
|
-
:type rate: int
|
|
547
520
|
:return: The created `Sound` object.
|
|
548
521
|
:rtype: Sound
|
|
549
522
|
"""
|
|
550
523
|
...
|
|
551
524
|
|
|
552
|
-
def ADSR(
|
|
553
|
-
self, attack: float, decay: float, sustain: float, release: float
|
|
554
|
-
) -> float:
|
|
525
|
+
def ADSR(self, attack, decay, sustain, release):
|
|
555
526
|
"""Attack-Decay-Sustain-Release envelopes the volume of a sound.
|
|
556
527
|
Note: there is currently no way to trigger the release with this API.
|
|
557
528
|
|
|
558
529
|
:param attack: The attack time in seconds.
|
|
559
|
-
:type attack: float
|
|
560
530
|
:param decay: The decay time in seconds.
|
|
561
|
-
:type decay: float
|
|
562
531
|
:param sustain: The sustain level.
|
|
563
|
-
:type sustain: float
|
|
564
532
|
:param release: The release level.
|
|
565
|
-
:type release: float
|
|
566
533
|
:return: The created `Sound` object.
|
|
567
534
|
:rtype: Sound
|
|
568
535
|
"""
|
|
@@ -621,55 +588,44 @@ class Sound:
|
|
|
621
588
|
"""
|
|
622
589
|
...
|
|
623
590
|
|
|
624
|
-
def delay(self, time
|
|
591
|
+
def delay(self, time):
|
|
625
592
|
"""Delays by playing adding silence in front of the other sound's data.
|
|
626
593
|
|
|
627
594
|
:param time: How many seconds of silence should be added before the sound.
|
|
628
|
-
:type time: float
|
|
629
595
|
:return: The created `Sound` object.
|
|
630
596
|
:rtype: Sound
|
|
631
597
|
"""
|
|
632
598
|
...
|
|
633
599
|
|
|
634
|
-
def envelope(
|
|
635
|
-
self, attack: float, release: float, threshold: float, arthreshold: float
|
|
636
|
-
) -> float:
|
|
600
|
+
def envelope(self, attack, release, threshold, arthreshold):
|
|
637
601
|
"""Delays by playing adding silence in front of the other sound's data.
|
|
638
602
|
|
|
639
603
|
:param attack: The attack factor.
|
|
640
|
-
:type attack: float
|
|
641
604
|
:param release: The release factor.
|
|
642
|
-
:type release: float
|
|
643
605
|
:param threshold: The general threshold value.
|
|
644
|
-
:type threshold: float
|
|
645
606
|
:param arthreshold: The attack/release threshold value.
|
|
646
|
-
:type arthreshold: float
|
|
647
607
|
:return: The created `Sound` object.
|
|
648
608
|
:rtype: Sound
|
|
649
609
|
"""
|
|
650
610
|
...
|
|
651
611
|
|
|
652
|
-
def fadein(self, start
|
|
612
|
+
def fadein(self, start, length):
|
|
653
613
|
"""Fades a sound in by raising the volume linearly in the given
|
|
654
614
|
time interval.
|
|
655
615
|
|
|
656
616
|
:param start: Time in seconds when the fading should start.
|
|
657
|
-
:type start: float
|
|
658
617
|
:param length: Time in seconds how long the fading should last.
|
|
659
|
-
:type length: float
|
|
660
618
|
:return: The created `Sound` object.
|
|
661
619
|
:rtype: Sound
|
|
662
620
|
"""
|
|
663
621
|
...
|
|
664
622
|
|
|
665
|
-
def fadeout(self, start
|
|
623
|
+
def fadeout(self, start, length):
|
|
666
624
|
"""Fades a sound in by lowering the volume linearly in the given
|
|
667
625
|
time interval.
|
|
668
626
|
|
|
669
627
|
:param start: Time in seconds when the fading should start.
|
|
670
|
-
:type start: float
|
|
671
628
|
:param length: Time in seconds how long the fading should last.
|
|
672
|
-
:type length: float
|
|
673
629
|
:return: The created `Sound` object.
|
|
674
630
|
:rtype: Sound
|
|
675
631
|
"""
|
|
@@ -694,14 +650,12 @@ class Sound:
|
|
|
694
650
|
"""
|
|
695
651
|
...
|
|
696
652
|
|
|
697
|
-
def highpass(self, frequency
|
|
653
|
+
def highpass(self, frequency, Q=0.5):
|
|
698
654
|
"""Creates a second order highpass filter based on the transfer
|
|
699
655
|
function H(s) = s^2 / (s^2 + s/Q + 1)
|
|
700
656
|
|
|
701
657
|
:param frequency: The cut off trequency of the highpass.
|
|
702
|
-
:type frequency: float
|
|
703
658
|
:param Q: Q factor of the lowpass.
|
|
704
|
-
:type Q: float
|
|
705
659
|
:return: The created `Sound` object.
|
|
706
660
|
:rtype: Sound
|
|
707
661
|
"""
|
|
@@ -717,13 +671,11 @@ class Sound:
|
|
|
717
671
|
"""
|
|
718
672
|
...
|
|
719
673
|
|
|
720
|
-
def limit(self, start
|
|
674
|
+
def limit(self, start, end):
|
|
721
675
|
"""Limits a sound within a specific start and end time.
|
|
722
676
|
|
|
723
677
|
:param start: Start time in seconds.
|
|
724
|
-
:type start: float
|
|
725
678
|
:param end: End time in seconds.
|
|
726
|
-
:type end: float
|
|
727
679
|
:return: The created `Sound` object.
|
|
728
680
|
:rtype: Sound
|
|
729
681
|
"""
|
|
@@ -739,13 +691,11 @@ class Sound:
|
|
|
739
691
|
"""
|
|
740
692
|
...
|
|
741
693
|
|
|
742
|
-
def lowpass(self, frequency
|
|
694
|
+
def lowpass(self, frequency, Q=0.5):
|
|
743
695
|
"""Creates a second order lowpass filter based on the transfer function H(s) = 1 / (s^2 + s/Q + 1)
|
|
744
696
|
|
|
745
697
|
:param frequency: The cut off trequency of the lowpass.
|
|
746
|
-
:type frequency: float
|
|
747
698
|
:param Q: Q factor of the lowpass.
|
|
748
|
-
:type Q: float
|
|
749
699
|
:return: The created `Sound` object.
|
|
750
700
|
:rtype: Sound
|
|
751
701
|
"""
|
|
@@ -789,33 +739,30 @@ class Sound:
|
|
|
789
739
|
"""
|
|
790
740
|
...
|
|
791
741
|
|
|
792
|
-
def pitch(self, factor
|
|
742
|
+
def pitch(self, factor):
|
|
793
743
|
"""Changes the pitch of a sound with a specific factor.
|
|
794
744
|
|
|
795
745
|
:param factor: The factor to change the pitch with.
|
|
796
|
-
:type factor: float
|
|
797
746
|
:return: The created `Sound` object.
|
|
798
747
|
:rtype: Sound
|
|
799
748
|
"""
|
|
800
749
|
...
|
|
801
750
|
|
|
802
|
-
def rechannel(self, channels
|
|
751
|
+
def rechannel(self, channels):
|
|
803
752
|
"""Rechannels the sound.
|
|
804
753
|
|
|
805
754
|
:param channels: The new channel configuration.
|
|
806
|
-
:type channels: int
|
|
807
755
|
:return: The created `Sound` object.
|
|
808
756
|
:rtype: Sound
|
|
809
757
|
"""
|
|
810
758
|
...
|
|
811
759
|
|
|
812
|
-
def resample(self, rate: float, quality
|
|
760
|
+
def resample(self, rate: float, quality):
|
|
813
761
|
"""Resamples the sound.
|
|
814
762
|
|
|
815
763
|
:param rate: The new sample rate.
|
|
816
764
|
:type rate: float
|
|
817
765
|
:param quality: Resampler performance vs quality choice (0=fastest, 3=slowest).
|
|
818
|
-
:type quality: int
|
|
819
766
|
:return: The created `Sound` object.
|
|
820
767
|
:rtype: Sound
|
|
821
768
|
"""
|
|
@@ -837,24 +784,22 @@ class Sound:
|
|
|
837
784
|
"""
|
|
838
785
|
...
|
|
839
786
|
|
|
840
|
-
def threshold(self, threshold
|
|
787
|
+
def threshold(self, threshold=0):
|
|
841
788
|
"""Makes a threshold wave out of an audio wave by setting all samples
|
|
842
789
|
with a amplitude >= threshold to 1, all <= -threshold to -1 and
|
|
843
790
|
all between to 0.
|
|
844
791
|
|
|
845
792
|
:param threshold: Threshold value over which an amplitude counts
|
|
846
793
|
non-zero.
|
|
847
|
-
:type threshold: float
|
|
848
794
|
:return: The created `Sound` object.
|
|
849
795
|
:rtype: Sound
|
|
850
796
|
"""
|
|
851
797
|
...
|
|
852
798
|
|
|
853
|
-
def volume(self, volume
|
|
799
|
+
def volume(self, volume):
|
|
854
800
|
"""Changes the volume of a sound.
|
|
855
801
|
|
|
856
802
|
:param volume: The new volume..
|
|
857
|
-
:type volume: float
|
|
858
803
|
:return: The created `Sound` object.
|
|
859
804
|
:rtype: Sound
|
|
860
805
|
"""
|
|
@@ -863,32 +808,25 @@ class Sound:
|
|
|
863
808
|
def write(
|
|
864
809
|
self,
|
|
865
810
|
filename: str,
|
|
866
|
-
rate
|
|
867
|
-
channels
|
|
868
|
-
format
|
|
869
|
-
container
|
|
870
|
-
codec
|
|
871
|
-
bitrate
|
|
872
|
-
buffersize
|
|
811
|
+
rate,
|
|
812
|
+
channels,
|
|
813
|
+
format,
|
|
814
|
+
container,
|
|
815
|
+
codec,
|
|
816
|
+
bitrate,
|
|
817
|
+
buffersize,
|
|
873
818
|
):
|
|
874
819
|
"""Writes the sound to a file.
|
|
875
820
|
|
|
876
821
|
:param filename: The path to write to.
|
|
877
822
|
:type filename: str
|
|
878
823
|
:param rate: The sample rate to write with.
|
|
879
|
-
:type rate: int
|
|
880
824
|
:param channels: The number of channels to write with.
|
|
881
|
-
:type channels: int
|
|
882
825
|
:param format: The sample format to write with.
|
|
883
|
-
:type format: int
|
|
884
826
|
:param container: The container format for the file.
|
|
885
|
-
:type container: int
|
|
886
827
|
:param codec: The codec to use in the file.
|
|
887
|
-
:type codec: int
|
|
888
828
|
:param bitrate: The bitrate to write with.
|
|
889
|
-
:type bitrate: int
|
|
890
829
|
:param buffersize: The size of the writing buffer.
|
|
891
|
-
:type buffersize: int
|
|
892
830
|
"""
|
|
893
831
|
...
|
|
894
832
|
|