Mix50
Mix50 is an audio effect and DSP library that runs effects on music files. You can retrieve audio features like key, bpm, beatgrid, transition cues. You can apply audio effects like filters, fades, and time warping. You can also attempt to mix and create transitions between two songs autonomously by using the crossfade method in the transitions module.
Installation
Tested on Python 3.11 and later
$ pip install Mix50
Audio Effects
Analyze a WAV audio file -
import Mix50
#Create mixfifty instance
Mixfifty = Mix50.MixFifty()
#Load Audio(s)
MixFifty.load_audio('your_mp3_file.mp3')
#Use the effects module to fade audio in at 15s for 10s
MixFifty.effects.fade_in(start_time=15,fade_duration=10)
#Use the effects module to utilize filter highpass
MixFifty.effects.highpass_control(start_time=15, end_time=30, cutoff_freq=1000)
#Use the effects module to control speed of audio
MixFifty.effects.speed_control(start_time=15, end_time=30, original_bpm=126, new_bpm=120)
Audio Features
import Mix50
#Create mixfifty instance
Mixfifty = Mix50.MixFifty()
#Load Audio(s)
MixFifty.load_audio('your_mp3_file.mp3')
#Get BPM of Audio
MixFifty.features.bpm()
#Get Key of Audio
MixFifty.features.key()
#Get a dataframe of a beatgrid to mix audio files and understand transition cues
MixFifty.features.beats()
==> beats downbeat loop_cues transitions
9.102 9.102 9.102 9.102
9.590 NaN NaN NaN
10.054 NaN NaN NaN
10.542 NaN NaN NaN
11.006 11.006 NaN NaN
... ... ... ... ...
317.486 NaN NaN NaN
317.974 NaN NaN NaN
318.438 318.438 NaN NaN
318.903 NaN NaN NaN
319.390 NaN NaN NaN
#Visualize transition cues
MixFifty.features.show_transition_points()
Audio Transitions
Mix50 generates transitions based on the beatgrid derived from the audio.
Parameters
-
cue_num1: Specifies the transition cue for the start of song #1. Typically, songs have up to 10 transition points, but this parameter allows for experimentation. -
cue_num2: Specifies the transition cue for the start of song #2. As withcue_num1, songs generally have up to 10 transition points, but this parameter is designed for experimentation. -
filter_type: Specifies the filter you want to apply to transition the audios. Choices are 'highpass', 'lowpass', or 'none.'
#Create mixfifty instance
Mixfifty = Mix50.MixFifty()
#Load Two Audio files
MixFifty.load_audio('your_mp3_file1.mp3', 'your_mp3_file2.mp3')
#Create crossfade transition
MixFifty.transitions.crossfade(cue_num1=8,cue_num2=6,fade_duration=10,filter_type='none')
Save & Export Audio
Save, play, and return audio with this module. Saving .MP3 files is not supported; please use .WAV
#Save affected audio to a variable
affected_audio = MixFifty.effects.fade_out(start_time=15,fade_duration=15)
# Play audio in an interactive environment
affected_audio.play()
# Output:
# ==> IPython.lib.display.Audio
# Return raw audio as a numpy array
affected_audio.raw_audio()
# Output:
# ==> array([ 9.06439368e-11, 1.45156775e-10, -1.51146651e-10, ..., 0.00000000e+00, 0.00000000e+00, 0.00000000e+00])
# Save as an audio file: must use .wav; .mp3 not supported
affected_audio.save("path/to/save.wav")
Metadata
Release files for Mix50 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mix50-0.5.tar.gz | 13.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Mix50-0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.2 kB
Release files / mix50-0.5.tar.gz
| Download URL | mix50-0.5.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac73bf5442502c550864ea3e0c058fc00a32ab855966512f524d0b3a60b9bd7f
|
|
BLAKE2b-256 checksum How to use checksums |
3a69d44dc906e20674600a5ca3ba3afacfea763b653362f1b4adf9b74e54ee41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.3
|
Release files / Mix50-0.5-py3-none-any.whl
| Download URL | Mix50-0.5-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61af4f4a469708045794f56609c24c836e564a9073e0d8ce7e8d6bb3ea65ce00
|
|
BLAKE2b-256 checksum How to use checksums |
8b13dec241797d366a3be08e94af42edc1cb4f411e4ea50175bc34ce7113aa9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.3
|