Usage
Live Audio Mixer
import easymix as mixer
import time
def liveMix():
mixer.play('01.mp3')
for i in range(5):
mixer.play('02.mp3')
time.sleep(2)
mixer.stop()
Compose Audio track
import easymix as mixer
def composeTrack():
track = mixer.Track()
track.addSound('01.mp3', 1.0)
for t in range(5):
track.addSound('02.mp3', t)
track.save('track.mp3')
You can also define the sounds as pydub audio segments. It's convenient in case you need to apply effects on the sounds before playing, such as volume adjustment.
import pydub
sound01 = pydub.AudioSegment.from_file('01.mp3')
sound01 -= 5 # reduce 5dB
...
mixer.play(sound01)
...
track.addSound(sound01, 1.0)
Setup
Install pip package
pip3 install easymix
Known issues
This is only a prototype. Beware of the following issues which require proper investigation:
- The
pyaudiopackage installation fails with Python 3.11.4, but works with Python 3.9.2. - The sounds might be played at higher speed than expected (bit rate issue)
Release files for easymix 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| easymix-0.0.9.tar.gz | 11.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| easymix-0.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.5 kB
Release files / easymix-0.0.9.tar.gz
| Download URL | easymix-0.0.9.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb54eb879f1cc497af92a076033a59e0d20529347e8bb673ce6668a591e49a3e
|
|
BLAKE2b-256 checksum How to use checksums |
363e763a8631dac266a3c921f441812e16885103436f9a3a5b97d05e2d780051
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Release files / easymix-0.0.9-py3-none-any.whl
| Download URL | easymix-0.0.9-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efa3a515effbe14c6a87cedf5d0897446253a00878f77e9ef86fe8d607da5059
|
|
BLAKE2b-256 checksum How to use checksums |
a3e73af4e492a42d325ea2f2674fb727675e059df4bcf63aba9cf68bf7327503
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|