https://github.com/flokapi/easymix
Simple live and track audio mixer in python
https://github.com/flokapi/easymix
audio-processing mixer
Last synced: about 1 year ago
JSON representation
Simple live and track audio mixer in python
- Host: GitHub
- URL: https://github.com/flokapi/easymix
- Owner: flokapi
- License: lgpl-2.1
- Created: 2023-08-06T22:26:37.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-04T14:54:00.000Z (over 2 years ago)
- Last Synced: 2025-02-04T16:51:05.439Z (over 1 year ago)
- Topics: audio-processing, mixer
- Language: Python
- Homepage:
- Size: 566 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Usage
Live Audio Mixer
```python
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
```python
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.
```python
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:
1. The `pyaudio` package installation fails with Python 3.11.4, but works with Python 3.9.2.
2. The sounds might be played at higher speed than expected (bit rate issue)