Giter VIP home page Giter VIP logo

vaporiser's Introduction

vaporiser GitHub repo size GitHub licence Code style: Black Test Python Environment

Buy Me a Coffee at ko-fi.com

vaporiser is a Python script that creates a vaporwave (slowed, with reverb) remix of a given MP3 file, with the option of playing over a looped GIF as a video. It applies audio effects to an input MP3 file, and writes the result to a new MP3 file. If a GIF is given in the command, an MP4 video file of the GIF on repeat for the duration of the remix is also created. Vaporiser can apply the following audio effects:

  • Speed shift
  • Pitch shift
  • Reverb
  • Lowpass filter
  • Bass boost
  • Gain adjustment
  • Out Of Phase Stereo (karaoke) effect
  • Phaser effect
  • Tremolo effect
  • Compand

See usage for details of available effects.

Contents

System requirements

Required software

Using vaporiser on Windows

This project is written to be used through a UNIX (Linux or Mac with macOS Mojave or later) operating system (OS). If you are using Windows, you can use this project on a Linux OS (e.g. Ubuntu) through either:

Installing SoX

SoX and libson-fmt-mp3 can be installed with the following commands:

$ sudo apt install sox
$ sudo apt-get install libsox-fmt-mp3

Installing Python 3.10 and venv on Ubuntu

$ sudo apt install python3.10
$ sudo apt-get install python3.10-venv

Setup instructions

Clone the repo

$ git clone https://github.com/rnnh/vaporiser.git
$ cd vaporiser/

Create a virtual environment

/vaporiser$ python3.10 -m venv env
/vaporiser$ source env/bin/activate

Install required packages

(env) /vaporiser$ pip install --upgrade pip
(env) /vaporiser$ pip install -r requirements.txt

Optional: Make script executable

Making the script executable will allow it to be called from the command line using $ ./vaporiser.py instead of $ python vaporiser.py when the virtual environment is active.

(env) $ chmod +x vaporiser.py

Usage

Example

Vaporiser can be used to create a remix of the file audio_file.mp3 with the following command:

$ python vaporiser.py --audio audio_file.mp3

The remixed audio will be written to the file audio_file_vaporised.mp3. By default, _vaporised is added to the end of the output filenames, unless an output filename is specified using the --output argument.

Help text

$ python vaporiser.py --help
usage: vaporiser.py [-h] [-o OUTPUT_NAME] -a AUDIO_INPUT [-s SPEED_RATIO]
                    [-p PITCH_SHIFT] [-l LOWPASS_CUTOFF] [-b BASS_BOOST]
                    [-ga GAIN_DB] [-op] [-ph] [-tr] [-co] [-nr] [-g GIF_FILE]
                    [-sb]

Creates a vaporwave (slowed, with reverb) remix of a given MP3 file, with
multiple audio effects available, and the option of playing over a looped GIF
as a video.

options:
  -h, --help            show this help message and exit
  -o OUTPUT_NAME, --output OUTPUT_NAME
                        Name of output file(s), instead of audio file name
                        with the addition of '_vaporised'. (default: None)

required arguments:
  -a AUDIO_INPUT, --audio AUDIO_INPUT
                        Input audio file to vaporise (.mp3) (default: None)

audio arguments:
  these arguments control audio effects that will be applied by default

  -s SPEED_RATIO, --speed SPEED_RATIO
                        Ratio of new playback speed to old speed. (default:
                        0.75)
  -p PITCH_SHIFT, --pitch PITCH_SHIFT
                        Pitch shift (100ths of a semitone). (default: -75)
  -l LOWPASS_CUTOFF, --lowpass LOWPASS_CUTOFF
                        Cutoff for lowpass filter (Hz). (default: 3500)

extra audio arguments:
  these arguments control extra, optional audio effects

  -b BASS_BOOST, --bass BASS_BOOST
                        Add a bass boost effect (e.g. --bass 3). (default:
                        None)
  -ga GAIN_DB, --gain GAIN_DB
                        Applies gain (dB). (default: None)
  -op, --oops           Applies Out Of Phase Stereo effect. This is sometimes
                        known as the ‘karaoke’ effect as it often has the
                        effect of removing most or all of the vocals from a
                        recording. (default: False)
  -ph, --phaser         Enable phaser effect. (default: False)
  -tr, --tremolo        Enable tremolo effect. (default: False)
  -co, --compand        Enable compand, which compresses the dynamic range of
                        the audio. (default: False)
  -nr, --noreverb       Disables reverb. (default: False)

video arguments:
  optional arguments, result in an MP4 video output in addition to the MP3
  audio

  -g GIF_FILE, --gif GIF_FILE
                        Input GIF file to loop. Without a GIF, only an MP3 is
                        created. With a GIF, an MP4 video is also created.
                        (default: None)
  -sb, --sobel          Applies a Sobel filter to video output. (default:
                        False)

vaporiser's People

Contributors

dependabot[bot] avatar rnnh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vaporiser's Issues

Error installing scikit-image

thats my error while installing requirements.txt in env:

ModuleNotFoundError: No module named 'numpy'
ERROR: Could not find a version that satisfies the requirement scikit-image==0.17.2 (from versions: 0.7.2, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.9.1, 0.9.3, 0.10.0, 0.10.1, 0.11.2, 0.11.3, 0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.14.5, 0.15.0, 0.16.2, 0.17.1, 0.17.2, 0.18.0rc0, 0.18.0rc1, 0.18.0rc2, 0.18.0, 0.18.1, 0.18.2rc1, 0.18.2rc2, 0.18.2, 0.18.3)
ERROR: No matching distribution found for scikit-image==0.17.2

And an Error while running:
Traceback (most recent call last):
File "C:\Users\Lenovo\Desktop\VAPORISER\vaporiser.py", line 4, in
from pysndfx import AudioEffectsChain
ModuleNotFoundError: No module named 'pysndfx'

after installing pysndfx this Error appears:
Traceback (most recent call last):
File "C:\Users\Lenovo\Desktop\VAPORISER\vaporiser.py", line 5, in
from skimage.filters import sobel
ModuleNotFoundError: No module named 'skimage'

and skimage / scikit-image can't be installed because of the first error

Any Help is fine!
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.