File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024 Cooper Dalrymple
2
+ #
3
+ # SPDX-License-Identifier: MIT
Original file line number Diff line number Diff line change @@ -381,6 +381,24 @@ def mix(*waveforms: tuple) -> np.ndarray:
381
381
objects must have the same data type. If the sizes of the arrays are inconsistent, the output
382
382
will be sized to the shortest array.
383
383
384
+ .. |mix-1| image:: _static/mix-1.jpg
385
+ :width: 200
386
+ :alt: example of waveform mixing
387
+
388
+ .. table::
389
+
390
+ +--------------------------------------------------+---------+
391
+ | .. code-block:: python | |mix-1| |
392
+ | | |
393
+ | import synthwaveform | |
394
+ | waveform = synthwaveform.mix( | |
395
+ | (synthwaveform.triangle(), 0.7), | |
396
+ | (synthwaveform.saw(frequency=2.0), 0.1), | |
397
+ | (synthwaveform.saw(frequency=3.0), 0.1), | |
398
+ | (synthwaveform.saw(frequency=4.0), 0.1), | |
399
+ | ) | |
400
+ +--------------------------------------------------+---------+
401
+
384
402
:param waveforms: The arrays to be mixed together. In order to specify the level for each
385
403
waveform, each waveform can be provided as a tuple with the first element being the waveform
386
404
data and the second being the level.
You can’t perform that action at this time.
0 commit comments