Mix50


NameMix50 JSON
Version 0.5 PyPI version JSON
download
home_pagehttps://github.com/smullins998/Mix50
SummaryFast and simple DJ and audio effects in Python with Librosa
upload_time2024-08-30 19:59:34
maintainerNone
docs_urlNone
authorSean Mullins
requires_pythonNone
licenseMIT
keywords python audio dsp dj audio analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

<picture>
  <source srcset="./Images/mix50-inverted.png" media="(prefers-color-scheme: dark)" />
  <img src="./Images/transparent3.png" alt="Your image description">
</picture>

# 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
```bash

$ pip install Mix50
```

## Audio Effects 
Analyze a WAV audio file -
```python
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 

```python
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()

```
<p align="center">
  <img width="1000" height="460" src="./Images/transition_cues.png">
</p>


## 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 with `cue_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.'
```python

#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

```python

#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")

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/smullins998/Mix50",
    "name": "Mix50",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, audio, DSP, DJ, audio analysis",
    "author": "Sean Mullins",
    "author_email": "smullins998@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3a/69/d44dc906e20674600a5ca3ba3afacfea763b653362f1b4adf9b74e54ee41/mix50-0.5.tar.gz",
    "platform": null,
    "description": "\n[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\n<picture>\n  <source srcset=\"./Images/mix50-inverted.png\" media=\"(prefers-color-scheme: dark)\" />\n  <img src=\"./Images/transparent3.png\" alt=\"Your image description\">\n</picture>\n\n# Mix50\nMix50 is an audio effect and DSP library that runs effects on music files. \nYou 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.\n\n\n## Installation\n> Tested on Python 3.11 and later\n```bash\n\n$ pip install Mix50\n```\n\n## Audio Effects \nAnalyze a WAV audio file -\n```python\nimport Mix50\n\n#Create mixfifty instance\nMixfifty = Mix50.MixFifty()\n\n#Load Audio(s)\nMixFifty.load_audio('your_mp3_file.mp3')\n\n#Use the effects module to fade audio in at 15s for 10s\nMixFifty.effects.fade_in(start_time=15,fade_duration=10)\n\n#Use the effects module to utilize filter highpass\nMixFifty.effects.highpass_control(start_time=15, end_time=30, cutoff_freq=1000)\n\n#Use the effects module to control speed of audio\nMixFifty.effects.speed_control(start_time=15, end_time=30, original_bpm=126, new_bpm=120)\n```\n\n## Audio Features \n\n```python\nimport Mix50\n\n#Create mixfifty instance\nMixfifty = Mix50.MixFifty()\n\n#Load Audio(s)\nMixFifty.load_audio('your_mp3_file.mp3')\n\n#Get BPM of Audio\nMixFifty.features.bpm()\n\n#Get Key of Audio\nMixFifty.features.key()\n\n#Get a dataframe of a beatgrid to mix audio files and understand transition cues\nMixFifty.features.beats()\n\n==> beats    downbeat    loop_cues    transitions\n    9.102    9.102       9.102        9.102\n    9.590    NaN         NaN          NaN\n    10.054   NaN         NaN          NaN\n    10.542   NaN         NaN          NaN\n    11.006   11.006      NaN          NaN\n... ... ... ... ...\n    317.486  NaN         NaN          NaN\n    317.974  NaN         NaN          NaN\n    318.438 318.438      NaN          NaN\n    318.903 NaN          NaN          NaN\n    319.390 NaN          NaN          NaN\n\n#Visualize transition cues\nMixFifty.features.show_transition_points()\n\n```\n<p align=\"center\">\n  <img width=\"1000\" height=\"460\" src=\"./Images/transition_cues.png\">\n</p>\n\n\n## Audio Transitions\n\nMix50 generates transitions based on the beatgrid derived from the audio.\n\n### Parameters\n\n- **`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.\n  \n- **`cue_num2`**: Specifies the transition cue for the start of song #2. As with `cue_num1`, songs generally have up to 10 transition points, but this parameter is designed for experimentation.\n\n- **`filter_type`**: Specifies the filter you want to apply to transition the audios. Choices are 'highpass', 'lowpass', or 'none.'\n```python\n\n#Create mixfifty instance\nMixfifty = Mix50.MixFifty()\n\n#Load Two Audio files\nMixFifty.load_audio('your_mp3_file1.mp3', 'your_mp3_file2.mp3')\n\n#Create crossfade transition\nMixFifty.transitions.crossfade(cue_num1=8,cue_num2=6,fade_duration=10,filter_type='none')\n```\n\n## Save & Export Audio\n\nSave, play, and return audio with this module. Saving .MP3 files is not supported; please use .WAV\n\n```python\n\n#Save affected audio to a variable \naffected_audio = MixFifty.effects.fade_out(start_time=15,fade_duration=15)\n\n# Play audio in an interactive environment\naffected_audio.play()\n\n# Output:\n# ==> IPython.lib.display.Audio\n\n# Return raw audio as a numpy array\naffected_audio.raw_audio()\n\n# Output:\n# ==> array([ 9.06439368e-11,  1.45156775e-10, -1.51146651e-10, ..., 0.00000000e+00,  0.00000000e+00,  0.00000000e+00])\n\n# Save as an audio file: must use .wav; .mp3 not supported\naffected_audio.save(\"path/to/save.wav\")\n\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Fast and simple DJ and audio effects in Python with Librosa",
    "version": "0.5",
    "project_urls": {
        "Homepage": "https://github.com/smullins998/Mix50"
    },
    "split_keywords": [
        "python",
        " audio",
        " dsp",
        " dj",
        " audio analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8b13dec241797d366a3be08e94af42edc1cb4f411e4ea50175bc34ce7113aa9f",
                "md5": "bac6110ea414d1733691a13a15b142ac",
                "sha256": "61af4f4a469708045794f56609c24c836e564a9073e0d8ce7e8d6bb3ea65ce00"
            },
            "downloads": -1,
            "filename": "Mix50-0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bac6110ea414d1733691a13a15b142ac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 14896,
            "upload_time": "2024-08-30T19:59:33",
            "upload_time_iso_8601": "2024-08-30T19:59:33.462185Z",
            "url": "https://files.pythonhosted.org/packages/8b/13/dec241797d366a3be08e94af42edc1cb4f411e4ea50175bc34ce7113aa9f/Mix50-0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3a69d44dc906e20674600a5ca3ba3afacfea763b653362f1b4adf9b74e54ee41",
                "md5": "f1f5151ead1dbef714c2d480e8812c5a",
                "sha256": "ac73bf5442502c550864ea3e0c058fc00a32ab855966512f524d0b3a60b9bd7f"
            },
            "downloads": -1,
            "filename": "mix50-0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "f1f5151ead1dbef714c2d480e8812c5a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13266,
            "upload_time": "2024-08-30T19:59:34",
            "upload_time_iso_8601": "2024-08-30T19:59:34.897578Z",
            "url": "https://files.pythonhosted.org/packages/3a/69/d44dc906e20674600a5ca3ba3afacfea763b653362f1b4adf9b74e54ee41/mix50-0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-30 19:59:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "smullins998",
    "github_project": "Mix50",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "mix50"
}
        
Elapsed time: 4.64722s